I could also use some screen shots of the steps. I'll host them on my computer and I can edit the file myself, so just PM me about it, and I'll send you my email address. Or you can contact me through AIM and we can do it that way.
Introduction
It seems that every once in a while we have a newcomer to the forum shouting, "My computer doesn't see my new hard drive! Whatever shall I do?!" Well, here's what you do.
The purpose of this post is to guide new users -- or even old users that forgot the process -- of various operating systems through the steps of installing a brand, spanking, new hard drive.
Operating System Independent or Stuff Everyone Needs to Know
This information here is independent of the operating system. It is assumed here that you know where to put the drive and how to turn screws.
For IDE Drives
Make sure that the cable is oriented correctly. Cables may or may not be keyed. Usually there is a red line on one side of a ribbon cable which indicates on which side Pin 1 is positioned. Secondly, make sure the jumper is shorting the correct pins for its placement on the cable. The last connector on the cable is for a Master drive, and the one in the middle is a Slave. While Cable Select is supposed to figure this out for you, it has never worked for this author.
For SATA Drives
Know which version of SATA your motherboard or controller card supports. In theory, the hard drive is supposed to figure out what the motherboard is capable of handling, however, this is not always the case. If you run into issues with the BIOS recognizing the hard drive, try setting the jumper for SATA/150 mode. Furthermore, as Just Brew It! pointed out, Hitachi utilizes software to change the operating speed its hard drives. This can be a problem with some chipsets, notably VIA, as they will not communicate with the drive at all unless the speeds match. So, you will have to install a Hitachi drive on another machine to change the operating speed before you can install it in your intended machine.
For Everyone...Kind Of
For those of you using IBM compatible hardware, read not Apple, when you first boot up the computer, go into the BIOS to make sure that the hardware is really connected for reals and not for fakes. Getting into the BIOS varies among motherboard manufacturers, but it is usually done by pressing and holding the Delete or F1 keys. Where you'll find the information about the hard drives also varies from manufacture to manufacturer, but usually storage devices are listed on the very first screen.
Microsoft Windows XP or Vista
Here are the steps to follow once Windows XP or Vista is up and running:
- Go to Start -> Run
- Type diskmgmt.msc and press Enter, Return or click Ok
- The Disk Management program will open up and list all the attached disks, including CD/DVD drives, in a two pane view. Volumes in the top, and a graphical view in the bottom. Hard drives are identified as "Disk x". The one you are looking for will have a volume name of "Unformatted" and will have a black bar instead of Microsoft Blue.
- Right click on the bar and select Format...
- Follow the instructions given by the wizard
- You may be presented with the option of formatting the drive as FAT32 or NTFS. If you have a drive larger than 32 GB, you will definitely want NTFS.
Linux
Each distribution of Linux includes its own unique set of tools. Covering them all here would be a bit excessive. One thing that is common to all distributions of Linux is the ability to do everything that could be done graphically via the command line. The steps covered here will walk you through the process of adding a hard drive using command line utilities.
You will need to know a little bit about your system. IDE/EIDE hard drives are usually named one of four things: /dev/hda, /dev/hdb, /dev/hdc or /dev/hdd. They are ordered as Primary Master, Primary Slave, Secondary Master and Secondary Slave, respectively. SATA and SCSI drives are usually labeled /dev/sdx, where x represents a drive letter. They tend to follow the same convention as IDE/EIDE in that the letter increases as the position does. For a hint, you can look at your /etc/fstab to see what is mounted, and if you have a /dev/sdx or /dev/hdx that is not in your fstab, it is a pretty safe bet that that is your new hard drive.
Format the Drive
- However you manage to get to the command line, just get there. Whether it is opening a terminal from within graphical environment or the TTY screen. Ctrl+Alt+F2 will usually get you to a TTY from an X Windows environment. Or one of several terminal emulators such as aterm.
- At the command prompt, which may end in a dollar sign ($), switch to root by running su -
- At the command prompt, which should now be a hash (#), run fdisk /dev/x, where x is the new hard drive. You should now be presented with a different kind of prompt stating:Code: Select all
Command (m for help):
- Press n and Enter to create a new partitionCode: Select all
Command action
e extended
p primary partition (1-4) - We will not go into logical partitions, so press p and Enter.Code: Select all
Partition number (1-4):
- Press 1 and Enter
- You will be asked to define the range of the partition. The default is to start at the very first sector, which is what this guide wants so press Enter.
- It will ask you where you want to end the partition. You can define the size in megabytes using +nM, where n is the number of megabytes. The default is to use the entire drive, so press Enter.
- Press w and Enter to write the partition table to the drive.
- Now you need to format the partition. We will not discuss the pros and cons of each file system here. It is a good idea, as a beginner, to stick with the same file system as your root partition. You can find out what file system you root partition is using by looking at your /etc/fstab. In the following list are the commands to enter -- where x is the drive and p is the partition number (Example: mkreiserfs /dev/hda1) -- at the command prompt to format the drives based on the information you got from /etc/fstab:
- Reiser FS: mkreiserfs /dev/xp
- Ext2: mke2fs /dev/xp
- Ext3: mke2fs -j /dev/xp
- XFS: mkfs.xfs /dev/xp
- JFS: mkfs.jfs /dev/xp
Mount the Drive
Now that you have formatted the drive, you'll need to mount it. Depending on what your goal is, there are a couple ways to do this.
One of the really great features of Linux is that there really aren't separate drives as far as the directory tree is concerned. This means that you can take an existing directory on an existing drive and move it to your new hard drive, and all will still be well afterward.
Mounting the Drive to a New Directory
If you're going to make a new directory for your new drive, follow these steps. We'll say /dev/hdb1 is your new drive. Change this according to your setup.
- Make the new directory.Code: Select all
mkdir /path/to/new/directory
- Mount the drive to the new directory.Code: Select all
mount /dev/hdb1 /path/to/new/directory
- And add it to /etc/fstab. I use nano as my editor, so change the command to whatever your preference may be.Code: Select all
nano -w /etc/fstab
Code: Select all# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1 /boot reiserfs noauto,noatime 1 2
/dev/hda3 / reiserfs noatime 0 1
/dev/hda2 none swap sw 0 0
# I've added the new mount point for /path/to/new/directory here.
# Make sure to change reiserfs to the file system you've used.
/dev/hdb1 /path/to/new/directory reiserfs noatime 0 3
/dev/cdrom /mnt/cdrom auto noauto,ro,users 0 0
...
Mounting the Drive to an Existing Directory
Follow these steps if you plan on moving an existing directory to your new hard drive. In these steps we will say that /dev/hda3 is your old drive and that /dev/hdb1 is your new drive. Obviously, change these according to your own setup. So, let's say you want to move your /home directory to the new drive.
- We want to recursively copy everything over so that all the sub-directories are included, and we want to preserve all the file attributes.Code: Select all
cp -pR /dev/hda3/home /dev/hdb1
- Now nose around on the new drive and verify that everything is there.Code: Select all
cd /dev/hdb1 && ls -ashl
- Now mount the new drive to home.Code: Select all
mount /dev/hdb1 /home
- Remove the /home directory from the old hard drive.Code: Select all
rm -R /dev/hda3/home
- And edit your /etc/fstab so that the new drive gets mounted at boot. I use nano as my editor, so change the command to whatever your preference may be.Code: Select all
nano -w /etc/fstab
Code: Select all# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1 /boot reiserfs noauto,noatime 1 2
/dev/hda3 / reiserfs noatime 0 1
/dev/hda2 none swap sw 0 0
# I've added the new mount point for /home here.
# Make sure to change reiserfs to the file system you've used.
/dev/hdb1 /home reiserfs noatime 0 3
/dev/cdrom /mnt/cdrom auto noauto,ro,users 0 0
...
Apple Mac OS X
If you read through the first two sections of this guide and though, "Man! It's way easier to add a drive to Windows than Linux." Prepare yourself to be blown away.
- Turn the Apple computer on.
- Select your desired file system.
- Initialize the drive.
If you happened to ignore the dialog that popped up at boot, it's okay, you can still initialize the drive within the Mac OS environment. Just go to Utilities -> Drive Utility and select the drive that hasn't been initialized, and initialize it.