Mount point does not exist что делать
Перейти к содержимому

Mount point does not exist что делать

  • автор:

Что может быть не так с простой операцией монтирования в Ubuntu Server?

Привет. Не могу понять, что именно я упустил:
Поставил в Vbox Ubuntu Server.
Пытаюсь расшарить общую папку с хостом, и делаю все по простой схеме:
1) подключаю диск дополнений Vbox через графический интерфейс Vbox
2) выполняю в терминале Ubuntu
apt-get install build-essential
mount /dev/cdrom /media/cdrom/

Однако система пишет, что mount point does not exist

Странно то, что делаю я это и из под sudo и из под root — везде одно и то же.
А еще более странно, что с неделю назад я уже пробовал на такой же системе это проворачивать — и проблем не было. Да, видимо я что-то упускаю, но что блин? Тут две операции! Неделю назад работало, сейчас нет. Специально создал виртуальные машины идентичные (единственное поменял объем на более большой).

  • Вопрос задан более двух лет назад
  • 730 просмотров

1 комментарий

Простой 1 комментарий

Fixing Mount Point Does Not Exist Error in Linux

Learn how to troubleshoot and fix the ‘mount point does not exist’ error in Linux with our step-by-step guide.

Fixing Mount Point Does Not Exist Error in Linux

While trying to mount your device, you may encounter an error saying «mount point does not exist»:

mount point does not exist error in linux

And if you’re curious about the reason why it happened, it is all because of the mount point whether you want to mount the drive does not exist!

So the solution is to create a mounting point and mount the drive again.

And that’s what I’m going to walk you through in this tutorial.

How to solve Mount point does not exist error in Linux

The first step is to verify whether the mounting point exists or not.

To do so, you can use the mount command combined with the grep command to filter the mounting point from the huge list:

mount | grep -w 'Name-of-mounting-point'

As I’m looking for a mounting point named drive , I will be using the following:

mount | grep -w 'drive'

varify whether the mounting point exist or not in linux

And if you get empty output, the mounting point does not exist on your system which means you will have to make one manually!

So let’s create a mounting point.

To create a mounting point, all you have to do is execute the following command syntax:

sudo mkdir /mnt/mount_point 

Make sure to change the name of your desired mounting point with mount_point in the above command.

As I wanted to create a mounting point named drive , I will be using the following:

sudo mkdir /mnt/drive

Once you are done creating the mounting point, now, you can mount the drive without any issues:

And if you want to verify whether the drive was mounted successfully or not by listing the mounted drives in Linux.

mount -l | grep '/path/to/drive'

list mounted drives in linux

And as you can see, the drive is mounted as expected!

But there is a better way to find mounted drives!

While most Linux users won’t require to check mounted drives frequently, if you are dealing with numerous amount of drives at once, there is a better alternative to check mounted drives.

You can use the findmnt utility which displays output way better than the usual mount command but also has tonnes of other features.

And the good news is we have a detailed guide for that purpose:

I hope using this guide, you won’t face the same error anymore.

And if you have any queries or suggestions, feel free to ask me in the comments.

Mount Point Does Not Exist, Despite Creating It

So early on, the video suggests running a few commands:

# mkdir /mnt/home # mount /dev/sda2 /mnt # mount /dev/sda3 /mnt/home 

But the last command gives me the following error:

mount: mount point /mnt/home does not exist 
  • First question: The Arch guide doesn’t say I should partition my disk as the video does. Should I just forego the fancy partition scheme?
  • Second question: If I should go with this partition scheme, how can I get around this error, and why is it happening in the first place?

asked Jan 22, 2016 at 17:42
893 1 1 gold badge 7 7 silver badges 12 12 bronze badges

Now that I think about it, this might not be the best forum. Is this better suited for superuser or unix SE sites?

Jan 22, 2016 at 17:42

2 Answers 2

This is because you created /mnt/home before mounting something to /mnt . When you did that, the «home» directory is hidden by the newly mounted /mnt filesystem.

You need to: (after unmounting everything above)

mount /dev/sda2 /mnt mkdir /mnt/home mount /dev/sda3 /mnt/home 

answered Jan 22, 2016 at 17:47
569 1 1 gold badge 6 6 silver badges 17 17 bronze badges
Nice. Love easy solutions. I’ll give it a crack this afternoon
Jan 22, 2016 at 17:51
Worked like a charm!
Jan 22, 2016 at 18:32
Cool, glad to hear it!
Jan 22, 2016 at 18:33

Out of curiosity, how come the guy in this video has no problems with doing things in the order I described in my original question?

Jan 22, 2016 at 22:15

If /mnt/home already existed on the mounted filesystem, he wouldn’t have had a problem. Chances are he already made it in preparation for the video.

Jan 22, 2016 at 22:19

First you create a directory /mnt/home

# mkdir /mnt/home 

But then you mount /dev/sda2 to mount, which shadows over /mnt/

# mount /dev/sda2 /mnt 

Then try and map to a folder that does not exist as you never made the folder on sda2 which you mapped to /mnt/

