* Create dummy mount points in the ISO image for /proc etc.
svn path=/nixu/trunk/; revision=6946
This commit is contained in:
parent
1691c66673
commit
db08678bd4
@ -18,9 +18,9 @@ done
|
|||||||
mkdir /etc # to shut up mount
|
mkdir /etc # to shut up mount
|
||||||
touch /etc/fstab # idem
|
touch /etc/fstab # idem
|
||||||
mkdir /proc
|
mkdir /proc
|
||||||
mount -t proc proc /proc
|
mount -t proc none /proc
|
||||||
mkdir /sys
|
mkdir /sys
|
||||||
mount -t sysfs sys /sys
|
mount -t sysfs none /sys
|
||||||
|
|
||||||
# Create device nodes in /dev.
|
# Create device nodes in /dev.
|
||||||
source @makeDevices@
|
source @makeDevices@
|
||||||
|
@ -17,12 +17,12 @@ for i in @path@; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Mount special file systems.
|
# Mount special file systems.
|
||||||
mkdir /etc # to shut up mount
|
mount -t tmpfs none /etc -n # to shut up mount
|
||||||
touch /etc/fstab # idem
|
touch /etc/fstab # idem
|
||||||
mkdir /proc
|
mount -t proc none /proc
|
||||||
mount -t proc proc /proc
|
mount -t sysfs none /sys
|
||||||
mkdir /sys
|
mount -t tmpfs none /dev
|
||||||
mount -t sysfs sys /sys
|
mount -t tmpfs none /tmp
|
||||||
|
|
||||||
# Create device nodes in /dev.
|
# Create device nodes in /dev.
|
||||||
source @makeDevices@
|
source @makeDevices@
|
||||||
|
@ -64,6 +64,14 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Since the CD is read-only, the mount points must be on disk.
|
||||||
|
cdMountPoints = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "mount-points";
|
||||||
|
builder = builtins.toFile "builder.sh"
|
||||||
|
"source $stdenv/setup; mkdir $out; cd $out; mkdir proc sys tmp etc dev";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# Create an ISO image containing the isolinux boot loader, the
|
# Create an ISO image containing the isolinux boot loader, the
|
||||||
# kernel, and initrd produced above.
|
# kernel, and initrd produced above.
|
||||||
rescueCD = import ./make-iso9660-image.nix {
|
rescueCD = import ./make-iso9660-image.nix {
|
||||||
@ -83,6 +91,9 @@ rec {
|
|||||||
{ source = initialRamdisk + "/initrd";
|
{ source = initialRamdisk + "/initrd";
|
||||||
target = "isolinux/initrd";
|
target = "isolinux/initrd";
|
||||||
}
|
}
|
||||||
|
{ source = cdMountPoints;
|
||||||
|
target = "/";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
init = bootStage2;
|
init = bootStage2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user