Trouble with NTLDR,boot.ini, and multiboot..


Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Trouble with NTLDR,boot.ini, and multiboot..

  1. #1
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221

    Trouble with NTLDR,boot.ini, and multiboot..

    Im trying to get the NTLDR to have a linux option.. I ran liloconfig and all i did was the first option of adding a partition boot record.
    I added
    c:\boot.lnx="Debian Linux - Woody"
    to the boot.ini file. As well as, copying the boot sector using the command
    dd if=/dev/hdc5 bs=512 count=1 of=boot.lnx
    where /hdc5 is the debian root partition.
    I then mv'd the boot.lnx file to the c:\directory, per the c:\boot.lnx="Debian Linux - Woody" line in the boot.ini.

    My trouble is that when I boot up and choose the Debian Linux - Woody option i get an error along the lines of
    file missing or corrupted: windows/system32/hal.dll

    Now i have read that this indicates an incorrect boot.ini, mine is shown here:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOW S
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Micro soft Windows XP Professional" /fastdetect
    c:\boot.lnx="Debian Linux - Woody"

    I suspect its because my root directory (dev/hdc5) is on a different hard rive than the windows partitions.. I cant figure out the fix though, or confirm this is the problem though..

    Anyone run into similar problems or know the fix??

  2. #2
    Join Date
    May 2001
    Location
    Out of this world!
    Posts
    1,244
    I don't know if it will make a difference, but the file should be, bootsect.lnx .

    Just create a new one, don't rename the old one. And everytime you update your kernel be sure to create a new bootsect.lnx file.

    Hope this helps.
    Them belly full but we hungry


    Slack is where its at!

  3. #3
    Join Date
    Jun 2002
    Location
    Montreal, Qué, Canada
    Posts
    281

    Re: Trouble with NTLDR,boot.ini, and multiboot..

    Originally posted by chrisP
    Im trying to get the NTLDR to have a linux option.. I ran liloconfig and all i did was the first option of adding a partition boot record.
    I added
    c:\boot.lnx="Debian Linux - Woody"
    to the boot.ini file. As well as, copying the boot sector using the command
    dd if=/dev/hdc5 bs=512 count=1 of=boot.lnx
    where /hdc5 is the debian root partition.
    I then mv'd the boot.lnx file to the c:\directory, per the c:\boot.lnx="Debian Linux - Woody" line in the boot.ini.

    My trouble is that when I boot up and choose the Debian Linux - Woody option i get an error along the lines of
    file missing or corrupted: windows/system32/hal.dll

    Now i have read that this indicates an incorrect boot.ini, mine is shown here:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOW S
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Micro soft Windows XP Professional" /fastdetect
    c:\boot.lnx="Debian Linux - Woody"

    I suspect its because my root directory (dev/hdc5) is on a different hard rive than the windows partitions.. I cant figure out the fix though, or confirm this is the problem though..

    Anyone run into similar problems or know the fix??
    The name of the image file is irrelevant, this is not the problem. What I find kind of funny, how come your boot.ini file shows winxp, as being installed on the second partition of the primary channel master drive. Are you sure, your winxp is not installed on the first partition? Also, are you sure tthat linux is installed on the secondary channel's master drive?

  4. #4
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221
    Well, yes I think that's correct.. Anyway WinXP boots up fine..
    When I installed WinXP i created two partitions. Make a long story short, I picked the wrong one to install Windows on,apparently it was the second and not the first..

    That should be irrelevant though right??
    I am going under the assumption that lilo is misconfigured, the boot sector file is messed up, or the boot.ini file is misconfigured..
    To be honest though how can you mess up a one liner like
    c:\boot.lnx="Debian Linux - Woody" ?? And the file IS actually there on the c drive by the way, i thought maybe i put it in the wrong place..

    I dont have to overwrite the MBR right?? Otherwise lilo would take over as the main boot loader??

  5. #5
    Join Date
    May 1999
    Location
    Northern Virginia
    Posts
    116

    Post Go grab bootpart

    WinImage => BootPart

    This lil utility will tell you what partitions it sees (from a DOS/Windows perspective, and can add bootable partitions to the NTLoader menu (it creates the necessary file and edits boot.ini for you).

    Having done this by hand as well as having used the above utility, it looks as if you've done everything right. If there is anything wrong, you've written the LILO boot record to the wrong partition ... maybe ...

    -SUO

  6. #6
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307
    See if this helps...

    How to dual-boot Windows NT/2000/XP and Linux using NTLDR

    This tutorial is based on using LILO (linux loader) as your boot loader. It assumes you already have NT/2000/XP install and booting.

    At the time of this writing, I was booting Linux, WindowsNT, and DOS 6.22 at home, and Linux, WindowsNT, and DR-OpenDOS 7.02 at work. It was pretty annoying, to me at least, to have the LILO prompt come up, type 'dos', and THEN have to select an option from the NTLDR menu which would pop up afterwards. I liked the menu presentation that NT gave at the time, so I chose to use NTLDR to boot them all from one selection. The only apparent disadvantage to this setup is that you need to update the linux boot image in the NTLDR when you install a new kernel. However, I don't imagine most average users switch kernels all that often, and those of you that do won't mind doing this, or already have a better solution in mind/in place.

    That said, if you need/want this, read on. If not, skip it.

    The first step in the process is to remove the current installation of LILO from the Master Boot Record (MBR), if you're already using it. If not, ignore this part. To accomplish this, type 'lilo -u <boot device>'. On my machine, this was /dev/hda, which corresponds to the MBR of the first detected hard drive. If all goes well, LILO will be uninstalled. DO NOT REBOOT at this point, your system will be inaccessible without a boot disk or CD.

    The next step is to edit your LILO configuration file. It's usually /etc/lilo.conf. If lilo was installed in the MBR, the lilo.conf will reflect this. There are a couple changes to be made. Here is an example lilo.conf file:

    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50
    image=/vmlinuz.2.0.33
    label=linux
    root=/dev/hdb1
    other=/dev/hda1
    label=windowsnt


    This lilo.conf file is configured so that the boot device is /dev/hda. Tha's the MBR on the first detected hard drive. So we want to change that to be the linux root partition, which NTLDR will load up for us, instead of LILO loading the NTLDR. In my case, this is /dev/hdb1, the first partition of the second hard drive. Next, since NTLDR will be handling the booting, LILO doesn't need to know anything about the WindowsNT or DOS installs, nor how to boot them, so take out or comment out the prompt, timeout and other sections. It should now look like this:

    boot=/dev/hdb1
    map=/boot/map
    install=/boot/boot.b
    #prompt
    #timeout=50
    image=/vmlinuz.2.0.33
    label=linux
    root=/dev/hdb1
    read-only
    #other=/dev/hda1
    # label=windowsnt


    By commenting out prompt, we tell LILO not to ask which selection to boot, it just picks the first one it sees, which is our linux kernel. The timeout option is only needed in conjunction with prompt, so that goes, too. The other section is what LILO normally would use to pass us off to the NTLDR, and now it won't bother.

    The next thing to do is install LILO. This time, we want it on our linux root partition, instead of in the MBR. Since we've edited lilo.conf to specify the correct location already, all that's necessary is to run lilo. It may complain that lilo isn't being installed on the first drive, but since there will be a boot loader there (NTLDR), that's ok, and we can safely ignore the warning. Once this is done, keep reading, linux isn't quite bootable yet.

    LILO is now installed on our linux root partition, but there's still nothing pointing it to linux. To get around this, we create a boot sector image file or sorts for the NTLDR to look at to boot linux. The way we do this is to use the dd program (copy/convert utility). The syntax we're looking for is: 'dd if=<root partition> of=<boot pointer file> bs=512 count=1'. This is a little more complicated than the bootdisk dd usage. <root partition> is of course your linux root partition, /dev/hdb1 in this case. <boot pointer file> is a file that will contain the boot sector image that NTLDR uses to boot linux. It's a physical copy of the first 512 bytes of the linux root partition, where LILO is now installed. Making sense now? bs=512 sets the block size to 512 bytes, and count=1 ensures that we only get one block in the image. I used: 'dd if=/dev/hdb1 of=bootsect.lnx bs=512 count=1'. You should now have a file called bootsect.lnx (which, if you're using WindowsNT and DOS, needs to be in DOS 8.3 filename format, which bootsect.lnx fits in.

    The bootsect.lnx file is basically your linux boot sector. It will go on the NT/2000/XP partition, and be loaded by NTLDR. To add this to your NTLDR menu, you only need to edit the boot.ini file located in your Windows root directory (usually c:\.) Here's a sample boot.ini:

    [boot loader]
    timeout=10
    default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00"
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos
    C:\="MS-DOS"


    To add the bootsect.lnx file we created to the NTLDR configuration file, simply add a line that looks like this, reflecting your own decription:

    C:\bootsect.lnx="Red Hat Linux Release 4.2 (Biltmore)"


    Once you've edited the boot.ini and saved it, you should be good to go. When you reboot the machine, the NTLDR menu has a new option at the bottom, "Red Hat Linux Release 4.2 (Biltmore)" in this case. Select it, hit enter, and linux boots.

    If you want linux to be your default cjoice, just change the default line to: default=C:\bootsect.lnx.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  7. #7
    Join Date
    Jun 2002
    Location
    Montreal, Qué, Canada
    Posts
    281
    As SUOrangeman said, your boot.ini file is alright, and you probably picked the wrong partition for your Linux boot partition

  8. #8
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221
    thanks for the help guys...

    anyway, right now i am just booting off the debian install disk using the rescue command
    . rescue root=/dev/hdc5

    so I dont think the partition is wrong, otherwise linux wouldnt boot.. Unless it is looking on the wrong hard drive or something funny like that.. But it should know that from hdc

  9. #9
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307
    When you installed Debian, where did you install the bootloader? mbr or root (hdc5) partition?

    Can you get the boot record off the bootdisk?

    dd if=/dev/fd0 bs=512 count=1 of=/dev/hda2/boot.lnx

    I'm not sure if that will work or not.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  10. #10
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221
    Well when i installed debian and i got to the boot loader questions i got a bit nervous because I didnt want to overwrite anything to mess up my windows XP partition.. So, i just said no to all the questions about installing boot records. Before this i always put linux on my laptop, which does not have any other OS's on it..

    so i said no to putting the bootloader in the mbr, otherwise lilo would be my bootloader correct??

    So, not really sure of what i did, I ran liloconfig again to make sure that the boot image was installed on the partition.. I then ran lilo so that the new config would take effect. I skipped the mbr option and opted not to make the partition bootable, I beleive it should be bootable already since I used partition magic to create the partition and said yes to the "Are you installing an OS to this partition" question..

    Well I havent tried using the dd command on the boot disk.. I'll try it..

  11. #11
    Join Date
    Feb 2002
    Location
    NY
    Posts
    221
    thanks for the help guys...

    anyway, right now i am just booting off the debian install disk using the rescue command
    . rescue root=/dev/hdc5

    so I dont think the partition is wrong, otherwise linux wouldnt boot.. Unless it is looking on the wrong hard drive or something funny like that.. But it should know that from hdc

  12. #12
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307
    How did you ever boot Debian if you didn't install the bootloader in the mbr and installing to the boot/root partition (hdc5) would not work as you wouldn't be able to set that as active.

    Bootdisk would be the only choice.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  13. #13
    Join Date
    Jun 2002
    Location
    Montreal, Qué, Canada
    Posts
    281
    Originally posted by mdwatts
    How did you ever boot Debian if you didn't install the bootloader in the mbr and installing to the boot/root partition (hdc5) would not work as you wouldn't be able to set that as active.

    Bootdisk would be the only choice.
    You can use the win2k/winxp bootloader to boot linux, as long as you copy an image of the 1st sector of the linux boot partition on your windows system drive. This is what I am doing right now, and everything is working fine.

  14. #14
    Join Date
    Jun 2002
    Location
    Montreal, Qué, Canada
    Posts
    281
    Originally posted by chrisP
    thanks for the help guys...

    anyway, right now i am just booting off the debian install disk using the rescue command
    . rescue root=/dev/hdc5

    so I dont think the partition is wrong, otherwise linux wouldnt boot.. Unless it is looking on the wrong hard drive or something funny like that.. But it should know that from hdc
    Can you show us the content of the /etc/lilo.conf file?

  15. #15
    Join Date
    May 1999
    Location
    Northern Virginia
    Posts
    116

    Post

    Active, schmacktive. I currently run FreeBSD 4.6, Debian 3.0, WinME, Win2K, and WinXP on one hard drive. (Yes, I've tried to install more. ) My DOS C: volume is set to active and everyone boots happily.

    Back to the matter at hand, where is the /boot directory? NOTE: This can be its own partition, so even if /dev/hdc5 is where root (/) is, /boot can be elsewhere. If /boot is indeed elsewhere, that's where LILO writes the bootsector and that's what you need to extract to get NTLoader and others to work.

    OR ...

    Is there any particular reason why you've use /dev/hdc and not /dev/hda? If this is the only HD in your system, it shouldn't matter. However, if you have other HDs, LILO and other OS boot managers may get thrown off when they are NOT on the primary (read "first") hard drive.

    BTW, if you visit Google, you will find a better link for WinImage and BootPart. My original link did not work for me (although it used to).

    -SUO

    NOW THAT I've though about it some more, if you indeed have more than one HD, it may be wise to put a /boot partition on the first HD and install LILO there. Then, everyone might be happy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •