* Create dummy mount points in the ISO image for /proc etc.

svn path=/nixu/trunk/; revision=6946
This commit is contained in:
Eelco Dolstra 2006-11-04 00:18:22 +00:00
parent 1691c66673
commit db08678bd4
3 changed files with 18 additions and 7 deletions

View file

@ -18,9 +18,9 @@ done
mkdir /etc # to shut up mount
touch /etc/fstab # idem
mkdir /proc
mount -t proc proc /proc
mount -t proc none /proc
mkdir /sys
mount -t sysfs sys /sys
mount -t sysfs none /sys
# Create device nodes in /dev.
source @makeDevices@

View file

@ -17,12 +17,12 @@ for i in @path@; do
done
# Mount special file systems.
mkdir /etc # to shut up mount
mount -t tmpfs none /etc -n # to shut up mount
touch /etc/fstab # idem
mkdir /proc
mount -t proc proc /proc
mkdir /sys
mount -t sysfs sys /sys
mount -t proc none /proc
mount -t sysfs none /sys
mount -t tmpfs none /dev
mount -t tmpfs none /tmp
# Create device nodes in /dev.
source @makeDevices@

View file

@ -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
# kernel, and initrd produced above.
rescueCD = import ./make-iso9660-image.nix {
@ -83,6 +91,9 @@ rec {
{ source = initialRamdisk + "/initrd";
target = "isolinux/initrd";
}
{ source = cdMountPoints;
target = "/";
}
];
init = bootStage2;