[TriLUG] Dual Booting

Aaron S. Joyner aaron at joyner.ws
Sat Apr 24 08:59:45 EDT 2004


Joseph Tate wrote:

> Brian A. Henning wrote:
>
>> You can use XP's bootloader to load linux, I've heard it puported..  But
>> I've never been successful at it.  (the one time I've tried it.. 
>> :-P)  It
>> takes a lot of trickery with imaging the /boot partition and referencing
>> that image in boot.ini...  I find it much easier to use GRUB as the
>> bootloader.
>
>
> Blech.  This involves writing the kernel and initrd image to someplace 
> on your windows drive.  Upgrading your kernel then becomes a more 
> arduous process.  Grub with chainloader +1 is much better.
>
> If you change which drive number it is, you will also have to modify 
> boot.ini to match.  Changing the drive from master to slave will cause 
> this to change.  Unfortunately there's no really good way to change 
> this from a linux box.

It's not so arduous!  :)  All you really need to do is install the Linux 
grub or lilo (your choice) NOT to the MBR but to the first sector of any 
given partition (or to the MBR of the second disc, but that's a little 
trickier - most of the gui installers don't give you that flexibility, I 
don't believe?).  Then fire up dd and copy off the appropriate boot 
block to a single local file (dd if=/dev/hdb1 of=linux.bin bs=512 
count=1).  Copy that file to some neutral location readable by both OSes 
(if you're using NTFS on your XP machine, a floppy or network share is 
probably best, or you can fire up one of the ext2/3 readers as a recent 
poster suggested).  Reboot into your Windows installation, copy over the 
linux.bin to C:\.  Next, fire up notepad and edit C:\boot.ini (it's 
hidden, you'll need to be administrator, etc) - and add something like 
this to the end of the file: C:\linux.bin="Linux".  That's it!  :)  
Reboot, and you should be able to select "Linux" from the NT Boot loader.

I used to use this with NT4 back in the day, and wrote a mini-Howto on 
it, which has since been lost to the wind.  You can probably find a good 
complete write up by googling for "dd boot.ini" or something of the 
sort.  It doesn't copy of the whole kernel, only the boot loader code.  
If you do change kernels, you may need to replace the copy of linux.bin, 
but it's been probably 6+ years since I used this as an active setup, so 
I can't say for sure.  :)

Best of luck with it to anyone who might be interested.  :)

Aaron S. Joyner



More information about the TriLUG mailing list