* Some hacks to support running NixOS on Amazon EC2 (and other hosting

environment where you don't get to run stage 1 of the boot).

svn path=/nixos/trunk/; revision=19579
This commit is contained in:
Eelco Dolstra 2010-01-20 18:06:33 +00:00
parent 8a6346e477
commit 6d21e00776

View File

@ -3,6 +3,11 @@
# !!! copied from stage 1; remove duplication
# If no `systemConfig' parameter is specified on the kernel command
# line, use `/system' as a fallback.
systemConfig=/system
# Print a greeting.
echo
echo -e "\e[1;32m<<< NixOS Stage 2 >>>\e[0m"
@ -24,6 +29,13 @@ setPath() {
setPath "@path@"
# Normally, stage 1 mounts the root filesystem read/writable.
# However, in some environments (such as Amazon EC2), stage 2 is
# executed directly, and the root is read-only. So make it writable
# here.
mount -n -o remount,rw none /
# Mount special file systems.
mkdir -m 0755 -p /etc
test -e /etc/fstab || touch /etc/fstab # to shut up mount