Linux.com

mount command in Ubuntu

Link to this post 09 Jan 12

Does the "/media/tmp_ext4" folder exist?

mkdir -p /media/tmp_ext4

And try again

Link to this post 09 Jan 12

Yes it worked this time, without any error or something.
Now I have another question: Is the process the same under ANY compilation of the Linux kernel? I mean Debian, Fedora, RedHat, whatever. Is it that in general "in Linux OS" first the mount directory must exists, and then do the mounting?

If yes, then in Ubuntu file managers, such as Dolphin, when I mount a volume something like a script ought to create the directory, then execute the mount command, and remove the directory when unmounting, right? And thus there's no way to do the mounting with a nonexistent directory, right?

Link to this post 09 Jan 12

You cannot mount any device on something that doesn't exist, I find that pretty obvious ;)

PS: what does this has to do with compilation?

Link to this post 09 Jan 12

:-D , yeah, I know its obvious, but I thought maybe the drive directories in /media, like RAMFS ought to be something temporary or virtual or something, well now you're telling me its not so, thanks so much!

And oh, one last question (I'm just curious so I repeat it): Therefore softwares such as file managers do automatically create and remove the directories, right? (I now know I must create the dirs myself manually, and at least once.)

And no, its not related to compilation, I was just asking it for other uses.

Thanks so much anyway, Marc.

Link to this post 09 Jan 12

The actual behaviour is a little trickier than just creating a folder and then mounting it.

I'm no expert in the matter, I just know that filemanager used to rely on HAL(hardware abstraction library) and now they do in (AFAIK) polkit and dbus to manage permissions and proper device ids as well as other things.

Regards

Link to this post 09 Jan 12

Fine! thanks. ;)

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board