Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Hack:   Hack the Windows NT/2000/XP Boot Loader
Subject:   Grub booting XP on one disk, Linux on another
Date:   2005-09-17 20:51:40
From:   Greenstreet
I was able to get Grub to work on my system but I
needed a trick to do it. I ran into a problem on my first attempt: On my system XP is already on hda. I loaded Linux on hdb and created the /boot partition as the first partition on hdb (hdb1). (This is a small partition entirely within the 1024 cylinder limit.) I loaded Grub on this partition, then did the dd trick to copy the boot sector of hdb1 to a file that I placed on c:\ (on hda2) and set up my boot.ini accordingly. It didn't work - it just types "GRUB" in the upper-left corner.


I got an idea for a solution after reading http://www.linuxjournal.com/article/4622, which describes how to create a Grub boot floppy. I was finally able to get my Linux installation to boot from hdb1 with the Grub boot floppy.


I happen to have a small FAT32 partition on my first drive (hda5, which I created a long time ago with Partition Magic), so I used the "Grub boot floppy" technique to make hda5 a "Grub boot partition". I then did the dd trick for hda5, and copied that boot sector file to c:\. Now I can selectively boot to XP on hda2, or to the grub boot partition on hda5. Just add menu.lst to hda5 and we have a complete working solution. Once control is with Grub the problems with the second drive go away.

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Grub booting XP on one disk, Linux on another
    2005-10-23 06:47:58  keithglos [View]

    I recently copied a disk image to a stand alone hard disk. Used for the first time a boot live Linux. I found the dd command would only write from head 0 track 1 sector 1, this should have been head 0 track 0 sector 1 for the PC bios to find it. If this is normal (OK for writing to floppy) it would explain some of the difficulties here. I added bs=32256 (512x63) and skip=1, and hand copied the mbr from the file to the correct location, which then worked.
    • Grub booting XP on one disk, Linux on another
      2006-09-19 02:09:12  kash01 [View]

      Hi,

      Another newbie here ( again !! ).
      I had Windows XP on hda and installed FC5 on hdb.
      I was able to get the menu to select windows or FC5 . All was fine until i did the recommended updates in FC5. Fine with all the updates ( installed ok ) but at reboot, al i get is GRUB ( note there is no prompt or anything !!
      I have lost Windows / FC5 . Can anyone help me please because i need my Windows ( got lots of important stuff on it )
      Help !!

      Kash
    • Grub booting XP on one disk, Linux on another
      2005-10-23 07:15:41  keithglos [View]

      Sorry, I meant write TO head 0,track 0, sector1.

Showing messages 1 through 3 of 3.