Messages in this thread Patch in this message | | | Date | Wed, 19 Jul 2000 23:24:46 +0200 | From | Christian Zander <> | Subject | [: prompt_rootdisk= patch] |
| |
----- Forwarded message from Russell Dill <russ@rcment.net> -----
Date: Wed, 19 Jul 2000 14:20:56 -0700 From: Russell Dill <russ@rcment.net> To: phoenix@minion.de Subject: prompt_rootdisk= patch
I ran into a problem trying to boot simple minix floppies, it always wanted a second disk, even though everything I had easily fit on one. I didn't want to use a ramdisk, because I was doing a simple memory (along with other things that required the use of the kernel). The VFS: Insert root floppy and press ENTER wasn't acceptable to me because I wanted the disks to run unattended. I made a quick patch that adds prompt_rootdisk= to the kernel command line. The default value is 1, which is the current behavior.
I think the option makes logical sense and I don't see any cons to adding it to the linux kernel.
Russ Dill Russ.Dill@asu.edu
anyway, here is the diff, its against a slightly patched 2.2.16, so there may be a few offsets:
--- linux/fs/super.c.russ Tue Jul 18 15:21:03 2000 +++ linux/fs/super.c Tue Jul 18 15:41:19 2000 @@ -1178,6 +1178,7 @@ #ifdef CONFIG_BLK_DEV_RAM extern int rd_doload; #endif + extern root_prompt; floppy_eject(); #ifndef CONFIG_BLK_DEV_RAM printk(KERN_NOTICE "(Warning, this kernel has no ramdisk support)\n"); @@ -1187,7 +1188,7 @@ rd_load_secondary(); else #endif - { + if (root_prompt) { printk(KERN_NOTICE "VFS: Insert root floppy and press ENTER\n"); wait_for_keypress(); } --- linux/init/main.c.russ Tue Jul 18 15:21:48 2000 +++ linux/init/main.c Tue Jul 18 15:40:58 2000 @@ -295,6 +295,7 @@ extern int initrd_archive; #endif #endif CONFIG_BLK_DEV_RAM +static void prompt_rootdisk(char *str, int *ints); #ifdef CONFIG_ISDN_DRV_ICN extern void icn_setup(char *str, int *ints); #endif @@ -431,6 +432,8 @@ #endif #endif +int root_prompt = 1; /* 1 = prompt for root disk, 0 = don't prompt */ + int root_mountflags = MS_RDONLY; char *execute_command = NULL; @@ -744,6 +747,8 @@ #endif #endif + { "prompt_rootdisk=", prompt_rootdisk }, + #ifdef CONFIG_CTC { "ctc=", ctc_setup } , #endif @@ -1151,6 +1156,12 @@ rd_size = ints[1]; } #endif + +static void __init prompt_rootdisk(char *str, int *ints) +{ + if (ints[0] > 0 && ints[1] >= 0) + root_prompt = ints[1] & 1; +} static int __init checksetup(char *line) { --- linux/Documentation/kernel-parameters.txt.russ Tue Jul 18 15:52:58 2000 +++ linux/Documentation/kernel-parameters.txt Tue Jul 18 15:51:15 2000 @@ -291,6 +291,9 @@ prompt_ramdisk= [RAM] Whether to prompt for ramdisk before loading its contents into memory. + prompt_rootdisk= [HW] Whether to prompt for rootdisk before mounting + it (option only applies when booting from floppy). + pt. [PARIDE] ramdisk= [RAM] ----- End forwarded message -----
-------------------------------------------------------------- Christian Zander ** Nöckersberg 76 ** 45257 Essen ** Germany email: phoenix@minion.de * www: www.minion.de * icq: 5322926 --------------------------------------------------------------[unhandled content-type:application/pgp-signature] | |