Ubuntu – Mounting /dev/sdd1 fails: according to mtab, /dev/sdd1 is already mounted

fstabmount

Trying to mount drive but get an error

Error mounting: mount exited with exit code 1: helper failed with:
mount: according to mtab, /dev/sdd1 is already mounted on /
mount failed

According to 'help answers I need to edit fstab mtab but where are these files located? Are NOT under etc unless 'hidden'? Am novice to Ubuntu…

Best Answer

This is the file you need to add devices that should be mounted on startup and no there is no reason for these 2 to be not on your system:

rinzwind@discworld:~$ ls /etc/fstab 
/etc/fstab
rinzwind@discworld:~$ ls /etc/mtab
/etc/mtab

These files are not hidden and have to be on your system in order to boot.

  • /etc/mtab is generated by the system so you do not need to edit this.
  • /etc/fstab (link opens man page) you can edit yourself.

Mine looks like this:

rinzwind@discworld:~$ more /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#                
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=95a95954-0159-4a36-9a72-8b30b76283d2 /               ext4    errors=remount
-ro 0       1
# /discworld was on /dev/sda4 during installation
UUID=bb498131-d803-4a57-97c8-98f9f01a8364 /discworld      ext4    defaults      
  0       2
# /discworld2 was on /dev/sdb1 during installation
UUID=b968131f-53d0-408c-8d66-7f429d73fb26 /discworld2     ext4    defaults      
  0       2
# /home was on /dev/sda3 during installation
UUID=82f7974a-7c77-4a1e-a494-5ee32f622697 /home           ext4    defaults      
  0       2
# swap was on /dev/sda2 during installation
UUID=a81a9a09-862d-4c5a-9baa-fb6a01eaf284 none            swap    sw            
  0       0

You need to find the UUID (look at the comments at the beginning of fstab. You also need to know some other things but you can find these by typing more /etc/mtab | grep sdd1 Write down what is says there: you need that for editing /etc/fstab. Editing system files requires the usage of sudo. I would also strongly advice making a backup 1st like so:

sudo cp /etc/fstab /etc/fstab.20110521

You can edit fstab with:

sudo gedit /etc/fstab

But be sure to use tabs where appropriate.