* Using lilo to boot off any drive ...
@ 2003-01-10 21:00 Manish Lachwani
2003-01-10 21:20 ` Randy.Dunlap
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Manish Lachwani @ 2003-01-10 21:00 UTC (permalink / raw)
To: linux-kernel
In my current setup, I am having 12 ide drives
connected to a 3ware controller labelled sda to sdl.
Suppose sde is the drive we want the system to boot
off. What I do is modify the lilo.conf on sda, sdb,
sdc etc. to have the "boot" entry point to /dev/sde.
This way when the controller is transferred to lilo on
sda, it will load the kernel from sde.
consider this. If sda is bad and is not exported to
the OS or is not detected in the BIOS due to a bad
cable etc. In this scenario, the OS mappings would
change. Now, sdb will become sda. The lilo.conf on sdb
(now sda) would have "boot" parameter still point to
sde, which is now sdd.
When the control is transferred to lilo on sda (sdb
actually), is there a way for me to boot off sdd now
(which was previously sde)? I mean, is there any way
that lilo can load the appropriate kernel image?
One of the ways I was thinking of was to modify the
lilo sources to scan for drive serial# and we boot off
that drive for which the serial# matches. But, does
anyone have a better alternative?
Thanks
Manish
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Using lilo to boot off any drive ... 2003-01-10 21:00 Using lilo to boot off any drive Manish Lachwani @ 2003-01-10 21:20 ` Randy.Dunlap 2003-01-10 21:28 ` Richard B. Johnson 2003-01-12 22:57 ` Werner Almesberger 2 siblings, 0 replies; 7+ messages in thread From: Randy.Dunlap @ 2003-01-10 21:20 UTC (permalink / raw) To: Manish Lachwani; +Cc: linux-kernel On Fri, 10 Jan 2003, Manish Lachwani wrote: | In my current setup, I am having 12 ide drives | connected to a 3ware controller labelled sda to sdl. | Suppose sde is the drive we want the system to boot | off. What I do is modify the lilo.conf on sda, sdb, | sdc etc. to have the "boot" entry point to /dev/sde. | | This way when the controller is transferred to lilo on | sda, it will load the kernel from sde. | | consider this. If sda is bad and is not exported to | the OS or is not detected in the BIOS due to a bad | cable etc. In this scenario, the OS mappings would | change. Now, sdb will become sda. The lilo.conf on sdb | (now sda) would have "boot" parameter still point to | sde, which is now sdd. | | When the control is transferred to lilo on sda (sdb | actually), is there a way for me to boot off sdd now | (which was previously sde)? I mean, is there any way | that lilo can load the appropriate kernel image? | | One of the ways I was thinking of was to modify the | lilo sources to scan for drive serial# and we boot off | that drive for which the serial# matches. But, does | anyone have a better alternative? I'm missing some info about how a BIOS addresses a large number of IDE drives. I know about the basic 0x80 = hda (or C:) and 0x81 = hdb. Is this still used? Is it extended for even many more drives? -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using lilo to boot off any drive ... 2003-01-10 21:00 Using lilo to boot off any drive Manish Lachwani 2003-01-10 21:20 ` Randy.Dunlap @ 2003-01-10 21:28 ` Richard B. Johnson 2003-01-10 21:39 ` Manish Lachwani 2003-01-12 22:57 ` Werner Almesberger 2 siblings, 1 reply; 7+ messages in thread From: Richard B. Johnson @ 2003-01-10 21:28 UTC (permalink / raw) To: Manish Lachwani; +Cc: linux-kernel On Fri, 10 Jan 2003, Manish Lachwani wrote: > In my current setup, I am having 12 ide drives > connected to a 3ware controller labelled sda to sdl. > Suppose sde is the drive we want the system to boot > off. What I do is modify the lilo.conf on sda, sdb, > sdc etc. to have the "boot" entry point to /dev/sde. > > This way when the controller is transferred to lilo on > sda, it will load the kernel from sde. > > consider this. If sda is bad and is not exported to > the OS or is not detected in the BIOS due to a bad > cable etc. In this scenario, the OS mappings would > change. Now, sdb will become sda. The lilo.conf on sdb > (now sda) would have "boot" parameter still point to > sde, which is now sdd. > > When the control is transferred to lilo on sda (sdb > actually), is there a way for me to boot off sdd now > (which was previously sde)? I mean, is there any way > that lilo can load the appropriate kernel image? > > One of the ways I was thinking of was to modify the > lilo sources to scan for drive serial# and we boot off > that drive for which the serial# matches. But, does > anyone have a better alternative? > > Thanks > Manish > When LILO boots, there is no file-system (anywhere)! The boot-record of LILO contains a table which points to the contents of the map file. This file exist only when LILO is being configured, i.e., when Linux is up with a mounted file-system. The contents of this file describe the location of all of the pieces of the operating system, the boot message, and any RAM-disk data. All of these pieces, plus the data of this file, itself, must be accessible from the INT 0x13 disk software interrupt when the machine is being booted. Since these pieces are known just as: BIOS device; device_offset; data_length; ... not as file-system directory entries that can be "scanned for", you will not be able to substitute anything. LILO recommends that all of the boot components be put on one physical drive so you don't have problems with controllers or the BIOS rearranging things. If you want to perform a "smart" boot, then you boot an initial RAM disk. This allows you to configure the system in way you want, rearranging disk-drives, even mounting network file-systems for the root file-system or even falling-back to alternative file-systems when certain ones are off-line. Cheers, Dick Johnson Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using lilo to boot off any drive ... 2003-01-10 21:28 ` Richard B. Johnson @ 2003-01-10 21:39 ` Manish Lachwani 2003-01-10 21:53 ` Richard B. Johnson 0 siblings, 1 reply; 7+ messages in thread From: Manish Lachwani @ 2003-01-10 21:39 UTC (permalink / raw) To: root; +Cc: linux-kernel Richard, Thanks for the response. Even if I can get the map information using the INT 0x13h disk interrupt, I would still need some way of knowing if sda has indeed failed. What I am thinking of if it is possible to make the "boot" option in lilo.conf variable. Or better, introduce a serial# option and the serial# can be scanned for on startup. Or make use of a lun# option. I was also thinking if BIOS id's for the disks can be used here. Are BIOS id's assigned for all drives? Thanks Manish --- "Richard B. Johnson" <root@chaos.analogic.com> wrote: > On Fri, 10 Jan 2003, Manish Lachwani wrote: > > > In my current setup, I am having 12 ide drives > > connected to a 3ware controller labelled sda to > sdl. > > Suppose sde is the drive we want the system to > boot > > off. What I do is modify the lilo.conf on sda, > sdb, > > sdc etc. to have the "boot" entry point to > /dev/sde. > > > > This way when the controller is transferred to > lilo on > > sda, it will load the kernel from sde. > > > > consider this. If sda is bad and is not exported > to > > the OS or is not detected in the BIOS due to a bad > > cable etc. In this scenario, the OS mappings would > > change. Now, sdb will become sda. The lilo.conf on > sdb > > (now sda) would have "boot" parameter still point > to > > sde, which is now sdd. > > > > When the control is transferred to lilo on sda > (sdb > > actually), is there a way for me to boot off sdd > now > > (which was previously sde)? I mean, is there any > way > > that lilo can load the appropriate kernel image? > > > > One of the ways I was thinking of was to modify > the > > lilo sources to scan for drive serial# and we boot > off > > that drive for which the serial# matches. But, > does > > anyone have a better alternative? > > > > Thanks > > Manish > > > > When LILO boots, there is no file-system (anywhere)! > The > boot-record of LILO contains a table which points to > the > contents of the map file. This file exist only when > LILO is being configured, i.e., when Linux is up > with a > mounted file-system. The contents of this file > describe > the location of all of the pieces of the operating > system, > the boot message, and any RAM-disk data. All of > these > pieces, plus the data of this file, itself, must be > accessible > from the INT 0x13 disk software interrupt when the > machine > is being booted. > > Since these pieces are known just as: > BIOS device; > device_offset; > data_length; > > ... not as file-system directory entries that can be > "scanned for", > you will not be able to substitute anything. LILO > recommends that > all of the boot components be put on one physical > drive so you > don't have problems with controllers or the BIOS > rearranging > things. > > If you want to perform a "smart" boot, then you boot > an initial > RAM disk. This allows you to configure the system in > way you > want, rearranging disk-drives, even mounting network > file-systems > for the root file-system or even falling-back to > alternative > file-systems when certain ones are off-line. > > > > Cheers, > Dick Johnson > Penguin : Linux version 2.4.18 on an i686 machine > (797.90 BogoMips). > Why is the government concerned about the lunatic > fringe? Think about it. > > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using lilo to boot off any drive ... 2003-01-10 21:39 ` Manish Lachwani @ 2003-01-10 21:53 ` Richard B. Johnson 0 siblings, 0 replies; 7+ messages in thread From: Richard B. Johnson @ 2003-01-10 21:53 UTC (permalink / raw) To: Manish Lachwani; +Cc: linux-kernel On Fri, 10 Jan 2003, Manish Lachwani wrote: > Richard, > > Thanks for the response. > > Even if I can get the map information using the INT > 0x13h disk interrupt, I would still need some way of > knowing if sda has indeed failed. > > What I am thinking of if it is possible to make the > "boot" option in lilo.conf variable. Or better, > introduce a serial# option and the serial# can be > scanned for on startup. Or make use of a lun# option. > > I was also thinking if BIOS id's for the disks can be > used here. Are BIOS id's assigned for all drives? > > Thanks > Manish It's a big "depends". Some SCSI controllers will assign BIOS id's for everything found on the bus, starting at 0x80 for an ID. Others don't. In fact, some will assign a CD/ROM to 0x00 (Drive A) even if it doesn't contain a boot record. When that assignment occurs, it's space in the boot-order gets filled in with the next available drive. It's a mess and you can't count on anything except that 0x80 will be lowest numbered "fixed-disk" drive found. That's why you should boot from it, even if the BIOS allows you to boot from others. Cheers, Dick Johnson Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using lilo to boot off any drive ... 2003-01-10 21:00 Using lilo to boot off any drive Manish Lachwani 2003-01-10 21:20 ` Randy.Dunlap 2003-01-10 21:28 ` Richard B. Johnson @ 2003-01-12 22:57 ` Werner Almesberger 2003-01-13 1:17 ` Randy Dunlap 2 siblings, 1 reply; 7+ messages in thread From: Werner Almesberger @ 2003-01-12 22:57 UTC (permalink / raw) To: Manish Lachwani; +Cc: linux-kernel Manish Lachwani wrote: > When the control is transferred to lilo on sda (sdb > actually), is there a way for me to boot off sdd now > (which was previously sde)? I mean, is there any way > that lilo can load the appropriate kernel image? You could have two independent installations of LILO, one on sda, and one on sdb, where the latter accesses no files from sda and defines the disk numbers (for the BIOS) the way they look when sda is removed. Then, you probably want to rename /sbin/lilo to /sbin/lilo.bin or such, and write a script /sbin/lilo that generates the modified lilo.conf files, and updates both instances of LILO. - Werner -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net / /_http://www.almesberger.net/____________________________________________/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using lilo to boot off any drive ... 2003-01-12 22:57 ` Werner Almesberger @ 2003-01-13 1:17 ` Randy Dunlap 0 siblings, 0 replies; 7+ messages in thread From: Randy Dunlap @ 2003-01-13 1:17 UTC (permalink / raw) To: wa; +Cc: m_lachwani, linux-kernel > Manish Lachwani wrote: >> When the control is transferred to lilo on sda (sdb >> actually), is there a way for me to boot off sdd now >> (which was previously sde)? I mean, is there any way >> that lilo can load the appropriate kernel image? > > You could have two independent installations of LILO, one on > sda, and one on sdb, where the latter accesses no files from > sda and defines the disk numbers (for the BIOS) the way they > look when sda is removed. > > Then, you probably want to rename /sbin/lilo to /sbin/lilo.bin > or such, and write a script /sbin/lilo that generates the > modified lilo.conf files, and updates both instances of LILO. This is probably too simplistic to be helpful..., but what I do is put a modified/stripped-down bootsect.S (512 bytes) on a floppy. I can (theoretically) tell that code which hard drive to boot from (like 0x80 or 0x81). I haven't tried it with more than 2 drives (don't have more than 2 drives). And I install LILO on each target boot drive. LILO complains a little bit, but it still works. ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-13 1:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-01-10 21:00 Using lilo to boot off any drive Manish Lachwani 2003-01-10 21:20 ` Randy.Dunlap 2003-01-10 21:28 ` Richard B. Johnson 2003-01-10 21:39 ` Manish Lachwani 2003-01-10 21:53 ` Richard B. Johnson 2003-01-12 22:57 ` Werner Almesberger 2003-01-13 1:17 ` Randy Dunlap
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.