Why can't remount the disk with command?

The /dev/sdb2 was mounted on /media/debian/WINFAT.

df /media/debian/WINFAT
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 24406016 402256 24003760 2% /media/debian/WINFAT

enter image description here

Umount it:

sudo umount /dev/sdb2

enter image description here

Remount it with command

sudo mount /dev/sdb2 /media/debian/WINFAT
mount: mount point /media/debian/WINFAT does not exist

Why can't remount the disk with command?

Note:you can move mouse over the WINFAT and left click to mount it.

1

1 Answer

The target directory must exist before mounting. And it will continue to exist after unmounting. It was actually removed by something else after your 'umount' command had completed.

Your file manager handles disk mounting with the UDisks2 service, which is designed for handling portable media – so it automatically creates the mountpoint directories when needed, and it's also UDisks2 which automatically removes them as soon as the mount itself is undone.

So when using the regular 'mount' command you don't get any of this automation; you need to mkdir the target directory before you'll be able to mount anything on it.

# mkdir /media/debian/WINFAT
# mount /dev/sdb2 /media/debian/WINFAT

After unmounting a disk mounted this way, the directory should remain:

# umount /media/debian/WINFAT
# ls -l /media/debian

Or you can also call UDisks2 like your file manager does, and get the same automation:

$ udisksctl mount -b /dev/sdb2
...
$ udisksctl unmount -b /dev/sdb2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like