Dual Boot with windows: where to put the boot loader?
dark_paw at optusnet.com.au
Tue May 31 14:31:01 UTC 2005
erich.iseli at iseli.org wrote:
> Hi List,
> I've read the wiki and forum entries about this issue. I've been using
> linux for 4 years and made many installations. Tonight I have an hour
> or two to install ubuntu on my dad's PC, but he needs a dual boot.
> Other thing: I don't have partition magic or any other windows
> partitioning tool. His PC has 4 partitions, the 1st being where
> Windows is installed, all others are free. His PC has no diskette
> drive, so creating a boot diskette where to save the boot loader is no
> option either.
> Why is everybody telling not to install grub in the MBR when
> How can I edit the windows bootloader so that it actually starts into
> Here's what I plan to do:
> 1) boot from ubuntu CD
> 2) install it, format the partition now known as E: with fat32 instead
> of NTFS and F: with xfs (preferrably) or ext3, as well as create there
> a swap partition
> 3) install grub (QUESTION: where if not the MBR?)
> 4) reboot: being prompted for: windows or ubuntu?
> I guess that doing the steps 1-3 won't modify the windows bootloader.
> So before doing this, I will have to do something on windows. Any
Grub will put itself into the first sector of the Ubuntu partition, and
optionally in the MBR as well.
What you can do is copy that sector to a file, and give it to the
windows bootloader that's currently in the MBR.
The problem then is how to get that file onto the windows partition. If
you have a USB drive, maybe you could boot from the LiveCD and use it to
copy the boot sector to the USB drive, and then to the windows partition.
This gets the bootsector as a file:
dd if=/dev/hda3 of=bootsect.lnx bs=512 count=1
Change the hda3 to whatever you actually use.
Then, get the bootsect.lnx file on to the windows partition somehow, and
add this to C:\boot.ini (show hidden and system files to see it)
When you boot, the windows bootloader will give you an option to boot
from that file.
Unfortunately if you ever upgrade the kernel or reconfigure grub for
some other reason, you'll have to do this all over again...
So, it's probably better to trust the Ubuntu installer to give you a
grub entry for windows and let it take over the MBR.
More information about the ubuntu-users