Search This Blog


Adding/Mounting a Second Drive to Ubuntu

Quick instructions on how to mount/auto-mount a secondary drive in ubuntu.

Step 1: Finding the drive
Find the drive using dmesg
It will likely end up being /dev/sdb or something similar

If you are unable to find it with dmesg try
sudo fdisk -l

This will only show you /dev/sda drives exist if you do not currently have a second drive attached. Though at the bottom you will see that there is a new drive but it has not been recognized because it has not been formatted to the proper filesystem.

Step 2: Making a mounting location/directory
"mount" will be the directory which we are attaching this drive
sudo mkdir /mount

Step 3: Changing permissions for all users
sudo chmod -R 777 /mount

Step 4: Formatting the drive to the correct file system
sudo mkfs.ext3 /dev/sdb

Step 5: Testing the drive
sudo mount /dev/sdb /mount

If this is successful move on to the next step of making the drive auto-mount

Step 6: Auto-mounting using fstab file
sudo nano /etc/fstab
Add the following:
/dev/sdb  /mount  ext3  defaults  0  0

Step 7: Mount the drive without having to reboot
sudo mount -a
Run the command below to see if the drive has properly mounted:
It should include
/dev/sdb  /mount

Step 8: Testing the mount
touch /mount/test
This will write a file called "test" on the drive if this is successful you have been able to mount the drive successfully.

You can now add files and folders however you would like to this mount point.

No comments:

Post a Comment