* Removed the boot.isLiveCD option. Moved the code for mounting a
tmpfs on top of the CD to iso-image.nix. svn path=/nixos/trunk/; revision=19318
This commit is contained in:
parent
b59cfde311
commit
39796e26b4
@ -131,11 +131,22 @@ in
|
|||||||
boot.initrd.availableKernelModules = [ "aufs" "squashfs" "iso9660" ];
|
boot.initrd.availableKernelModules = [ "aufs" "squashfs" "iso9660" ];
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "loop" ];
|
boot.initrd.kernelModules = [ "loop" ];
|
||||||
|
|
||||||
# Tell stage 1 of the boot to mount a tmpfs on top of the CD using
|
# In stage 1, mount a tmpfs on top of / (the ISO image) and
|
||||||
# AUFS. !!! It would be nicer to make the stage 1 init pluggable
|
# /nix/store (the squashfs image) to make this a live CD.
|
||||||
# and move that bit of code here.
|
boot.initrd.postMountCommands =
|
||||||
boot.isLiveCD = true;
|
''
|
||||||
|
mkdir /mnt-root-tmpfs
|
||||||
|
mount -t tmpfs -o "mode=755" none /mnt-root-tmpfs
|
||||||
|
mkdir /mnt-root-union
|
||||||
|
mount -t aufs -o dirs=/mnt-root-tmpfs=rw:$targetRoot=ro none /mnt-root-union
|
||||||
|
targetRoot=/mnt-root-union
|
||||||
|
|
||||||
|
mkdir /mnt-store-tmpfs
|
||||||
|
mount -t tmpfs -o "mode=755" none /mnt-store-tmpfs
|
||||||
|
mkdir -p $targetRoot/nix/store
|
||||||
|
mount -t aufs -o dirs=/mnt-store-tmpfs=rw:/mnt-root/nix/store=ro none /mnt-root-union/nix/store
|
||||||
|
'';
|
||||||
|
|
||||||
# AUFS 2 support (currently unused).
|
# AUFS 2 support (currently unused).
|
||||||
/*
|
/*
|
||||||
|
@ -272,22 +272,6 @@ for ((n = 0; n < ${#mountPoints[*]}; n++)); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# If this is a live-CD/DVD, then union-mount a tmpfs on top of the
|
|
||||||
# original root.
|
|
||||||
if test -n "@isLiveCD@"; then
|
|
||||||
mkdir /mnt-root-tmpfs
|
|
||||||
mount -t tmpfs -o "mode=755" none /mnt-root-tmpfs
|
|
||||||
mkdir /mnt-root-union
|
|
||||||
mount -t aufs -o dirs=/mnt-root-tmpfs=rw:$targetRoot=ro none /mnt-root-union
|
|
||||||
targetRoot=/mnt-root-union
|
|
||||||
|
|
||||||
mkdir /mnt-store-tmpfs
|
|
||||||
mount -t tmpfs -o "mode=755" none /mnt-store-tmpfs
|
|
||||||
mkdir -p $targetRoot/nix/store
|
|
||||||
mount -t aufs -o dirs=/mnt-store-tmpfs=rw:/mnt-root/nix/store=ro none /mnt-root-union/nix/store
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
@postMountCommands@
|
@postMountCommands@
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,16 +11,6 @@ let
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
boot.isLiveCD = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "
|
|
||||||
If set to true, the root device will be mounted read-only and
|
|
||||||
a ramdisk will be mounted on top of it using unionfs to
|
|
||||||
provide a writable root. This is used for the NixOS
|
|
||||||
Live-CD/DVD.
|
|
||||||
";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.resumeDevice = mkOption {
|
boot.resumeDevice = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "0:0";
|
example = "0:0";
|
||||||
@ -277,7 +267,7 @@ let
|
|||||||
|
|
||||||
inherit udevConf extraUtils;
|
inherit udevConf extraUtils;
|
||||||
|
|
||||||
inherit (config.boot) isLiveCD resumeDevice;
|
inherit (config.boot) resumeDevice;
|
||||||
|
|
||||||
inherit (config.boot.initrd) checkJournalingFS
|
inherit (config.boot.initrd) checkJournalingFS
|
||||||
postDeviceCommands postMountCommands kernelModules;
|
postDeviceCommands postMountCommands kernelModules;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user