Floppies for the New Millennium
The uid and gid mount options are those of my own login account to set file ownerships. More significant is the noatime, provided in order to eliminate unnecessary erase/write cycles. Don't forget, simply doing an ls on any directory will increment the files' atime (access time).
Alert readers may be thinking: “Wait, there's no atime on FAT filesystems!” True. There's only a single timestamp field for each file or directory, but Linux deals with this by updating that single time value on any occasion it ordinarily would update atime, mtime or ctime. So, disabling atime still reduces the frequency of erase/write operations, even on FAT.
All of those mount options can and should be put in /etc/fstab:
/dev/sda /mnt/fob vfat ↪uid=1000,gid=1000,user,noauto,noatime 0 0
One further oddity—no matter what you do, the flash disk always mounts read-only:
mount: block device /dev/sda is write-protected, mounting read-only
This happens even if you specify rw among the mount options. However, you subsequently can enable write access after mounting the flash disk, by remounting with the rw option:
# mount -o rw,remount /mnt/fob
Exactly why /bin/mount insists that the flash disk is write-protected and must be mounted read-only is a genuine mystery. Although some flash disks' plastic casings reportedly sport write-protect switches, the Easy Disk's doesn't. My best guess is that mount is heeding a request from the Easy Disk's built-in controller chip, intended to minimise accidental device fatigue. And it works. As a side benefit, the read-only default seems to render harmless your unplugging of the device when, inevitably, you forget to unmount it first—making it truly a hot-plug device.
Having coped with the hurdles and minor oddnesses of getting Linux support configured for the flash drive—or pen drive, as they are sometimes called—what strikes one most about these devices is how they fade to background. You simply rely on them and take them for granted, which is the mark of any truly successful technology. Documents and applications you use frequently, GnuPG and other crypto keys and files you need to transport among computers, regardless of operating system, are stored on the flash disk and dropped into your pocket. You don't have to worry about magnetic fields, mechanical shock, spontaneous bit-rot or anything else. It simply plugs in to a free port and works. There's nothing else quite like it.
Article about using Linux on a flash drive that registers as /dev/sda1 instead of /dev/sda: www.gctglobal.com/Download/3rd_LED/PalmKey/palmkey.html.
ATAPI Removable Media Device (ARMD) BIOS Specification, formerly the ATAPI Removable Drive (ARMD) Specification: www.phoenix.com/resources/specs-atapi.pdf.
Linux also supports CF devices and can boot from them. See the Memory Technology Device (MTD) Subsystem for Linux Site: www.linux-mtd.infradead.org.
Rick Moen is a sysadmin, writer and IT guy in the San Francisco Bay area where he has been a longtime member of its Linux community for which he runs an on-line calendar of upcoming events, BALE (Bay Area Linux Events, linuxmafia.com/bale).
Getting Started with DevOps - Including New Data on IT Performance from Puppet Labs 2015 State of DevOps Report
August 27, 2015
12:00 PM CDT
DevOps represents a profound change from the way most IT departments have traditionally worked: from siloed teams and high-anxiety releases to everyone collaborating on uneventful and more frequent releases of higher-quality code. It doesn't matter how large or small an organization is, or even whether it's historically slow moving or risk averse — there are ways to adopt DevOps sanely, and get measurable results in just weeks.
Free to Linux Journal readers.Register Now!
- Hacking a Safe with Bash
- Django Models and Migrations
- Secure Server Deployments in Hostile Territory, Part II
- Huge Package Overhaul for Debian and Ubuntu
- Home Automation with Raspberry Pi
- The Controversy Behind Canonical's Intellectual Property Policy
- Shashlik - a Tasty New Android Simulator
- Embed Linux in Monitoring and Control Systems
- KDE Reveals Plasma Mobile
- diff -u: What's New in Kernel Development