Add a Hard Drive in Ubuntu

In linux a hard drive needs an access point in the filesystem. Here is a quick and dirty method to get a hard drive to mount every time to the same place at startup:

Create an empty directory for the drive:

sudo mkdir /disk2

Use your favorite disk utility to create an ext3 partition.

edit fstab to mount at startup:

sudo nano /etc/fstab

add the following line (adjust directory and drive to match your configuration):

/dev/hdb1       /disk2   ext3   defaults        0       0

Ctrl-X, Y to save the file

sudo mount -a

If everything went right you should have access to the disk from your formerly empty directory.

Leave a Reply

You must be logged in to post a comment.