LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding Linux to Windows XP bootloader (https://www.linuxquestions.org/questions/linux-newbie-8/adding-linux-to-windows-xp-bootloader-133161/)

justiceisblind 01-09-2004 02:47 PM

Adding Linux to Windows XP bootloader
 
How do I change my Windows XP bootloader to add Linux?

vikrampant 01-09-2004 03:03 PM

Cut/paste from http://www.ucolick.org/~zingale/linux_ibmr31/

FWIW, I use GRUB to dual boot between RH and WinXP and another machine between RH and W2K.

-------------------

By placing the bootloader on the first sector of the boot partition, instead of the MBR, the GRUB screen does not come up when you reboot. We need to use the Windows XP bootloader (because of that damn NTFS) to get things working properly. Insert the first Redhat CD and reboot. Type 'linux rescue' at the prompt. It should find your Linux installation, mount it under /mnt/sysimage/, and drop you into a BASH shell.

Below are the steps required to get the Windows XP bootloader booting Linux for you. I more or less followed the tips at this R30 Linux page. The main difference is that our XP partition is NTFS. Remember that FAT32 partition we created -- we need it here (since there is no floppy drive on the R31).

* Type 'chroot /mnt/sysimage' to make your 'rescued' Linux installation the default root directory.
* Mount the FAT32 partition by making a /mnt/vfat directory ('mkdir /mnt/vfat'), and then 'mount -t vfat /dev/hda5 /mnt/vfat'.
* Now create a file bootsect.lnx containing the first 512 bytes of the Linux boot partition using dd, 'dd if=/dev/hda4 of=/bootsect.lnx bs=512 count=1'
* Copy this file onto the FAT32 partition so XP will be able to see it, 'cp /bootsect.lnx /mnt/vfat'. Boot into Windows XP and move that file into c:\Linux\.
* Now open a DOS shell, and make boot.ini writable ('attrib -h -r -s boot.ini'), edit it (with edit), and add c:\Linux\bootsect.lnx="Linux" to the end of the file (right after the "Windows XP Home Edition" line in the [operating systems] section).
* Make that file hidden again (attrib +h +r +s boot.ini), and reboot. The Windows XP boot loader should have a line for Linux, and when selected, that should load GRUB.

------------

Hope this helps
-- Vikram

Carson 01-09-2004 03:17 PM

"That damn NTFS" is an extremely good file system. It's also one of M$'s triumphs which Linux hasn't been easily able to imitate. It's easily changed back and forth in XP for FAT32 while any partition is being formatted. (Except FAT32 has an upper limit of 32 Gigs; NTFS partitions don't have that limit.) To go from NTFS to FAT32 in a partition with data is not a done thing, but apparently Partition Magic can handle it. (The only reason you'd want to is so Windows 9x can see XP files. But it's better to share data files in a separate FAT32 partition, where all OSs can read them.)

The Windows bootloader, much maligned by Linux, is just as sophisticated as Linux's, can handle any OS PLUS deal with NTFS, and works so smoothly that most people never run into boot issues until they encounter Lilo, which is in intrusive nightmare. GRUB is a big step in the right direction.

However, if you wanted to use Windows boot loader and still have a prettier menu, you could always add the freeware BOOT-US, which also handles most OSs, and can work in conjunction with Windows boot loader. It does remain true, however, that all the boot experts are Linux users, who've had to become experts when they've learned the hard way. Multi-boot complexities in Windows just don't wreck MBRs.

syg00 01-25-2004 02:36 PM

The above should work fine - I always load via the NT loader.
As a matter of convenience, you can always have an entry for your XP system in GRUB.CONF (another vote for Grub rather than Lilo).
So that way you use the Windows loader to select/default Linux to launch Grub Stage 2,to give you the option of Linux or Windows .. :(
Sounds round-about, but is sometimes handy - and you can always time them out.

stevoman098 01-25-2004 03:27 PM

Mine is currently set up to boot into grub, select winxp or fedora, if i choose winxp it goes to the windows bootloader, which i dont see due to only having xp on that bootloader

qwijibow 01-25-2004 03:36 PM

Quote:

That damn NTFS" is an extremely good file system. It's also one of M$'s triumphs which Linux hasn't been easily able to imitate.
Yeah.. How much longer are we gonna have to wait untill linux ext file system fragments itself all over the place, and grinds to a hault over the months...

since i dumped windows, ive not had the pleasure of defragmenting my system and watching those little squares for hours on end...

GodDamn it.. Linux Sucks.. and so does Sarcasm

hehehehehe.

ive always HATED ntfs with avengence, ive stuck to vfat wherever possible.
once i found a 7meg system file fragmented into 60 pieces on an ntfs drive that was 6 gigs in sixe, and only 2 gigs in use.... madness !!!

hopefully (for windows users) this new FS for longhorn will be better.

syg00 01-25-2004 04:05 PM

Quote:

Originally posted by stevoman098
Mine is currently set up to boot into grub, select winxp or fedora, if i choose winxp it goes to the windows bootloader, which i dont see due to only having xp on that bootloader
I think you'll find that the chainloading is actually doing that for you.
Otherwise you'd bounce back and forward between the two bootloaders, and never get anywhere. :)


All times are GMT -5. The time now is 02:25 PM.