Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: bigpcman on June 09, 2009, 07:33:04 AM

Title: Why don't usb flash devices auto mount?
Post by: bigpcman on June 09, 2009, 07:33:04 AM
Just curious as to why when plugging in a USB flash device it is recognized as a "device" and added to  /mnt but it is not mounted. What would I have to change to get this to happen automatically?

Also, I have noticed a super trivial carriage return is required after plugging a USB device in to get terminal  control back.
Title: Re: Why don't usb flash devices auto mount?
Post by: curaga on June 09, 2009, 08:19:27 AM
Because that would be rude, and for many would not be wanted. Think the autorun on Windows systems.

To get it to happen automatically, you could add "mount -a" to the end of rebuildfstab
Title: Re: Why don't usb flash devices auto mount?
Post by: bigpcman on June 09, 2009, 08:34:45 AM
Because that would be rude, and for many would not be wanted. Think the autorun on Windows systems.

To get it to happen automatically, you could add "mount -a" to the end of rebuildfstab

Thanks. Sometimes I just can't help myself and will be rude. I assume this will auto mount all devices "plugged in" to any device port. Let's say I wanted to limit this behavior to just USB devices. I don't want to auto mount CDs.
Title: Re: Why don't usb flash devices auto mount?
Post by: curaga on June 09, 2009, 08:43:04 AM
If your drives are fat32, "mount -a -t vfat" only mounts those.

If you wish to restrict things better, just parse /etc/fstab or the directories in /mnt for desired devices.
Title: Re: Why don't usb flash devices auto mount?
Post by: bigpcman on June 09, 2009, 09:11:22 AM
To get it to happen automatically, you could add "mount -a" to the end of rebuildfstab

I just tried this and it didn't mount sdb1 after I plugged the device in.

The device is present and I can manually mount and unmount it.

I'm using microcore 2.0 with core extensions.
Title: Re: Why don't usb flash devices auto mount?
Post by: curaga on June 09, 2009, 09:56:11 AM
Ah, indeed :P I forgot noauto is added in the options list.
Title: Re: Why don't usb flash devices auto mount?
Post by: bigpcman on June 09, 2009, 11:22:44 AM
Ah, indeed :P I forgot noauto is added in the options list.
This message is a bit too cryptic for me. Are we giving up?
Title: Re: Why don't usb flash devices auto mount?
Post by: curaga on June 09, 2009, 12:04:00 PM
No, you can just remove "noauto" from the options list in rebuildfstab :)
Title: Re: Why don't usb flash devices auto mount?
Post by: mikshaw on June 09, 2009, 12:18:59 PM
No giving up allowed =o)

"noauto" is a mount option for the device added to fstab.  This makes the device need to be mounted explicitly, so mount -a won't mount it.


EDIT: ignore the following.  I misread curaga's reply and his solution is much better.

Personally I'd go for a check of the specific device rather than have to manually edit fstab every time:

Code: [Select]
for i in sda1 sdb1 sdb2 blah blah blah whatever; do
if grep "/dev/$i" /etc/fstab; then mount /dev/$i; fi
done
...or something like that
Title: Re: Why don't usb flash devices auto mount?
Post by: kerpob on June 11, 2009, 02:03:14 AM
puppy had this brilliant mount utility called mut (or maybe mutt). You clicked on the icon and it showed all your drives. You could then click on a button next to each one to mount or unmount. Another option was a link to open them in a file manager (Rox was the one I had at the time).
Title: Re: Why don't usb flash devices auto mount?
Post by: curaga on June 11, 2009, 02:04:14 AM
We have a mount tool too ;)
It shows one drive at a time, you can click through all the drives and mount/umount.
Title: Re: Why don't usb flash devices auto mount?
Post by: kerpob on June 12, 2009, 04:23:44 AM
We have a mount tool too ;)
It shows one drive at a time, you can click through all the drives and mount/umount.
I know - and it is one of the better ones I've seen. But Mut(t) is better looking!
Title: Re: Why don't usb flash devices auto mount?
Post by: Lee on June 12, 2009, 06:04:27 AM
I'm not familiar with Puppy (tried it once a while back, didn't care for it, don't remember why) so I can't say anything about "better looking", but I really like tc's mount tool - simple and functional, elegant even.

It would be cool if there were a variant with the buttons side-by-side instead of over-under, and smaller, so it would swallow without gagging the tray (in jwm) - though the way it is now is much better for unswallowed use.  Gentler colors wouldn't hurt.

Title: Re: Why don't usb flash devices auto mount?
Post by: bigpcman on June 12, 2009, 07:50:54 AM
I'm not familiar with Puppy (tried it once a while back, didn't care for it, don't remember why) so I can't say anything about "better looking", but I really like tc's mount tool - simple and functional, elegant even.

It would be cool if there were a variant with the buttons side-by-side instead of over-under, and smaller, so it would swallow without gagging the tray (in jwm) - though the way it is now is much better for unswallowed use.  Gentler colors wouldn't hurt.



My vote would be for a submenu in tools that would support changing some of the system variables like "enable/ disable"  automount.