Here's my first stab at making a guide for new hard drive installs. I raced morphine for this. This is a team effort though, and I'll update this as necessary.

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.

IntroductionIt 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 KnowThis 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 DrivesMake 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 DrivesKnow 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 OfFor 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 VistaHere 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.

LinuxEach 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:

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 DriveNow 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 DirectoryIf 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.

# /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.#

Mounting the Drive to an Existing DirectoryFollow 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.

# /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.#

Apple Mac OS XIf 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.

That's it. Once it's initialized, you'll see it on the desktop. Again, it's outside the scope of this article to discuss the benefits and drawbacks of each option, however, it should be noted that if this is an external drive you will be better served formatting the drive using the FAT32 file system. This will enable you to use the drive both on Mac and Window operating systems. If it is an internal drive, or you will never access the drive with a Windows operating system, you can go with the default HFS+ file system.

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.

Last edited by titan on Sat Jan 09, 2010 2:16 am, edited 8 times in total.

The best things in life are free.http://www.gentoo.orgGuy 1: Surely, you will fold with me.Guy 2: Alright, but don't call me Shirley.

In theory, you should not need to install the jumper to force SATA 1.5 Gb/s operation, even if the controller is 1.5 Gb/s and the drive is 3.0 Gb/s. The drive is supposed to figure things out automatically, and downshift as needed. I say "in theory" because there are some situations (e.g. 3.0Gb/s drives connected to certain older VIA southbridges) where the SATA speed auto-detection may not work properly.

At least one vendor (Hitachi) uses a software tool instead of a jumper to set the 1.5Gb/s option. You can get into a Catch-22 situation if you have a Hitachi SATA drive and one of the above mentioned problematic VIA southbridge SATA controllers, since the controller won't talk to the drive because of the speed mismatch, and you can't correct the speed mismatch because you can't talk to the drive. If this happens, you need to either A) connect the drive to another system, run Hitachi's option setting tool, then move the drive back to the system with the problematic southbridge; or B) install a third-party PCI-based controller and use that instead of the onboard SATA.

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson

We should probably have a note on XP for the people who are installing Windows onto a new drive and can only see 128GiB / 137GB of it because they haven't slipstreamed the SP. I would've thought this situation was getting uncommon enough that it wouldn't be worth mentioning, but we had a thread on it just a few days ago.

Titan, my suggestions: put "introduction and purpose" together and number the steps so that it's easier to read. As it is now, it's bound to scare the newbies (gaaah, too much text, my brain already hurts!).

Oh, but wait, I was supposed to write this. No sticky then, sorry. No soup for you!

Kidding, it's stickied

There is a fixed amount of intelligence on the planet, and the population keeps growing :(

morphine wrote:Titan, my suggestions: put "introduction and purpose" together and number the steps so that it's easier to read. As it is now, it's bound to scare the newbies (gaaah, too much text, my brain already hurts!).

Oh, but wait, I was supposed to write this. No sticky then, sorry. No soup for you!

Kidding, it's stickied

Lol! Thanks. I had started writing it a few weeks ago, and forgot about. Don't ask me how, I had the text file saved on my desktop.

Off to edit it again.

The best things in life are free.http://www.gentoo.orgGuy 1: Surely, you will fold with me.Guy 2: Alright, but don't call me Shirley.

Richie_G wrote:Just one question: when I first initialise a brand new drive in the disk manager, is it ok to do a quick format or should I leave it to do a full one?

A quick format is enough to get it up and working. The full format will completely format the disk's capacity. It'll take an hour(-ish), but you will get the disk's surface verified in the process, similar to a full surface scan in Windows, for example.

There is a fixed amount of intelligence on the planet, and the population keeps growing :(

Richie_G wrote:Ah ok, thanks. I wasn't sure if it may affect the performance of the drive in some detrimental fashion.

No, it won't affect performance at all. Some people always do a complete format, but if you trust the QA of the drive mfr at all (and if you don't, why did you buy the drive) you shouldn't need more than the quick format on a brand new drive. With drives that have been in use and/or may have had bad sectors, a full format is worthwhile.

What can affect performance is the format parameters (cluster size, etc) but these days the defaults are the right choice (if you know enough to be in a situation where they aren't, you probably know enough to know what the right parameters are). There's also an issue with SSDs (and pre-Windows 7 OSes) with aligning partitions on a block boundary, but that's not something you have to worry about with a traditional hard drive.

thanks for the post, I was wondering if the steps are the same for windows 7 64 bit. I have a desktop that just went and I think its the hard drive. I was also wondering if anyone could help by answering the following question: is there any way to test a computer (diagnose) without having to use another pc?

Sure, there are a bunch of tools like memtest that you can run from a USB flash drive. But you should start a new topic -- in General Hardware unless you're certain it's the HD -- and lay out your problem in detail (Is it booting to the BIOS? Can the BIOS see the hard drive? Etc)

Got a new drive? Want to clone your partitions, regardless of size? Partition Magic using Gparted ... aka PartMagic or Clonezilla, both opensource freely downloadble software will help you clone your old drives to your new one.

And as a sidenote, both can be used for raw sector by sector backups. Toss them onto a network drive, and use 'forfiles' to delete any file older than 7 days? Sheeit, that's symantec backup exec for free. But you gotta do some scripting/boot magic for it to work properly. Or one could use forfiles & windows backup on a 7 day backup rotation. I do this for a few servers at work. It's easy. and it's cheap. (zero dollars) - my favorite amount. Requires some disk dump space tho. 7x current disk usage for a weekly backup scheme.