* 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
|
||||
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@
|
||||
|
|
|
@ -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@
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue