diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-10-30 16:23:03 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-10-30 16:23:03 +0000 |
commit | 75e9df0c1b9af178b2911f7c81a142bc2b3392ea (patch) | |
tree | a6a631097dcf5a0be63503e074cc09e12e7dd537 /mdk-stage1 | |
parent | 631717f6192097f68b0bcc238edac862c3439622 (diff) | |
download | drakx-75e9df0c1b9af178b2911f7c81a142bc2b3392ea.tar drakx-75e9df0c1b9af178b2911f7c81a142bc2b3392ea.tar.gz drakx-75e9df0c1b9af178b2911f7c81a142bc2b3392ea.tar.bz2 drakx-75e9df0c1b9af178b2911f7c81a142bc2b3392ea.tar.xz drakx-75e9df0c1b9af178b2911f7c81a142bc2b3392ea.zip |
add debugstage1 option to help debugging when stage1 can't launch stage2
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/stage1.c | 3 | ||||
-rw-r--r-- | mdk-stage1/stage1.h | 2 | ||||
-rw-r--r-- | mdk-stage1/tools.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index f756bf052..739e3dfaa 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -536,6 +536,9 @@ int mandrake_move_post(void) return RETURN_ERROR; } + if (IS_DEBUGSTAGE1) + while (1); + log_message("move: pivot_rooting"); // trick so that kernel won't try to mount the root device when initrd exits if (scall((fd = open("/proc/sys/kernel/real-root-dev", O_WRONLY)) < 0, "open")) diff --git a/mdk-stage1/stage1.h b/mdk-stage1/stage1.h index 0b47b7b93..84d760cd9 100644 --- a/mdk-stage1/stage1.h +++ b/mdk-stage1/stage1.h @@ -37,6 +37,7 @@ extern char * stage2_kickstart; #define MODE_RESCUE (1 << 3) #define MODE_AUTOMATIC (1 << 4) #define MODE_LIVE (1 << 5) +#define MODE_DEBUGSTAGE1 (1 << 6) #define MODE_SPECIAL_STAGE2 (1 << 8) #define MODE_RAMDISK (1 << 9) #define MODE_CHANGEDISK (1 << 10) @@ -50,6 +51,7 @@ extern char * stage2_kickstart; #define IS_RESCUE (get_param(MODE_RESCUE)) #define IS_AUTOMATIC (get_param(MODE_AUTOMATIC)) #define IS_LIVE (get_param(MODE_LIVE)) +#define IS_DEBUGSTAGE1 (get_param(MODE_DEBUGSTAGE1)) #define IS_SPECIAL_STAGE2 (get_param(MODE_SPECIAL_STAGE2)) #define IS_RAMDISK (get_param(MODE_RAMDISK)) #define IS_CHANGEDISK (get_param(MODE_CHANGEDISK)) diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c index 58c9203df..7a2c0480f 100644 --- a/mdk-stage1/tools.c +++ b/mdk-stage1/tools.c @@ -95,6 +95,7 @@ void process_cmdline(void) if (!strcmp(name, "recovery")) set_param(MODE_RECOVERY); if (!strcmp(name, "special_stage2")) set_param(MODE_SPECIAL_STAGE2); if (!strcmp(name, "live")) set_param(MODE_LIVE); + if (!strcmp(name, "debugstage1")) set_param(MODE_DEBUGSTAGE1); if (!strcmp(name, "automatic")) { set_param(MODE_AUTOMATIC); grab_automatic_params(value); |