PDA

View Full Version : Advanced Lilo Questions



markschmid
01-18-2004, 03:58 PM
Hi all,

I have Windows 98SE and Knoppix on
one HD and Windows 2000 on another HD.
I installed Knoppix last with Lilo in
the MBR.

On startup I get the Lilo boot manager
in which I can choose to load Linux,
the old Windows-NT boot manager or either
Windows 98 or Windows 2000 directly.


Question #1:

When I select the Windows-NT boot manager from
the Lilo menu, I can load Windows 98 and 2000 normally.
But when I select the partitions directly where
Windows 98 and 2000 are located with Lilo,
the screen just goes black, but nothing happens.
It seems as if Lilo is unable to load Windows directly...

What causes this and how can it be fixed?
I edited the lilo.conf file in the "/etc/"
directory but found no instructions for this
problem.


Question #2:

The Windows-NT bootloader was in the MBR of hard disk 1.
Then I installed Knoppix and Lilo also to the MBR of HD 1.
Now on booting, I get Lilo and there can select
a partition which loads the original Windows-NT bootloader,
which still works (luckily, as I can't boot Windows with Lilo).

How is this possible?
Wasn't the Windows-NT bootloader in the MBR overwritten or
deleted when I installed Lilo also to the MBR???
Are both bootloaders resident in the MBR now???

Thanks for all replies!!,
Mark

baldyeti
01-18-2004, 10:20 PM
One can only multi-boot win9x/ME and NT/XP when using the NT boot loader. So you need to branch to it from lilo (like you currently do), or alternatively you could use the NT boot loader as your primary BL with a knoppix entry. How to add a linux entry to boot.ini is well documented (just search google for say "linux NT boot loader").

markschmid
01-23-2004, 11:07 PM
Hi baldyeti,

Thanks for your reply!

I figured out some questions on my own now:

Both Lilo is required to boot Linux, always AND the WinNT Bootloader is required to boot Windows 2000 or 98, always, when you have both.
You can only configure Lilo or the Windows bootloader so that no menu is displayed and that they boot their OS without hesitation, which gives the impression, that Linux or Windows could be booted without any boot loader (as in single OS setups). Anytime you load an OS, this is done by a bootloader. Sometimes they just don't show a menu or anything else and don't wait for a user input.

I think both Lilo AND the Windows NT bootloader can be written to the MBR at the same time without overwriting one another. Don't ask me how, that's just how it appears to be.

Greetings,
Mark

baldyeti
01-23-2004, 11:40 PM
You got it mostly correct :D Just because one does not multi-boot does not mean no boot-loader is needed. With a single OS, the boot loader does not need to display any menu and can swiftly proceed without even being noticed.

The only thing I'd like to clarify is that by definition no two loaders can take control of the MBR. The Master Boot Record is the one and only first physical 512-byte block at the start of any HD. What is possible - and rather common, is that two boot loaders can be chained. When you copy a lilo boot record from some linux root filesystem to a windows partition and create an entry in boot.ini for that smallish 1-block file, you're chanining lilo to the NT boot loader. When you create an entry for windows in /etc/lilo.conf, you're branching from lilo to the NT bl.

Cheers,

--bald

markschmid
01-25-2004, 02:29 AM
Hi baldyeti,

Then how do you explain that I first had the Windows-NT boot loader in the MBR for WIn 98 and 2000, then installed Knoppix with Lilo in the MBR aswell and then the system would boot with Lilo which gave me the choice to load the NT-bootloader which still worked?
Obviously the NT bootloader in the MBR was not overwritten when Lilo was written to the MBR too, so what happened?

Greetings,
Mark

baldyeti
01-31-2004, 10:46 AM
The NT (or DOS for that matter) MBR just checks which (primary) partition is marked active, and branches there. The boot sector at the start of said partition (generally hda1 when windows was first installed) then launches ntldr, which presents you a menu built from the entries present in the boot.ini file. When lilo is installed to mbr, choosing a windows entry does much the same and jumps to the windows partition (it does not have to be marked active in this case) and things proceed as explained above. Remember the mbr is a mere 512 bytes chunk of code which cannot do much more than appropriately launch a more capable loader (ntldr in the case of NT/XP, stage2 in the case of grub...).

Besserwisser
04-11-2004, 12:20 AM
One can only multi-boot win9x/ME and NT/XP when using the NT boot loader.

I don't think this is correct. As far as I know Lilo can boot all of them. I recently had a lilo boot menu with entries for Knoppix, Win2k and win98.

so long

garyng
04-11-2004, 08:53 AM
Hi baldyeti,

Then how do you explain that I first had the Windows-NT boot loader in the MBR for WIn 98 and 2000, then installed Knoppix with Lilo in the MBR aswell and then the system would boot with Lilo which gave me the choice to load the NT-bootloader which still worked?
Obviously the NT bootloader in the MBR was not overwritten when Lilo was written to the MBR too, so what happened?

Greetings,
Mark
Either Lilo saved it or the NT bootloader is not installed at MBR but just the BR of its own partition. Each disk has one and only one MBR, but each partition has its own BR. In the old days, the MBR is pretty simple, it reads the partition table and find out which is the current 'Active' partition and chain load it. This seems to be what happened in your case, lilo/grub just replace the dumb MBR boot loader and chain load to the NT boot loader of its own partition. In fact, NT has put 2 identical BR, one at sector 0, one at sector 6 so even if you overwrite the NT boot loader(be it MBR or not), it can still be chained boot by going to sector 6.

garyng
04-11-2004, 08:55 AM
One can only multi-boot win9x/ME and NT/XP when using the NT boot loader.

I don't think this is correct. As far as I know Lilo can boot all of them. I recently had a lilo boot menu with entries for Knoppix, Win2k and win98.

so long
If w2k and 98 is installed in different drive, you are right. Otherwise, baldyeti is write as the 98 boot record would have been saved to the c:\ and replaced by NT's. So there is no way lilo would be able to see it. But 2 level chaining is possible.

baldyeti
04-11-2004, 11:30 PM
If w2k and 98 is installed in different drive, you are right. Otherwise, baldyeti is write as the 98 boot record would have been saved to the c:\ and replaced by NT's.
Erh ... actually it seems I was wrong. I'd swear I had tried that in the past but one can chain to the hidden win9x bootsector in addition to the NT bootloader: (assuming hda1 is your C: fat)
other=/mnt/hda1/bootsect.dos
label=win98

other=/mnt/hda1
label=win2k

Perhaps this capability was introduced after I tried long ago; I've been fiddling with all this since way too long!-)
All in all this is good news since it means lilo can be used as sole boot loader when needed.

Sorry for the confusion,

Cheers,

--bald.