Date: Sat, 24 May 2014 16:22:59 +0100 From: Arthur Chance <freebsd@qeng-ho.org> To: freebsd@dreamchaser.org, Polytropon <freebsd@edvax.de> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: write-protected usb flash drive Message-ID: <5380B953.5090700@qeng-ho.org> In-Reply-To: <5380AB17.2070300@dreamchaser.org> References: <537FE744.3030002@dreamchaser.org> <20140524080127.f2e788d5.freebsd@edvax.de> <5380AB17.2070300@dreamchaser.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24/05/2014 15:22, Gary Aitken wrote: > On 05/24/14 00:01, Polytropon wrote: >> On Fri, 23 May 2014 18:26:44 -0600, Gary Aitken wrote: >>> I'm having trouble locating what I want -- >>> a physically write-protected flash drive. >>> My searches so far have come up empty. >>> Thought someone here would know of one if it exists. >>> I don't want or need additional encryption gimicks on it. >>> Anyone know of one? 32G or larger >> >> I have been using something similar, even though it's not _exactly_ >> what you're asking for. My "solution" (haha): Get a SD card with >> the required capacity and initialize it as intended. Then use the >> write protection slider. The card is now write protected. Then get >> a USB card drive (usually in the shape of a regular USB stick, for >> example a USK SD/MMC/MS-MMC USB 2.0 card drive) and put the card in. >> Now you have a write-protected USB drive. :-) >> >> There are two advantages: >> >> a) In case of media failure, just replace the SD card. >> >> b) In case of reader failure, just replace the drive. >> >> Additional fun: If you use a SD->µSD adapter, you can also use a >> micro-SD card. The adapter then provides the write protection slider. >> The mentioned advantages still apply. :-) > > I like this option better than the Kanguru one, > mostly because the kanguru drives seem to not be very robust; > lots of failures reported. > > I don't see why it wouldn't work, but have you tried formatting / > initializing SD cards from the USB adapter instead of a device like a > camera? Wearing my paranoid sysadmin hat: given that the write protect switch on SD cards is purely advisory, it would be a good idea to check that the SD to USB adapter actually honours the advice. I.e. try to write to it with write protect on. [Slight pause.] OK, thought I'd better try my own advice rather than just handing it out. I put a microSD card out of an old phone into a SanDisk mSD -> SD adapter and plugged that into my SanDisk SD -> USB adapter, mounted it (FAT32 file system already on it) and wrote a file to it. Worked as you'd expect. I then unmounted and unplugged it, flipped the write protect switch and tried to remount. Result was mount_msdosfs: /dev/da5s1: Input/output error Mounting it read-only was fine. So, the write protect is honoured by at least some SD -> USB adapters. Looks like Polytropn's idea is the way to go if you want write protectable USB flash drives. The one I've got is a SanDisk MicroMate Reader, it's USB 2.0 and can handle cards up to 32GB, so it's just on the edge of what you need. I'd guess there's probably a USB 3.0 version around by now. As for formatting SD cards via a USB adapter, I've done that quite often. So far I've written disk images using dd (for RPi), used newfs_msdos for both FAT16 and FAT32 and plain newfs for UFS2 filesystems, all without problem.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5380B953.5090700>