I have the following IDE hard disks.
- A Seagate 12 GB hard disk
- A Samsung 2.1 GB hard disk
- And another Seagate 20 GB hard disk
I wanted to add one of them as a second hard disk to my computer.
I opened up the computer case and inserted one of the hard disk (listed above) in the hard disk bay, set up the connectors and turned on the machine hoping to see it boot up as normal.
Problem : GRUB gives the error that it can't find the root partition
That was rather surprising as I had not made any changes to the structure of the hard disk either by re-installing Linux or modifying the grub menu. After some head scratching, I figured out that perhaps the hard disks are detected in a different order by the computer. To verify this, I booted using a Linux Live CD and I was right. The original hard disk was detected by Linux as '/dev/hdb' instead of /dev/hda and this messed up everything as my /etc/fstab file and the GRUB menu had the entry '/dev/hda'.
The thing to remember is that IDE hard disks have around 8 pins at the back which can be connected together via jumpers. And depending on what position you have set the jumpers, the hard disks will be detected in different ways by the computer.
Usually, when you buy a new hard drive, it will have the jumper pins in the cable select position. This allows the drive to assume the proper role of master or slave based on the connector used on the cable. For the cable select setting to work properly, the cables you are using must support the cable select feature.
In my case, I had two hard disks connected using the same cable and both had the jumper pins in the cable select position. This meant that when I booted the PC, it automatically selected one hard disk as the primary master and the other as the primary slave.
And unfortunately, it selected the hard disk which had the Linux OSes as the primary slave which was why it was detected by Linux as '/dev/hdb' instead of '/dev/hda'.
|IDE Hard disk jumper settings|
Once I figured this out, the solution was simple. I re-opened my computer case and changed the jumper settings of the hard disk containing the Linux OS to the primary master and the jumper settings of the second hard disk to the slave position and I was able to boot into Linux without a problem.
Different IDE hard disks have different jumper positions for setting them as primary and slave and the positions are usually printed on top of the hard disk.
Check the table printed on your hard disk before changing the jumper pins.
I now have two remaining hard disks. I can fit them into the computer too, but then you can connect only a total of four devices this way namely -
- primary master,
- primary slave,
- secondary master, and
- secondary slave
Then I won't have a vacant slot to connect the internal CD Writer and the DVD drive. So I use these two hard disks for backing up data.