Jump to content

Lilo, MBR, weird dual boot issue


corticalhomunculus
 Share

Recommended Posts

If this type of thing has been covered before I apologize for the repeat, haven't found an answer yet...

 

I recently reformated my mandrake 10.1 "/" and installed mandriva in its place, while doing this i moved Lilo from the mbr of an old Win2k installation to a fresh one on a different drive.

My issue is that the 'fresh' win2k installation is no longer booting, somehow Lilo is booting the same win2k installation (the old one) from two different partitions. It is as if the new Lilo installation is reffering to the old Lilo installation on a different partition as to where it should look for windows...

 

Now, I assume if I could remove the old version of Lilo and put the windows MBR back in place then the 'new' Lilo would recognize that windows installation correctly and be able to boot it. Unfortunately the utilities to do this don't seem to offer an option as far as "where to find the Lilo installation to be removed" and it always points to the one I want to keep.

I could just shoot and ask questions later but I'm afraid I won't even be able to boot mandriva if something slips up.

Mind you these installations are spattered over three hard drives so It can be a little confusing in the case of "what is where", either that or booting from mandriva install cd is giving me different partition names than are listed in the normal UI partition tool.

 

a little confused here, sorry if that didn't make any sense.

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

What you have done is indeed confusing. So, do you have 2 wn2k installations? Would you describe what installation is on what drive? Use the windows nomenclature, if that is easier for you.

Link to comment
Share on other sites

First you need to find out where Windows exists for the one you want to run. So, which hard drive? Here is a sample of my lilo.conf from /etc directory:

 

default="linux"
boot=/dev/hda
map=/boot/map
keytable=/boot/uk.klt
menu-scheme=wb:bw:wb:bw
prompt
nowarn
timeout=100
message=/boot/message
image=/boot/vmlinuz
       label="linux"
       root=/dev/hda2
       initrd=/boot/initrd.img
       append="resume=/dev/hda6 splash=silent"
       vga=788
image=/boot/vmlinuz
       label="linux-nonfb"
       root=/dev/hda2
       initrd=/boot/initrd.img
       append="resume=/dev/hda6"
image=/boot/vmlinuz
       label="failsafe"
       root=/dev/hda2
       initrd=/boot/initrd.img
       append="failsafe resume=/dev/hda6"
other=/dev/hda1
       label="windows"
       table=/dev/hda

 

as you can see from the bottom, my installation is /dev/hda1. Now, if yours is not here, and is the old one, then you need to change this entry so that it points to the new installation. Let's assume for example, your new Windows installation is on hdb1 instead. So, change both lines so that it becomes:

 

other=/dev/hdb1
       label="windows"
       table=/dev/hdb

 

and that should do the trick. Do this within Linux, and then rerun the lilo command to update. If you are using sata drives, then yours will say sdxx, so sda1, sdb1, and so on. The same for SCSI drives.

Link to comment
Share on other sites

my setup is as follows:

hda (first hard drive)-Linux(mandriva) and where lilo is currently installed

hdb (second drive)-win2k (an old clunky installation)

hdc (third drive)-win2k (new, working version that won't boot)

 

 

 

Everything looks kosher in lilo.conf, the root and table paths are correct for every boot option. The windows installation that won't boot is on hdc1 (table hdc) and is listed correctly, but for some reason when it is selected in lilo it boots the hdb win2k installation. I used to have lilo installed on hdc (before I nuked "/" for mandrake 10.1 to make room for mandriva 2006) so I'm guessing the mbr from hdc is missing and lilo is finding some old link to hdb in there and presenting it as "win2k" regardless of which drive (hdb or hdc) it boots from.

My assumption is that the only way to fix this is to restore or replace the mbr from hdc but I can't think or find of any way to do that other than to nuke the partition and reinstall win2k...something which I had hoped to never have to do again (service packs oh joy!).

I'm sure this problem doesn't come up often so I'll just bite the bullet when I have a few hours to make a new windows installation work. Thanks for the help anyways, good to know what lilo.conf should look like for future reference.

Link to comment
Share on other sites

You will be better of physically changing the position of hdc and hda so that your new Windows is the first partition on the FIRST drive. Windows feels it is entitled to it and virtually demands it. Then use your Win disc to reset the mbr of that now first hard drive. You should now be able to easily boot straight in to your new windows.

Next move is to insert your Mandriva No.1 disc and do a "pretend upgrade" and when doing it use Grub instead of Lilo and when it asks where to install the Grub bootloader choose the MBR. In the final setting up of the Grub boot menu you will see both of your windows OSs listed and your new Win one will be shown as hda and your second Win one as hdb as well as your Mandriva one on hdc.

 

Let us know how you go in case you need further help.

 

Cheers. John.

Link to comment
Share on other sites

There are some issues to consider when connecting IDE/ATA drives to the PC: the main/fast hard disk shouldn't be connected on the same channel as ATAPI device (e.g. CDROM). Also in the old systems two drives on the same channel would work with the fastes mode of the slower drive. Luckily modern controllers use the so called Independent Master/Slave Device Timing and they run every drive in it's optimum mode.

 

If you have a cdrom as hdd I wouldn't swap hdc and hda drives as of course you're going to work with Mandriva, not Windows :)

 

