Results 1 to 5 of 5

Thread: How to boot Linux from the Windows Boot Menu if you reinstall Windows

  1. #1
    Join Date
    Aug 2002
    Posts
    6,223
    Rep Power
    0

    Default How to boot Linux from the Windows Boot Menu if you reinstall Windows

    Caveat: I found these instructions on the net somewhere and I have never tried it so don't blame me if things go horribly wrong.

    Installing Windows NT/2000/XP along with an existing Linux installation .

    1.Setup partitions.

    Don't touch the linux partitions. No other precaution needed. also make the windows partition bootable.

    2.Install Windows NT/2000/XP. Let it over write the MBR

    3.Follow steps below:

    Setting up the system to boot windows too.

    now when you reboot , you will go directly to the NT/XP/2000 boot menu.

    Don't worry , your Linux installation is safely sitting there.

    Now boot using the linux boot disk / live cd

    mount the non NTFS windows partition using the following commands

    mkdir /mnt/windowsdrive
    mount /dev/hda* /mnt/windowsdrive

    where * is 1,4,5 etc.


    Now use this command to get first 512 bytes of your root partition


    dd if=/dev/hdaN of=/mnt/windowsdrive/bootsect.lnx bs=512 count=1


    replace /dev/hdaN with your Linux root partition name (/dev/hda something). I asked you to note it down, right?

    now boot to windows. find out the bootsect.lnx file from which ever drive u wrote it to using the previous command.Copy it to C:\

    open boot.ini and add the following line to its end

    c:\bootsect.lnx="Linux"

    Reboot

    Now you will see "Linux" showing up in your Windows boot menu.

    When u choose linux it will load the linux boot loader (LILO/Grub which ever u installed.)

    You may want to remove the "Windows" choice from the linux boot loader's menu. There is no harm if u leave it there
    .
    PC - Ubuntu 15.04 64bit Desktop
    HP Pav G60-236US 3GB RAM Laptop, Ubuntu 15.04 64bit and Win7 Home

    "So Daddy, how come you telling me stealing not right when YOU copying DVDs? How come? How Come?"


    RIP Ramesh ...

  2. #2
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    I did something like this once.. play with the windows boot.ini file and got it working, but I prefer the grub or lilo boot loader so I just try to get those working instead.

  3. #3
    Join Date
    Sep 2002
    Posts
    3,270
    Rep Power
    0

    Default

    I think people should print this off.

    Personally ... I always make a recovery CD from MONDO tools.
    Those who do not understand UNIX are doomed to reinvent it poorly.

  4. #4
    Join Date
    Jan 2005
    Posts
    3,151
    Rep Power
    0

    Default

    I have done this before too, it works mostly.

    I think it gave problems when I had linux tucked away beyond a certain
    sector on the drive or when it was on a different drive..

  5. #5
    Join Date
    Jun 2004
    Posts
    2,294
    Rep Power
    0

    Default

    Quote Originally Posted by leoandru
    I did something like this once.. play with the windows boot.ini file and got it working, but I prefer the grub or lilo boot loader so I just try to get those working instead.
    yup, much simpler to fix grub/lilo than the boot.ini.

Posting Permissions

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