PDA

View Full Version : Problem mutli-OS booting with Lilo



Bidi
01-05-2005, 08:48 PM
I'll got ahead and go right to the point. I have 2 HDs, hda and hdb. HDA has 3 partitions: hda1 (knoppix), hda2 (swap), hda3 (free). On HDB there's hdb1 (DSL) and hdb2 (FreeDOS). For a while I was using HDB as the main HD on the computer, and I was using Lilo to dual boot DSL and FreeDOS. NOW, I installed a new HD (current HDA) with Knoppix on it, and am using HDB as a slave.

I configured lilo.conf and ran "lilo" and got the follow error message:

Fatal: First sector of /dev/hdb1 doesn't have a valid boot signature

So I went ahead and took DSL from lilo.conf and just ran it with FreeDOS. Lilo ran configuration just fine and said it added FreeDOS. So now I loading FreeDOS and got another error:

Error 0x07

What's going on? I had Lilo installed on HDB, so i reinstalled DSL on HDB1 and this time chose not run mkliloboot. Still didn't work. So what am I doing wrong?

Harry Kuhman
01-05-2005, 09:22 PM
What's going on? ...
I'm far from a lilo expert and can't directly answer your problem with it. But my understanding is that grub might be a better choice han lilo for this. And much much better would be to use a boot manager like XOSL (http://www2.arnes.si/~fkomar/xosl.org/) or Smart Boot Manager (http://btmgr.webframe.org/). These programs are ideal for mutil-boot systems and will let you manage a large number of different installed OS's.

XOSL is a bit larger. It has a nicer graphical menu structure. It's overall more powerful. It includes Ranish Partition manager built right. It's a bit more complex to set up but easy enough if you can follow instructions and you have a floppy drive on the system (for saving some backup stuff).

Smart Boot Manager is smaller and simpler. Text based menu (like old style DOS menus), no partition manager, less feature rich. It's somewhat easier to set up, not quite as easy to use.

I like XOSL and have it on several of my systems but have used Smart Boot Manager after seeing it mentioned here and have installed it on one of my test machines.

With either of these programs you would install them as what the BIOS runs when booting. You would install LILO on the partition of the Linux that you are installing. You might still have to reinstall lilo and edit a configuration file when you change hda into hdb, but normally you will not have to edit or reinstall lilo every time you change or add an OS (although I think you would have to do this if you upgrade a kernel). Again, see grub for something to replace lilo with that is a bit smarter and can do more of this for you. See the above programs for a full feature multi-boot solution.

garyng
01-05-2005, 09:55 PM
My understanding of SBM and the like is that they are good multi-partition boot manager(thus sit in the MBR of a HD), meaning each partition would have its own boot sector(LILO/GRUB/NT etc.). The only thing I don't like it is that it use track 0(sector 1+) to store itself, and they sometimes step on each others feet.

Harry Kuhman
01-05-2005, 11:03 PM
My understanding of SBM and the like is that they are good multi-partition boot manager(thus sit in the MBR of a HD), meaning each partition would have its own boot sector(LILO/GRUB/NT etc.).
Yes, that is correct.


The only thing I don't like it is that it use track 0(sector 1+) to store itself, and they sometimes step on each others feet.
I'm not sure about SBM, I haven't used it enough to be sure. But I have it on a test system with SBM on the MBR and both Win98 and Debain (with lilo or grub, I forget which, installed to the Linux partition) and it works just as expected. You have to make SBM do a rescan to see the new partition (not obvious unless you read the instructions, and who does that?), but it worked well for me for a win/linux multi-boot system.

XOSL plays a lneat game to make sure it doesn't get messed up. I mentioned that you should have a floppy drive available. At one point in the install XOSL writes a floppy for you (be sure that you give it a formatted empty floppy that does not have a bootable system hidden on it - just a nice empty floppy with no bad sectors). The you can go ahead and install any operating system that you want. When a Linux system asks, you should install the Linux boot loader in the Linux partition. But if any OS gets nasty and overwrites the MBR without asking (for example, Windows), no problem. Rather than cursing that it stepped on XOSL's feet, you just use the floppy that you made to put back the XOSL system as god wants it. So that planned for OS's that try to step on your feet.

By the way, SBM lives in the boot track and needs no extra space. XOSL is larger, it gets installed in the MBR but part needs to be installed elsewhere. They author recommends storing it in the Windows partition, but it can be installed in it's own tiny partition too. I like and use the tiny xosl partition technique, because I frequently rewrite my Win partition with different "ghost" images and don't want to risk wipeing out any of my XOSl changes when I reload a backup of the partition.

I really think you'll be happy if you try XOSL. If not, no real harm done, you can delete the XOSL partition and user Lilo, Grub or Fdisk /MBR to put the master boot record back the way that you want it, and you'll have a little bit more experience working with partitions and the MBR stuff, which is always worth knowing.

Oh by the way, another nice thing about XOSL is that you can add menu entried to boot from CD (any CD drive) and/or floppy (again, any floppy, such as Drive B). Then you set your BIOS to boot from the hard drive first and never have to change it. You boot into the XOSL menu and from there if you want to boot a CD or floppy you can, but it will be a deliberate choice (you should never end up running one by accident or infecting your system with a virus that is spread on the floppy boot sector [Michelangelo, Stoned.Michelangelo, ...]) Lots of other nice little features too, like the ability to hide one or more partitions from any OS when you boot. So if you don't want the Linux user to even see the XP NTFS partition, it's easy to make that happen. Or some Linux OSs could see and share a partition but you could still conceal it from other Linux OSs that you boot. Each linus could be hidden from the others, if you want, to be sure the different flavors of Linux don't "step on each other's toes".

garyng
01-06-2005, 01:04 AM
My limited experience with SBM does tell me that it use track 0, just like XOSL or even NT boot loader(if memory serve). No boot loader can be fitted into 512 byte(sector 0) completely other than DOS(which just load and jump to the active partition) or LILO(which jump to its on disk image, thus moving the file needs reinstallation) or GRUB(again jump to on disk stage2 which needs reinstallation when moved).

When I said steps on each other's feet, I mean this. SBM could step on NT boot loader for example or GRUB stage 1.5.

Just mention that so people know the consequence.

Bidi
01-06-2005, 01:55 AM
Is there anyway I can get this done with Lilo? I really don't want to go out and get a new boot loader, I just recently learned Lilo pretty well to the point that I can mod it. I tried getting XOSL and appearantly it can only be installed using DOS, if I'm wrong there can anyone send me a link that explains how to do it in Linux? Like I said, I can't even get to my FreeDOS partition, let alone run anything on it.

garyng
01-06-2005, 06:16 AM
If you fail to boot freedos, it is a problem of it, not LILO as LILO again just chain load it and pass control to it. Most boot sector code breaks if you change the drive configure, like what you do, from primary to secondary. In old PC BIOS term, the drive changed from 0x80 to 0x81 or something like that. You need to reinstall the freedos boot sector again.

If LILO can boot linux, it means it is working. Anything else(non-linux) is just chain loading. Even GRUB or any other boot loader is like that.

Bidi
01-06-2005, 10:34 PM
Yeah, I'm pretty sure the problem is going from primary to seconadary HD. So is there anyway around this problem? I'll reinstall FreeDOS and DSL on HDB, but will I have to do anything else to make is work?

CrashedAgain
01-06-2005, 11:40 PM
I configured lilo.conf and ran "lilo" and got the follow error message:

Fatal: First sector of /dev/hdb1 doesn't have a valid boot signature



Please post your lilo.conf.

shah
01-07-2005, 02:30 AM
I don't know about Lilo........but in Grub you have an option to use "map" command
ex:
title FreeDos
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

I found that lilo too can use "map" command but as "map-drive"
ex:
other=/dev/hdb1
label="FreeDos"
table=/dev/hdb
map-drive=0x80
to=0x81
map-drive=0x81
to=0x80

:D