Tag: hard drive

Installing a new hard drive in linux

I installed the new hard drive and powered on the system.

1. I used fdisk /dev/sda, then I used the print command p to make sure which /dev I was going to format. I wish I knew a better way of finding where the hard drive was, but I’ll have to look it up another time.

2. In fdisk use n to create a new partition.

3. Choose to create an extended or primary partition. I will create a primary partition so I will choose p. If you decided to create an extended partition you will need to create a logical partition inside of it after this set.

4. For partition number I will choose 1, as this will be the first partition.

5. For the first cylinder I will just leave it blank and let it fall to the default value of 1.

6. For the alst cylinder leave it the default value if you wish to use the entire drive. If you want to create multiple partitions then specify the last cylinder or size of your desired partition here.

7. Enter p to print the partition table. Verify everything is correct.

8. Enter w to write your changes to the partition and exit fdisk.

9. Now to format the drive and create the file system. use the following command:
mkfs -t ext3 /dev/sda1
where ext3 is the filesystem type you want to use and sda1 is the partition I just created.

10. Now mount your new drive.
note that on ubuntu systems the filesystem will be automactically checked every 23 mounts or 180 days, whichever comes first. You can use tune2fs -c or -i to override.

There’s a better tutorial over here:
http://www.yolinux.com/TUTORIALS/LinuxTutorialAdditionalHardDrive.html