DSL: Hotplug and USB mount points

DSL uses a process called hotplug that detects changes in the USB system, such as when a media or storage device is plugged in or removed. Hotplug is scripted so that it sets mount points for new devices as they’re added. It does this sequentially, not specifically per device. This means that USB storage devices are detected in order they’re plugged in and not set up so one device is always sda1, another is always sdb1, etc. The whole set of mount points will reset upon the next reboot.

The default hotplug settings set the USB points for user and auto. This means you don’t have to mount them as root and you’ll have read-write access to files. The auto part means that it will detect and mount using the filesystem type on the device (so long as it’s something it recognizes).

/mnt in emelfmThe first image shows emelfm set up in one pane (the arrows for either pane in the bar between the menu and the column label let you toggle to show one pane) to show the mount points set by hotplug in /mnt. I first plugged in a USB stick, then my mp3 player (and later my PDA). The stick’s point is sda1, the mp3 player’s is sdb1, my Palm is sdc1.

The second image shows the same thing in rox filer. /mnt in rox filer

I use rox as pinboard, so I can set my mountable devices on my desktop. The third picture shows the area of my desktop where my devices are located. You can also set up your mountables (including UCIs/UNCs) on rox panels.what i need from /mnt on pinboard

Mounting devices that have points automatically set is very easy using emelfm, rox filer, or the rox pinboard: right click on the point you want to mount and select mount. Either way, you’ll next find yourself looking at the contents of the directory you just mounted. You can also so the same thing using the command line (mount /mnt/sda1).

Don’t forget to unmount devices after use! It’s done the same way — right click, unmount. Then wait a few seconds and it’ll be safe to unplug.

ISSUES: Sometimes hotplug can get a little wacky and set multiple points after re-mounting the same device.

For example, I’ve had it set a point in /mnt for sda when it already has one set sda1. When this has happened, the sda point is mountable but doesn’t work (block errors) and sda1 is no longer mountable. The way I get around that is to unplug the device, open file manager as root, remove both entries (sda and sda1), close the file manager, and then reinsert the device. Hotplug then re-assigns the mount point sda1 and everything is working again.

Another issue I’ve encountered is with devices that have peculiar settings, such as a check back at the operating system. There are only a few brands that do this, and similar things, so they’ll work only with Windows or whatever. Most devices will work cross-platform. Some, though, are just goofy. If you buy something like that — any hardware or device — and it won’t work in Linux, take it back for a refund and buy something that will. That’s the fastest way to get retailers and manufacturers to understand that they need to sell things that work across platforms.

A Note About U3 Devices: U3 is a system that allows USB media to launch applications from the drives on which U3 is installed. U3 currently works only in Windows. It allows users to carry their favorite applications with them and use them without installing them on a host computer so everything — application, settings, the user’s documents and files — is contained on the USB key and nothing touches the host computer’s hard drive. There are many Windows and cross-platform applications that work with U3: Gaim, Open Office, etc.

Let me explain a very serious misunderstanding a lot of people have expressed. The biggest complaint I’ve read about how U3 works is that U3 starts as soon as the device is plugged in. This is NOT a U3 issue, it’s a Windows default setting. The default setting that starts U3 is the same one that causes Windows to start playing music CDs when they’re put in the CD drive. I never read so many objections to that, even when certain record labels were installing rootkits via their CDs. That default setting can be changed, disabled. It’s not evil, it’s not a U3 quirk, and it’s only a security risk if someone isn’t diligent about what’s installed on the U3 drive. The applications don’t start by themselves, only U3 does. And it only does that in Windows (specifically ME, XP, and Vista; this also applies to 95/98 only when USB/U3 drivers are installed), never in Linux, BSD, Mac, BeOS, or any other OS.

U3 doesn’t conflict with Linux (except with respect to licensing, but that’s a separate issue). U3 drives are no different than any other except they have the U3 features available. They’re formatted vfat, which Linux is very capable of reading and writing. They function just like any other vfat USB drive under Linux.

If you still want to get rid of it, such as when reformatting the drive in ext2, you’ll have to use a Windows computer and one of the tools to remove the U3 pseudo-partition. That pseudo-partition will persist unless it’s removed using one of those tools. There are several available, including from the U3 application download site.


%d bloggers like this: