Operating System - Linux
1752753 Members
4426 Online
108789 Solutions
New Discussion юеВ

Installing a new Harddrive:

 
SOLVED
Go to solution
Sharvil Desai
Frequent Advisor

Installing a new Harddrive:

Hi guys! I need to install a new hard-drive that can be recognized by my RedHat 7.2 OS. Before I buy a hard-drive, can you please tell me if there is any specific type of hard-drive I need to buy so that installation goes smoothly? Or if there's something special I need to do so that Linux will recognize the hard-drive? I haven't installed a hard-drive for Linux before. Please reply soon, I need to buy the hard-drive today or tomorrow. Thank you!
"help!"
2 REPLIES 2
Kodjo Agbenu
Honored Contributor
Solution

Re: Installing a new Harddrive:

Hello,

There are 2 main interfaces for PC hard disk : IDE which is the most commonly used, and SCSI which is used by professionals and advanced home users. At this point, you need to know that scsi devices need additional interface card (PCI scsi interface).

If you don't know what disk to buy, go for an IDE.

To connect your IDE drive and make it recognized by Linux, there are few things you must know :

* In a PC, you have 2 IDE controllers.
* On each IDE controller, 2 devices can be connected : one acts as bus master, and the other as a slave.
* You must select which device is the master and which one is the slave. This selection is made using dip switches on the device itself, as follows :

-> Master : the device will act as the bus master
-> Slave : the device will act as the bus slave
-> Cable select : the master and slave behaviour depend on the position of the device on the IDE cable.

IMPORTANT REMARK : in Linux, the hard disk name directly depends on which controller it is connected to (0 or 1) and whether it is a master or a slave. Here is the disk naming method :

/dev/hda is controller 0, master disk
/dev/hdb is controller 0, slave disk
/dev/hdc is controller 1, master disk
/dev/hdd is controller 1, slave disk

For example on my home PC, here is the disk layout :

/dev/hda is the boot disk (10 GB)
/dev/hdb is the additional disk (30 GB)
/dev/hdc is the main CD-Rom device
/dev/hdd is the additional CD-RW device


To summarize :

1. Unless you know about SCSI and have the appropriate interface card, buy an IDE disk.

2. Set the dip switches so that your disk will not be in conflict with the existing one. If the current disk is /dev/hda, then force your additional disk to be slave on the same controller (/dev/hdb). Alternately, you can connect it on the second controller so that it will become /dev/hdc or /dev/hdd.
Avoid "cable select" configurations because they depend on which kind of IDE cable being used, and on the position of the disk on the cable.

3. Just connect the disk and boot your Linux system. If everything is OK, you will see the newly detected disk in boot messages.

4. Create a partition table on the disk :

fdisk /dev/

etc...


Good luck.


Kodjo
Learn and explain...
Sharvil Desai
Frequent Advisor

Re: Installing a new Harddrive:

Thank you for your answer. I am glad to say that I had absolutely no problem installing the hard-drive on my own.

All I did was to hook up the cable comming from power-supply to the back of the drive, and hook up the controller cable (I think that's what it's called) to the back of the hard-drive!! That's all! Linux recognized it immediately.

However, thank you providing good feedback.
"help!"