Writing a Dual Boot System in Grub
A friend of mine is currently using Linux, but not Windows. He is about to get a new hard drive and is going to put Windows XP on it, but wants to keep Linux as a dual boot. How can i create a dual boot for this?
help is at hand!
Firstly, hello and welcome to LQ.
This isn't as hard as it looks. have a search around the forum, as there are many discussions on this.
Basically, you need a floppy disk and a screwdriver.
Put grub on a floppy disk. Unplug the linux harddrive. Install the new harddrive. Remove the floppy disk. Do the windows XP install stuff. plug in the linux harddrive, put in the floppy disk, boot to linux. edit the grub menu so that you can boot windows from it. install grub to harddrive. (linux)
the details etc are much better explained at:
post back to this thread with any questions.
Also: useful links- really. read these.
* booting windows on a second harddrive
* how to install windows wherever you want
* Howto: Grub Bootloader and Troubleshooter
hope this helps.
From someone who has done it a couple of times: Yes it does work, but windows can eat everything. BACKUP. Backup Everything. BACKUP.
You don't need a screw driver nor even a floppy drive if you have the bootable installation disk of the linux distro. First just install windows on the second disk.
I will presume that the first hard drive is the primary master and the second is the primary slave.
After installing windows, boot with the installation CD, and type the following command in the command prompt that arrives at the begining:-
Follow the instructions until the command prompt arrives.
chroot to the installation image of your linux installation and type grub-install /dev/hda
reboot and boot from your hard drive and when in the ,linux environment add the following lines to your /etc/grub.conf file
the screw driver reference was humourous in intent- you do need some way to get into the Computer to change the harddrive, don't you? (unless you have those fancy thumb screws)
Windows loves to take over your computer. play it safe and disconnect the other harddrive, even if you go with the bootable cd method.
debasish_5849's method works if you have a well known distro (suse, fedora, mandriva etc).
Check the links, especially the gnu manual, since your setup might differ from debasish_5849's.
I do a weekly install fest, actually a Linux Workshop; & I agree w/ titanium_geek -- protect the Linux install by disconnecting it during the Win install.
The GRUB stanza from debasish_5849 will probably work, but adding "makeactive" is sometimes helpful:
someone gave me this code for grub:
title Fedora Core (2.4.22-1.2188.nptl)
kernel /vmlinuz-2.4.22-1.2188.nptl ro root =LABEL=/hdd=ide-scsi rhgb
title Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
What file to i put this code into?
#2 is the "traditional" name for the menu file, #1 is the new one.
what archtoad is saying: try one, if it doesn't work, try the other. :)
Thank everyone who has helped me. I really appreciate it, and my friend does too. I think it's nice that you guys have taken time out of your schedule to help me with this.
Thanks for amplifying my response, titanium_geek. I must have been in terse mode & should have said a little more for clarity's sake.
|All times are GMT -5. The time now is 11:53 PM.|