Modifying Boot.ini for dual boot with windows and ubuntu

Asked by PC_GURU

I have two seperate hard drives, one with Windows XP on it and one with Ubuntu.
How do I modify the boot.ini file so that I can dual boot with Windows XP and Ubuntu 7.04? What file should I have it boot off of?
I can turn the HD with Windows off in the bios settings and it will then boot from the Ubuntu one, but I would like to have a boot menu for faster switching.

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

I don't think you can solve this from the Windows side; Windows has not been designed to cater for the presence of another O/S on the same machine.
I see two possibilities:

1) You could install a non-windows boot loader on the MBR of the first HD, like LILO, GRUB etc.
2) You could use GRUB, which is already in the MBR of the 2nd HD for booting, when needed, Windows on the 1st HD. Of course you would have to change from BIOS the booting order of the HDs (or perhaps just disable from BIOS the 1st HD, or even physically change the connectors) and you would have to manually configure grub.

Please let us know if any of this makes any sense to you and if you eventually need support for the option you prefer.

Revision history for this message
PC_GURU (abahler) said :
#2

I guess I would like to use the GRUB which is on the second HD and change the connectors.
But I need to know how to configure GRUB.

Revision history for this message
PC_GURU (abahler) said :
#3

I guess I would like to use the GRUB which is on the second HD and change the connectors.
But I need to know how to configure GRUB.

Revision history for this message
Cesare Tirabassi (norsetto) said :
#4

First of all, here is a link to the GRUB manual if you need to have a reference handy:

http://www.gnu.org/software/grub/manual/html_node/

It is just a question of changing the hd descriptors in /boot/grub/menu.lst; for instance:

hd1/partition 1 is the windows xp (this would be /dev/hda)
hd2/partion1 is the linux hd (this would be /dev/hdb)

the entry for linux would be similar to:

title Ubuntu, kernel 2.6.20-15-lowlatency
root (hd1,0) # 1=2nd HD, 0=1st partition
kernel /boot/vmlinuz-2.6.20-15-lowlatency root=UUID=51270779-0fb3-447d-b429-01710687e545 ro quiet splash vga=795
initrd /boot/initrd.img-2.6.20-15-lowlatency
quiet
savedefault

and that for windows:

title Microsoft Windows XP Professional (RAID)
root (hd0,0) # 0=1st HD, 0=1st partition
savedefault
makeactive
chainloader +1

You just have to be careful if Windows is not on the first HD because Win cannot boot from any disks but the first one.
In this case you have to instruct grub to performs a virtual swap between your first and second hard drive:

title Microsoft Windows XP Professional (RAID)
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0) # 1=2nd HD, 0=1st partition
makeactive
chainloader +1

Revision history for this message
Thomas Templin (coastgnu) said :
#5

On Sat, 26. May 2007 22:07:04 PC_GURU wrote:
> Question #7040 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/7040
>
> Status: Solved => Open
>
> PC_GURU is still having a problem:
> I guess I would like to use the GRUB which is on the second HD and change
> the connectors. But I need to know how to configure GRUB.

Please have a look to the grub HowTo here:
https://help.ubuntu.com/community/GrubHowto

And the dual boot HowTo here:
https://help.ubuntu.com/community/How_to_dual-boot_Ubuntu_and_XP_after_installing_them_separately_on_two_HDs
(this URL is a good candidate for winning the 'The longest WikiName ever'
contest :-))

And also the Windows dual boot documentation may be helpfull:
https://help.ubuntu.com/community/WindowsDualBoot

regards,
thomas

Can you help with this problem?

Provide an answer of your own, or ask PC_GURU for more information if necessary.

To post a message you must log in.