From 15e3ec8dece69bdc892b303a71bf235b90e2fb91 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 30 May 2007 10:32:42 +0000 Subject: [PATCH] * Additional debug options for stage 1 (can be passed on the kernel command line): - debug1devices: drop into a shell after modules have been load and device nodes have been created. - debug1mounts: drop into a shell after file systems have been mounted. svn path=/nixos/trunk/; revision=8804 --- boot/boot-stage-1-init.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/boot/boot-stage-1-init.sh b/boot/boot-stage-1-init.sh index cd5311beeca8..391c24e7b3f3 100644 --- a/boot/boot-stage-1-init.sh +++ b/boot/boot-stage-1-init.sh @@ -45,9 +45,15 @@ for o in $(cat /proc/cmdline); do # Show each command. set -x ;; - debug1) + debug1) # stop right away fail ;; + debug1devices) # stop after loading modules and creating device nodes + debug1devices=1 + ;; + debug1mounts) # stop after mounting file systems + debug1mounts=1 + ;; esac done @@ -67,6 +73,8 @@ udevd --daemon udevtrigger udevsettle +if test -n "$debug1devices"; then fail; fi + # Function for mounting a file system. mountFS() { @@ -189,6 +197,8 @@ else fi +if test -n "$debug1mounts"; then fail; fi + # Start stage 2. # !!! Note: we can't use pivot_root here (the kernel gods have