Posts Tagged ‘hard drive’

Installing an Internal Hard Drive on Linux

Mounting an internal hard drive in Linux is not quite as simple as installing a hard drive on a Windows machine. After installing the hard drive, there are only a few steps that I will cover below. First, before this will work, you need to make sure the motherboard recognizes there is a new hard drive. Many of the SATA driven computers require entering the BIOS and Enabling the particular SATA port number.

  1. Run fdisk -l to list all the disk, their capacity, and their space available. There may be many more drives listed than you actual have running, so you will need to identify which drive is new. The best way to do this is to look at the drive capacity. Remember thatt 1024 MB =  1 GB. In the example below, we will assume that /dev/sdb1 is our new drive.
  2. Next,  we add the following command to our fstab file located in the /etc directory. Edit the fstab file with your favorite editor and add /dev/sdb1 /mnt/hd1 ext3 defaults 0 0. Save and Close the file. Not that /mnt/hd1 can be any directory in the machine that you want.
  3. At the prompt, type mount -a to remount all the locations listed in the /etc/fstab file. You can now see a drive called hd1 in the /mnt directory.

Hard Drive Partition Formatting Application

You may already know that a hard drive on Windows is formatted as Fat32 or NTFS partions. But how do you convert from a popular file system to one that you need in Linux? GParted is free software that through an easy to use interface allows the format and partition of an entire hard drive.

The supported file systems are:

  • ext2
  • ext3
  • fat16
  • fat32
  • hfs
  • hfs+
  • jfs
  • linux-swap
  • ntfs
  • reiser4
  • reiserfs
  • ufs
  • xfs

The application is most easily downloaded as a Live CD (which is a CD that can be automatically booted during startup from the console). Before using this application, be sure to back up any information on the drive, as the operations will clear all data.

The application can be downloaded from their website at http://gparted.sourceforge.net/. The latest version as of the writing of this article is version 0.3.8