How do I boot from Second HDD?

oclockernewbie

Distinguished
Feb 25, 2007
22
0
18,510
I just installed a second hard drive that I plan to load with Linux. So far though, there is nothing loaded onto the drive.

When I went to boot, I thought that, during the boot sequence, there would be a memu that would give me a choice of which HD to boot from. My system booted from my first HD (i.e. the one with Windows) as if it were the only HD installed.

Do I need to configure my BIOS in some way so that when I boot, there will be a choice of which drive to use? Do I actually have to load Linux on the second HD before a booting choice menu appears? Am I going to have to go into my BIOS (intergrated peripherals menu?) and choose which drive I want to boot from each time?

Any help would be appreciated.
 

pshrk

Distinguished
Oct 15, 2006
518
0
18,990
This is what I did:

Make the master disk the linux disk (or the first SATA drive if using SATA).
Make the slave disk the windoze disk (or the second SATA drive if using SATA).

When you install linux make sure to put grub on the master disks MBR.

Then add the following lines to grub.conf in order to boot windows:

title Windows XP Pro
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

Hope this helps! My entire grub.conf file looks like this (for reference only, yours will be different):

#
# Sample boot menu configuration file
#

# Boot automatically after 30 secs.
timeout 10

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

# Splash image to show behind grub.
splashimage=(hd0,1)/grub/splash.xpm.gz

title Windows XP Pro x64
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

title Gentoo Linux 2.6.20-r3
root (hd0,1)
kernel /kernel-2.6.20-gentoo-r3 root=/dev/hda4 vga=0x318 video=vesafb:mtrr:3,ywrap

title Gentoo Linux 2.6.19
root (hd0,1)
kernel /kernel-2.6.19-gentoo root=/dev/hda4 vga=0x318 video=vesafb:mtrr:3,ywrap

title Gentoo Linux 2.6.20-r3 32 bit
root (hd1,1)
kernel /kernel-2.6.20-gentoo-r4 root=/dev/sda3
 

pshrk

Distinguished
Oct 15, 2006
518
0
18,990
Alternatively (if you are new to Linux and the above seemed too confusing):

Install Linux on the new hard drive, but first unplug the windoze hard drive (so you don't accidentally overwrite anything important on there like the MBR)

Then after the Linux install is complete plug the windows drive back in. Most modern boards let you select which hard drive to boot from in the bios.



Another option is to leave both hard drives plugged in and install a user friendly Linux distro like Ubuntu. The Ubuntu installer should (keep your fingers crossed) automatically detect that you have windows installed on one of your hard drives and set up the grub.conf file for you automatically. (IMHO this is unsafe since i don't fully trust the Ubuntu installer)

As a side note: don't try to boot off of the drive until you have Linux installed on it (you seemed to be a bit confused about this in your original post).