0

I am trying to access files in the partition named "Envision" from the Ubuntu Mate terminal.

The output of

df -h

is as follows

Filesystem      Size  Used Avail Use% Mounted on
udev            855M     0  855M   0% /dev
tmpfs           175M  5.9M  169M   4% /run
/dev/sda2        96G   28G   63G  31% /
tmpfs           874M  1.6M  873M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           874M     0  874M   0% /sys/fs/cgroup
tmpfs           175M   40K  175M   1% /run/user/1000
/dev/sdb1        30G   28G  2.1G  93% /media/snow/SanDisk-32GB
/dev/sda3       126G  115G   12G  91% /media/snow/Envision
/dev/sda6        76G   63G   13G  84% /media/snow/Softwares

When I try to mount hard disk partition named "Envision", using

sudo mount /dev/sda3

I get the following output

mount: can't find /dev/sda3 in /etc/fstab

Am I missing out on something? Kindly help.

  • Looks to me like /dev/sda3 is already mounted at /media/snow/Envision. Try ls -al /media/snow/Envision and see if that works. – Tigger Jun 2 '17 at 4:20
0

Couple of things happening here. You want to mount the drive /dev/sda3 to access the files in Envision.

df -h is reporting that /dev/sda3 is already mounted at /media/snow/Envision, but you tried anyway with the command sudo mount /dev/sda3.

The correct format for mount is (you missed the <mountpoint> part):

sudo mount /dev/<drive> /<mountpoint>

Placing sudo in front is only a requirement unless you are currently the root user.

The reason sudo mount /dev/sda3 spat out that particular error message is because (at a guess) you did not include any details about /dev/sda3 in /etc/fstab, which mount will look in if the mount point is missing.

BTW, even if the drive is mounted at one point, you can re-mount at another point (so that one drive is mounted in two locations) but personally I do not recommend this.

Edit:

If this drive is to be mounted only a few times (like an external drive) then you can do this:

sudo mkdir /Envision
sudo mount /dev/sda3 /Envision

You can then access the drive contents at /Envision. For example:

ls -al /Envision

Alternatively if you are keeping this drive in your system all the time you can edit /etc/fstab and then the drive will be found when you reboot the system (or if you do sudo mount -a). To add the drive to /etc/fstab

First get the UUID or universally unique identifier like so:

sudo blkid

The output will be something like:

/dev/sda2: UUID="85ec7b1a-7d67-47f1-bcc9-4c4f4ed370b5" TYPE="ext4"

The important part is the UUID="85ec7b1a-7d67-47f1-bcc9-4c4f4ed370b5" BUT you also need to make sure you get the TYPE correct.

Next, open /etc/fstab in a text editor as root. I use vim, so I do:

sudo vim /etc/fstab

Now add a line with the drive details. Using my example above:

UUID=85ec7b1a-7d67-47f1-bcc9-4c4f4ed370b5 /Envision ext4 nosuid,nodev,nofail 0 0

If the drive type is ntfs you would replace ext4 with nfs BUT I'm not 100% sure what the other options would be. You would need to check them.

Save the file and type sudo mount -a and if there are no issues your drive will be mounted and will be mounted on the next reboot as well.

| improve this answer | |
  • "BTW, even if the drive is mounted at one point, you can re-mount at another point." Can the mount point be any arbitrary location where I want to mount the drive onto? Kindly help with this. – Upendra01 Jun 2 '17 at 6:16
  • "The reason sudo mount /dev/sda3 spat out that particular error message is because (at a guess) you did not include any details about /dev/sda3 in /etc/fstab, which mount will look in if the mount point is missing." What information about /dev/sda3 needs to be put in /etc/fstab. Could you please help me with this – Upendra01 Jun 2 '17 at 6:18
  • See edited post. Please remove at least one of the duplicate comments above. – Tigger Jun 2 '17 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.