diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh
index adab3bf5d06d..0ce9f90a54ef 100644
--- a/modules/system/boot/stage-2-init.sh
+++ b/modules/system/boot/stage-2-init.sh
@@ -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