Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Pseudoman 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.
-
Hi Pseudoman
You should be able to mount the drive as a regular user like this:
mount /mnt/sdd
and be able to read/write to it.
-
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:
mount /mnt/device
The 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.
-
Thanks for the responses.
Looks like I've been using the mount command incorrectly for the past few years... :-[
I had been using:
sudo mount /dev/sdd /mnt/sdd
instead of
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.
-
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.