As it was said already Windows feels belittled if it's not on the first hard drive and so doesn't want to boot (thus I would expect you shouldn't be able to boot Windows at all!?). But it is possible to rise a self estime of a poor guy to make it work. Unfortunately your self estime lowers at the very moment... There is a map command in grub that exchanges an order of hard dirves in BIOS so you don't have to do it physically. Of course you won't need to dupe Linux that way (you couldn't). Similar command shall exist in lilo too.

 

I don't expect your problems are caused in any way by MBR of hdc drive as lilo shouldn't need to access it at all. If you still have problems maybe you can attach your lilio.conf to the next post.

Link to comment
Share on other sites

win95 and 98 have to be in the 1st partition on the the master, but NT (I think), win2k and xp do not even have to be on the master

Correct, but the primary bootloader can cheat even 95/98, so that they think that they factly are primary and active. Look say at V-Com's "System Commander Deluxe" documentation about OS'es and the way they boot, it's really good documentation.

Link to comment
Share on other sites

correct...I should have said 9x must be installed 1st partition>master.

When I got a new hd (master), win98se became the first on the slave and still booted with the map command in grub, but for the sake of keeping it simple, 98%+ do not care to deal with or learn how to do something like that. Point is, you can't install it that way, and who is going to install then rearrange the config, when it's completely unnecesssary. If I remember correctly, the ntloader will not boot a 9x from anywhere but 1st>master........but this is off topic since we are talking about win2k. I do not know how to do it in lilo...I use grub, only.

Link to comment
Share on other sites

I'll give that a shot, thanks John...my understanding is that any NT version can be healthy on an extended partition as long as the bootloader is installed on the mbr of the same drive, have'nt gone back to my dual-boot tutorials yet though so I may be mistaken. (this is how mine used to be set up before things went awry). I'll have to take some time to fix my setup, no internet connection so I have to make sure I have all of my Win drivers and upgrades on cd before I start the process, but I'll be sure to post back and let you folks know how it turned out. I'm not in much of a hurry either way, I barely ever boot into windows and mandriva works just dandy.

 

A further question which was sparked: is there great advantage to using grub instead? I've never used it but imagine it's basically the same thing.

Link to comment
Share on other sites

A further question which was sparked: is there great advantage to using grub instead? I've never used it but imagine it's basically the same thing.

 

Grub has two advantages over LILO:

1. After doing any modifications to the Grub config ( /boot/grub/menu.lst ) you do NOT have to re-run grub to apply them (you may say big deal, but factly when using LILO I had forgot to run /sbin/lilo at least three times after altering the settings, resulting all three times to boot failure!).

2. When booting LILO allows only specific bootcode alterations, while by pressing "e" Grub allows pretty much anything...

On the minus thing, grub does not seem to work in some strange system configs, but then this also appiles for LILO in different configs- so noone has an advantage here.

Also: LILO has much prettier (framebuffer based) login screens, if that means anything, but Grub is recently improving here (see, for example, the Kanotix LiveCD logon)... but this is pure cosmetics, nothing really one should care about.

Edited by scarecrow
Link to comment
Share on other sites

A further question which was sparked: is there great advantage to using grub instead? I've never used it but imagine it's basically the same thing.

 

1. After doing any modifications to the Grub config ( /boot/grub/menu.lst ) you do NOT have to re-run grub to apply them (you may say big deal, but factly when using LILO I had forgot to run /sbin/lilo at least three times after altering the settings, resulting all three times to boot failure!).

it's a big deal because rewriting the mbr everytime a change is needed is why lilo isn't near as stable as grub and sooner or later, not if - but when, lilo borks things. That's my experience and I know others have never had probs with lilo. That's fine, but it has never been good to me.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...