1

I have Debian-9 dual booted with Windows-8.

When I try to access to my hard-drive's partitions, it gives me :

Failed to mount Not authorized to perform

I tried mount /dev/sda4

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

My /etc/fstab

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda3 during installation
UUID=7393b8df-fc39-4649-9c0d-e818eb77fe8a /               ext4    errors=remount-ro 0       1
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0

I added /dev/sda4 /media ext4 defaults 0 2 and it didnt boot.

What am I missing here? usb drivers are mounted without any error.

My system specs

Linux userA 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
9.4
Debian GNU/Linux 9 \n \l

Thanks in advance.

1 Answer 1

3

To use the mount command you need to provide:

  1. The device.
  2. The directory where you want to mount it (which must already exist).
  3. If the filesystem is not detected, then you'll need to provide the filesystem type.
  4. Any additional optional filesystem-specific arguments.

For example, assuming /media and /dev/sda4 both exist and /dev/sda4 contains an ext4 filesystem, you can mount it with this command: sudo mount /dev/sda4 /media, or more explicitly as sudo mount -t ext4 /dev/sda4 /media

sudo is necessary because on Linux only root can mount without an /etc/fstab entry. To read a novel of all the ways to use mount, run man mount.

2
  • Thanks, this worked. But I had to change permission to other users and even with that I can not copy/paste files to there. Also its gone after reboot. Jun 6, 2018 at 0:30
  • 2
    Using the mount command is for temporary mounts. You need an entry in /etc/fstab to make it persistent. Also, since you have your CDROM to mount at /media/cdrom I don't recommend mounting the HD on /media Use man fstab to learn more. Jun 6, 2018 at 14:20

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.