Welcome to the Linux Foundation Forum!

mount command in Ubuntu

Hi.

I wanna mount my volumes in bash, since there's been some challenge with my Ubuntu GUI. I struggled with the "mount" command also it's man page, but I didn't succeed in the end.

my volume is /dev/sda10, with name "tmp_ext4". Would you please tell me bash command to do this? And then how to UNmount?

Thank you!

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 647
    1. sudo mount -t auto /dev/sda10 /path/to/mount/point
  • Posts: 59
    edited January 2012
    thanks marc, it works. Looks like I've gotta study the role of mtab and fstab in a deeper way, since I wasn't using the "-a".
    Thanks anyway ;-)
  • To unmount,
    umount /dev/sda10
    as root user

    you can make that mount entry in fstab, to mount automatically whenever you boot the distro
  • Posts: 59
    thank you very much! :-)
  • Posts: 59
    edited January 2012
    oops! When I execute:
    1. sudo mount /dev/sda10 /media/tmp_ext4
    I get:
    1. mount: mount point /media/tmp_ext4 does not exist

    No matter what other parameters I use besides (-t, auto, ...), I always get this same message. What should I do?
  • Posts: 647
    Does the "/media/tmp_ext4" folder exist?
    1. mkdir -p /media/tmp_ext4

    And try again
  • Posts: 59
    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?
  • Posts: 647
    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?
  • Posts: 59
    edited January 2012
    :-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.
  • Posts: 647
    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
  • Posts: 59
    Fine! thanks. ;)

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training