PDA

View Full Version : Request help



Cooper
08-02-2007, 02:37 PM
I have two hard drives in my computer. When I want to swap between the two I am having to manually unplug and plug in another, this is getting old, and bothersome.

One hard drive is running suse linux 10.1
One hard drive is running windows xp pro

Is there a way to hook both of them up and be able to select which HDD/Os
I want to start when I boot up my computer?

Airbozo
08-02-2007, 03:03 PM
I have two hard drives in my computer. When I want to swap between the two I am having to manually unplug and plug in another, this is getting old, and bothersome.

One hard drive is running suse linux 10.1
One hard drive is running windows xp pro

Is there a way to hook both of them up and be able to select which HDD/Os
I want to start when I boot up my computer?

Look into a boot loader like grub. It comes with most linux distro's and allows you to set a default OS to load (if no button is pushed) and/or gives you a list to choose from. Since grub actually writes to the _first_ HD, make sure you back up the essential bits before installing it. In many many years of using grub (or similar boot loaders) I have only ever had one issue and it was my fault for mucking up the config file. Linux should have asked about a boot loader during install.

BTW Welcome to TBCS!

xmastree
08-02-2007, 03:13 PM
You can rig up a toggle switch to the master/slave jumpers and select which will be which before powering it up. I did that for a while, worked perfectly.

It doesn't even bother it if you accidentally move the switch once it's running. I suspect it just reads the status of the link at boot time.

Cooper
08-02-2007, 03:14 PM
And how complex is this to do?

.Maleficus.
08-02-2007, 03:21 PM
Yeah, GRUB is the way to go. I'm surprised it didn't install one when you install SuSE... Do what AB said, back-up your data just in case, then open up YaST, search for GRUB, and install it. It will allow you to have an entry for Windows and SuSE. If you need more help, just ask.

yazeed1906
08-02-2007, 04:03 PM
agreed...grub all the way. lilo is ok, but I have known some to have issues with windows loading up properly.

xmastree
08-03-2007, 02:20 PM
And how complex is this to do?Very simple, you just need a DPDT toggle switch. (assuming your drives are link on = master, off = slave)

However, as others have said, grub is better.

But as you already have two bootable drives, both of which are primary master when they boot, it might not be so simple. The fstab of the linux disk will refer to /dev/hda and if grub is installed on the XP disk, the linux disk will be /dev/hdb so it won't work right away.

So the switch is the easier option in this case.

.Maleficus.
08-03-2007, 06:25 PM
Very simple, you just need a DPDT toggle switch. (assuming your drives are link on = master, off = slave)

However, as others have said, grub is better.

But as you already have two bootable drives, both of which are primary master when they boot, it might not be so simple. The fstab of the linux disk will refer to /dev/hda and if grub is installed on the XP disk, the linux disk will be /dev/hdb so it won't work right away.

So the switch is the easier option in this case.
Unless configuring GRUB is harder than what I've done, it shouldn't be too bad. Boot into Linux, install GRUB to (hd0,0) (overwriting the MBR of Windows, as Windows is hd0 and Linux is hd1), and edit the entries to your needs. You'll probably want the timeout at 60-ish (seconds before it boots into first entry).

xmastree
08-04-2007, 04:02 AM
Boot into Linux, install GRUB to (hd0,0) (overwriting the MBR of Windows, as Windows is hd0 and Linux is hd1)
Normally, yes. But the linux install thinks it's on hda, so to boot it normaly, that disk has to be in the right physical place. Putting the XP disk as master, and the linux as slave, you won't be able to boot into linux without some tweaking.

It may be possible to boot from a live linux disk and edit the fstab to reflect the fact that linux is now on hdb. I'm just worried there may be more to it than that, it's not something I've ever done.

It is possible to set the BIOS to boot from the slave, but unless fstab has been edited, it won't work.

.Maleficus.
08-04-2007, 09:37 AM
Editing the fstab is no big deal either (man, that Gentoo install was really worth while!). It's actually a really good thing to learn if you ever bork an install.

And actually, you could boot into a live CD and edit the fstab (I've done this to fix installs..) It's really pretty easy.

1. Boot live CD, and make a directory in /mnt (mkdir /mnt/hdds). This is where the mounted hard drive files will reside.
2. Edit fstab to include the hard drive (nano /etc/fstab) Add an entry for the hard drive (you need to know the format of fstab but it's no biggie).
3. From a terminal type "mount /dev/hda (the hard drive you added) /mnt/hdds" all as one line.
4. Navigate to the /mnt/hdds directory, go inside and you'll see the root folder of you hard drive.

xmastree
08-04-2007, 11:20 AM
What's wrong with just mounting the partition directly? No need to edit fstab.

make the mount point, then just mount the root filesystem of the linux hard drive there with the mount command.

IOW, skip line 2. but for line 3. use mount /dev/hdb1 /mnt/hdds -t ext3 -rw

.Maleficus.
08-04-2007, 12:53 PM
Ahhh, wasn't aware you could do that (the directions were from memory anyways, though I have it all written down somewhere).

I think soon I'm going to try running my server for a day command line only. Just to see how much I really know, and how much I need to learn.

Cooper
08-06-2007, 08:51 AM
Thanks for all the tips and advice guys. Im new to linux and still learning it, only been playing with it for a few months.