# mount /dev/sda3 /mnt/home 

Is this intended?

This would work

# mount /dev/sda2 /mnt # mkdir /mnt/home # mount /dev/sda3 /mnt/home 

because you mount sda2 to /mnt/ then create the folder on sda2 (Which is now /mnt/) then map /dev/sda3 to this folder (Which exists on /dev/sda2)

The real question is why do you want to map /dev/sda2 to /mnt/? /mnt/ is for mount points, sure you could store then on a different physical drive but it won;t really save space or anything.

Creating a mount point if it does not exist

When using the mount utility, if you specify a directory that does not exist, that is considered an error. Is there any option I can use so that mount points get automatically created if they don’t already exist?

37.2k 2 2 gold badges 69 69 silver badges 106 106 bronze badges
asked Dec 17, 2011 at 21:06
1,155 2 2 gold badges 10 10 silver badges 15 15 bronze badges

Strange that the mount utility doesn’t do this by default. I’m sick of typing: mkdir /media/USB , mount /dev/sdb1 /media/USB ; umount /dev/sdb1 , rmdir /media/USB .

Sep 14, 2014 at 21:29
Yep, I too wish this was a feature.
Jan 8, 2017 at 4:33

Yeah, I understand it not doing it by default, similar to «mkdir /one/two/three» won’t get created if «/one/two» doesn’t exist, but shouldn’t there at least be an option to force it with mount?

Mar 30, 2017 at 14:59

HERE IS THE ANSWER: askubuntu.com/questions/88523/… — instructions for installing pmount to prevent this from happening.

Nov 16, 2017 at 22:25

I tried pmount, doesn’t seem to work without manually running the command with the device. found this, seems to work great (16.04, headless) serverfault.com/a/767079/453980 mounts on boot, and handles hot(un/)plugging

Jan 27, 2018 at 18:07

3 Answers 3

if you want to create a Mount Point called DISK1, then type the following command in the terminal :

sudo mkdir /media/DISK1 

answered Dec 17, 2011 at 21:11
1,226 10 10 silver badges 12 12 bronze badges
Yeah, I was hoping for an option to mount , but this is fine, I guess.
Dec 17, 2011 at 21:20
Pulling out the drive then reinserting it will create /media/DISK2 unless you install pmount.
Nov 16, 2017 at 22:22

No, the bare mount utility do not offer such an option.

It is done when mounting from a file manager like Nautilus, though.

answered Dec 17, 2011 at 22:13
92.7k 11 11 gold badges 167 167 silver badges 179 179 bronze badges
how can Nautilus do it then?
May 4, 2013 at 7:58

@AndreaBorga it checks if the directory exists before mounting. If the mountpoint doesn’t exist as a directory, creates it and then mounts.

Apr 2, 2015 at 10:41

Install the pmount utility and let it handle /media/user/ mount points automatically. No more worries about how and where /media/user/ devices mount and by which names.

sudo apt-get update sudo apt-get install pmount 

Then whenever you insert a removable device, it will automatically be mounted under /media/username/, by name.

For example: My USB stick is named «SYSBKP» so it automatically mounts as /media/pi/SYSBKP

It also handles unexpected ejects. And remounts. Silently.

  • Generally, it will pop up file manager to show you what you just mounted.

Behind the scenes it makes sure the buffers are always flushed just in case the USB is pulled without warning. No more need for sync;sync;sync like the old days.

FYI, I installed from a 14.04 LTS disk and let it upgrade me to 16.04 LTS when it offered. On a fresh SSD drive — I let it take the entire space.

In any case, pmount is a very important piece of software to have if you use /media/username/ for removable devices.

If you don’t use it, the default action is to create new mount points for each insertion, with a digit appended to the name for each one. Even normal ejects cause this behavior. You end up with mount points like /media/username/SYSBKP, /media/username/SYSBKP1, /media/username/SYSBKP2, etc.- and you don’t know which one is the active one.

This means you can’t write scripts that assume the mount point name (unless you include all the mount commands in the script). Should you choose the wrong one it is treated as a local directory.

pmount makes sure your USB drive it has its own assigned mount point under /media/username/. In this case, it is always /media/pi/SYSBKP

It also works when you put in another USB flash drive with the same name. So it is not going by UUID.

I not only use this for flash drives, but also for fulll-size powered backup drives, for rsync backups, and have full confidence that the scripts will work without modification.

It is a simple, reliable solution to creating mount points.

Note that I have personally tested it with NTFS, FAT32 and the various EXT formatted drives. If the drive contains multiple partitions it will mount regular file systems individually by name, avoiding the swap partition. This is all visible in nautilus, and is alluded to in more detail in this Q&A:

I see in comments there is an issue with the NFS+ Time Machine drives.
It may or may not work automatically

It turns out Apple does a couple slick things with the file system to make incremental backups work, including hard linking to directories, which isn’t allowed in Linux. So for anyone that needs to access their Time Machine from something other than its associated Mac, here’s how you do it. (see linked article for the rest)

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *