-   Linux - Newbie (
-   -   XP NtLdr setup (

theMouse 07-24-2003 07:57 PM

XP NtLdr setup
I have a dual boot XP / Mandrake 9.1 system.

In installing Mandrake 9.1, I wanted to keep Lilo out of the MBR, letting NTLDR do the boot work (this was due to an unfortunate experience with Lilo a couple of years ago where it completely stuffed my boot sector).

Anyway, Lilo somehow ended up on the MBR anyway (whether installation program bug, or more likely good old Human error I don't know). I copied the boot sector over to my Windows root drive (hda), and then overwrote Lilo using the XP recovery system.

Unfortunately, having modified boot.ini to point to my Linux boot sector file, my dual boot system did not work. XP would boot fine, but the Linux boot just sits there doing nothing.

I still have a Linux boot floppy, and I want to know the procedure for copying the boot sector from the floppy disk so I can access it from the NTLDR (I don't want to reload Lilo onto the MBR to recreate the boot file).

Can anybody help me??? ta in advance.

gbarny 07-24-2003 08:19 PM

If you just want to remove lilo from the mbr you should be able to boot from the M$ CD and enter the recovery console

then type "fixmbr" and "fixboot"

If that's what your asking anyway :)

theMouse 07-24-2003 08:35 PM

yeah - I've already done that - which leaves me with being able to boot to XP fine, but with no access to Linux, except through boot floppy.

I want to copy the boot sector off the boot floppy onto my main Windows drive (hda in Linux), so I can point to this file with NTLDR, giving me back my dual boot system.

I assume it involves dd if /dev/fd0 and specifying an output file.
I'm just unsure of the correct syntax I require when doing this from a floppy disk (after all it looks like I stuffed this operation up when doing it from the HDD in the first place).

Skyline 07-24-2003 08:49 PM

Hi the mouse

This might be of some use

theMouse 07-24-2003 09:14 PM

OK that looks fantastic - thanks. So basically I recreate the Lilo boot partition on my Linux partition, and then copy this off to point to from NTLDR - I can forget trying to get it from the boot floppy. Ta!

dangerboy 08-17-2003 11:54 PM

I know that your problem might be resolved, but I wasted a week before I finally figured this out. Hope this helps someone. One thing I ran into on all the Howtos is that they never tell you exactly "how to" install LILO on your Linux partition when you are trying to dual boot with NTLDR. I know this takes the fun out of discovering it for yourself; but if you are anything like me, you just like to know beforehand.

I found that simply uninstalling LILO from the MBR was not enough, and taking a boot sector image of the Linux partition would cause all kinds of errors(L 01 01 01 etc). I guessed that, at least in my case, LILO only writes the actual bootloader into the MBR at installation and not the Linux partition. Unless you tell LILO to write itself into the first sector of your Linux partition, you will continue to get errors. Seems my guess might have had some validity, because this worked.

Do everything the howto says about uninstalling LILO from your MBR then follow these instructions.

In order to get the LILO Bootloader onto your Linux partition use the following command from root (hdx represents your Linux partition) run:
lilo -b /dev/hdx
If you get a warning from LILO saying that it's ignoring something or other, don't worry, it'll still work.

Once this is done, run:
dd if=/dev/hdx of=bootsect.lnx bs=512 count=1
Note that you are making a copy of the first sector where you just installed LILO (your Linux partition). Copy bootsect.lnx to a floppy, reboot to Windows, copy bootsect.lnx to your C: (or boot) drive and edit your boot.ini file to point to it.

This is what worked for me when nothing else would and this process seems to be a little easier.

Hope I helped someone. Thanx for listening to the ramblings of a madman (mad after a week.... lol). If you have any questions, comments, or complaints you know where to find me. Take care.

Mandrake 9.1 User

theMouse 08-18-2003 08:11 PM

Thanks for that. I followed pretty much this procedure to get my dual boot system up and going, although I note that I made the same mistake you did in removing LILO from the MBR - I was also getting the old L 01 01 01, even after I restored the XP MBR. It would give me that error for a few seconds, and then go boot XP. Go figure - I guess I had a partially screwed MBA, but not so much so that it couldn't boot XP.

Anyway I eventually managed to get the Linux boot sector over onto my Windows C: (following the website advice a couple of posts back - ie. the same steps as you outline, dangerboy), and all is sweet now (except my motherboard has just been RMA'd, but that's another issue!)

All times are GMT -5. The time now is 09:04 PM.