PATCH: Select root device
Okay, for those with the luxury of having two floppy drives or a hard disk, here's a patch that will let you select the root device during kernel configuration.
Here's the output of 'cvs diff': (mind email client wrap)
Index: Documentation/Configure.help
===================================================================
RCS file: /cvsroot/elks/elks/Documentation/Configure.help,v retrieving revision 1.40
diff -r1.40 Configure.help
588a589,610
Quoted 14 lines
# Root device select
# ~~~~~~~~~~~~~~~~~~Selecting the root filesystem device
CONFIG_ROOTDEV_FD0
Once the kernel has loaded, it will look for the root filesystem to boot the rest of the system (drivers, shells, etc.)
You have the following options:
/dev/fd0
The first floppy drive. If the kernel has been loaded from that drive, the drive is empty, or the disk in the drive doesn't contain a MINIX filesystem, the kernel will wait and prompt you to insert a root disk.
Quoted 8 lines
/dev/fd1
Once the kernel has loaded, it will look for the root filesystem on the second floppy drive.
/dev/bda1
Once the kernel has loaded, it will look for the root filesystem on the first primary partition of the first hard disk.
Index: arch/i86/boot/bootsect.S
===================================================================
RCS file: /cvsroot/elks/elks/arch/i86/boot/bootsect.S,v retrieving revision 1.4
diff -r1.4 bootsect.S
45c45
< ROOT_DEV = 0
---
Quoted 1 line
!
ROOT_DEV= 0
529c529
< .word ROOT_DEV
---
Quoted 1 line
.word ROOTDEV
Index: arch/i86/drivers/block/Config.in
===================================================================
RCS file: /cvsroot/elks/elks/arch/i86/drivers/block/Config.in,v retrieving revision 1.10
diff -r1.10 Config.in
54a55,60
Quoted 6 lines
comment 'Root location'
choice 'is the root device' \
"/dev/fd0 CONFIG_ROOTDEV_FD0 \
/dev/fd1 CONFIG_ROOTDEV_FD1 \
/dev/bda1 CONFIG_ROOTDEV_BDA1" /dev/fd0Index: arch/i86/tools/build.c
===================================================================
RCS file: /cvsroot/elks/elks/arch/i86/tools/build.c,v retrieving revision 1.9
diff -r1.9 build.c
147a148,151
Quoted 4 lines
#if ROOTDEV major_root = ROOTDEV >> 8; minor_root = ROOTDEV & 0xff;#else
149a154
Quoted 1 line
#endif
151c156
< fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
---
Quoted 1 line
fprintf(stderr, "Root device is (%d, %hhu)\n",
major_root,
minor_root);
Index: include/linuxmt/config.h
===================================================================
RCS file: /cvsroot/elks/elks/include/linuxmt/config.h,v retrieving revision 1.14
diff -r1.14 config.h
9a10,29
Quoted 12 lines
#ifdef
CONFIG_ROOTDEV_FD0
#define ROOTDEV0x0380
#endif#ifdef
CONFIG_ROOTDEV_FD1
#define ROOTDEV0x03c0
#endif#ifdef
CONFIG_ROOTDEV_RAM
#define ROOTDEV0x0100
#endif
Quoted 8 lines
#ifdef
CONFIG_ROOTDEV_BDA1
#define ROOTDEV0x0301
#endif#ifndef ROOTDEV
#define ROOTDEV0x0380
#endif
17a38
Quoted 1 line
#ifndef
CONFIG_ROOTDEV
Signature · 1 line
Richard Wallman