Quoting James Cooper (jac1 at student.cs.ucc.ie):
> I've a question about using a DiskOnKey with linux.
Hey, just like the one I wrote about in my Linux Journal article!
> Basically, what options do i need to select when compiling the kernel?
> (The default RedHat 7.3 kernel doesn't support it).
1. For heaven's sakes, you shouldn't be running RH 7.3 at this late
date. Update to Fedora.
2. That not withstanding, you can and should get updates to your ancient
kernel. E.g., look at the 2.4.x entries here:
ftp://linux.stanford.edu/pub/mirrors/updates-7.3/i686/
Even though those kernels will almost certainly be subject to at
least two local exploits, they're still likely better than what you
have.
3. I can't post my LJ article, as that would be injurious to SSC's
commercial rights, but I think I can quote from it:
Linux's USB support starts with the kernel needing to recognise your
motherboard's USB chipset, which will be a UHCI (Intel) or OHCI-class
(Compaq and others) device, requiring the usb-uhci or usb-ohci kernel
driver, respectively. (Both also will need the usbcore driver.) If
lspci -v returns USB information that includes I/O ports at, then you
have a UHCI controller. If the returned USB-controller text includes
Memory at, then it's OHCI.
When you're done tweaking module loading (if necessary), the output of
lsmod should include all three required drivers. For example, my
laptop machine lists:
Module Size Used by Not tainted
usb-uhci 20676 0 (unused)
usb-storage 97120 1
usbcore 48000 1 [usb-uhci usb-storage]
[...]
If you're running a 2.3.38 or later kernel (and you should really
upgrade to 2.4.x or later, at this point), you also should add the
following line to /etc/fstab to enable USB device-tracking:
none /proc/bus/usb usbdevfs defaults 0 0
After this, type mount -a. Now, you're all done except for mounting
the actual mass-storage device. The above step does not mount the
device--usbdevfs is a strictly abstract support filesystem similar to
/proc, used by the USB subsystem.
[...]
I created a mountpoint directory of /mnt/fob to hang the flash drive
off of it.
[...]
# mount -o uid=1000,gid=1000,noatime -t vfat \
uid=1000,gid=1000,noatime -t vfat \
/dev/sda /mnt/fob/
[...]
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
[...]
guido:~# mount -t vfat /dev/sda1 /mnt/fob
> Everytime i've tried to do it so far, writing to the device seems to
> work (no command line errors) but nothing is physically written.
That's because it mounts read-only, initially -- even though you specify
otherwise. (That turns out to be because the device itself is a little
dodgy, and doesn't give correct responses when queried about its
capabilities.) You can and should remount read-write to fix that, after
the initial mount.
Warning: Don't have it mounted read-write any more often than you must,
and use the "noatime" option when you do -- because of NAND flash
devices' wear characteristics. If you need more information, subscribe
to Linux Journal and read my article on-line among the back issues.
--
Cheers, The cynics among us might say: "We laugh,
Rick Moen monkeyboys -- Linux IS the mainstream UNIX now!
rick at linuxmafia.com MuaHaHaHa!" but that would be rude. -- Jim Dennis
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!