WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mnttool vs. manual mount  (Read 1934 times)

Pseudoman

  • Guest
mnttool vs. manual mount
« on: October 12, 2012, 07:23:22 PM »
I've tried mounting a USB floppy drive manually from the console, but I can't write to the disk unless I have root privileges. I tried sudo chmod 777 /mnt/sdd, but it doesn't set the permissions.

When I use mnttool, I can access the drive, no problem. ls -l /mnt/sdd shows that it is in 777 mode (drwxrwxrwx).

What does mnttool do to mount drives, and how can I do it manually so I don't have to start X up every time I need to access a floppy disk? I would like understand the difference and learn what is going on.

Thanks in advance.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: mnttool vs. manual mount
« Reply #1 on: October 12, 2012, 08:36:51 PM »
Hi Pseudoman
You should be able to mount the drive as a regular user like this:
Code: [Select]
mount /mnt/sddand be able to read/write to it.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: mnttool vs. manual mount
« Reply #2 on: October 13, 2012, 09:43:06 AM »
Hi Pseudoman
Back to your question, mnttool gets a list of mountable devices from /etc/fstab by running the  mountables.sh
script. That script creates the file  /tmp/mountables. Each line in  /tmp/mountables  contains a device name
followed by a ~ followed by the volume name if it exists. You should be able to mount any of those devices
using:
Code: [Select]
mount /mnt/deviceThe device will be mounted according to the conditions set in  /etc/fstab. If fstab lists the device as  RO  then
that device is mounted as read only by default.

Pseudoman

  • Guest
Re: mnttool vs. manual mount
« Reply #3 on: October 13, 2012, 02:27:46 PM »
Thanks for the responses.
Looks like I've been using the mount command incorrectly for the past few years... :-[

I had been using:
Code: [Select]
sudo mount /dev/sdd /mnt/sddinstead of
Code: [Select]
mount /mnt/sdd
Thanks for the explanation of how mnttool works. I can now better appreciate how it simplifies all that work.
Again, thank you.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: mnttool vs. manual mount
« Reply #4 on: October 13, 2012, 02:47:29 PM »
Hi Pseudoman
It's not incorrect, just unnecessary when mounting items listed in fstab. If you wanted to mount a drive to
/home/tc/documents , then you would need to use the version you cited, since  /home/tc/documents  is
not associated with a device in fstab. You would most likely also want to  chown  and  chmod  on that
mount point so that user  tc  could work with it.