diff options
author | Simon Rettberg | 2013-06-06 16:06:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-06-06 16:06:25 +0200 |
commit | f87d136c49d21655cd966fa5ab07a242eb794342 (patch) | |
tree | 1610b8123ac3e9e52fd8b59abcb2d11eecbf6a3d /remote/rootfs | |
parent | [vmchooser] put mount-var-lib in proper module, fix its PATH (diff) | |
parent | [rootfs-stage31] add debug in the kernel command line: use with 'debug=<level... (diff) | |
download | tm-scripts-f87d136c49d21655cd966fa5ab07a242eb794342.tar.gz tm-scripts-f87d136c49d21655cd966fa5ab07a242eb794342.tar.xz tm-scripts-f87d136c49d21655cd966fa5ab07a242eb794342.zip |
Merge branch 'master' of simonslx:openslx-ng/tm-scripts
Diffstat (limited to 'remote/rootfs')
-rwxr-xr-x | remote/rootfs/rootfs-stage31/data/init | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init index ee90cf15..bf11d9aa 100755 --- a/remote/rootfs/rootfs-stage31/data/init +++ b/remote/rootfs/rootfs-stage31/data/init @@ -15,7 +15,7 @@ # debug shell drop_shell() { [ $# -gt 0 ] && echo $@ - echo "Dropping debug shell. CTRL + D will continue booting." + echo "CTRL + D will continue booting." setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1' } @@ -49,8 +49,8 @@ read KCL < /proc/cmdline export KCL for opts in ${KCL}; do case ${opts} in - debug*) - DEBUG=1 ;; + debug=*) + DEBUG=${opts#debug=} ;; splash*) SPLASH=1 ;; ip=*) @@ -79,6 +79,8 @@ fi mkdir -p /dev/shm/union /dev/shm/uniontmp /rorootfs mount -n -t tmpfs none /dev/shm/uniontmp +[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell (before network)." + echo "Setup networking..." # Source script so the variables are still available to us . "/bin/setup_network" || echo "Error setting up network" @@ -93,7 +95,7 @@ else mount -t squashfs /mnt/*.sqfs /rorootfs || drop_shell "Problem mounting Squashfs." fi -[ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell." +[ $DEBUG -ge 3 ] && drop_shell "Requested Debug Shell: squashfs/nfs mounted, before aufs." echo "Building aufs..." mv /mnt/modprobing /dev/shm/uniontmp @@ -102,6 +104,8 @@ mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt || drop_shell "P mkdir -p /mnt/uniontmp /mnt/tmp mount -n --move /dev/shm/uniontmp /mnt/uniontmp || drop_shell "Problem moving uniontmp." +[ $DEBUG -ge 2 ] && drop_shell "Requested Debug Shell: after aufs'ing." + # create udev rule for nic we booted from cat > "/mnt/etc/udev/rules.d/70-net-boot-nic-name.rules" <<HEREEND SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$MAC", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" @@ -118,6 +122,8 @@ SLX_PXE_DNS='$DNS_SERVER' SLX_PXE_MAC='$BRIDGEMAC' HEREEND +[ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root." + for mnt in proc sys run ; do umount -n "$mnt" done |