[Slackware Real Quick Guide]

Slackware Real Quick Guide n.1:

Using MiB (Memory in Black) USB Flash disk on Slackware


A word of warning: this is probably going to make most UNIX/Linux gurus howl with laughter. But, hey, this is a problem I had, and I am glad I found the solution to it. So, here it is: my first Real Quick Guide: How to use MiB under Slackware Linux.

Background information


I recently bought a USB "disk-on-key" device named the MiB (which stands for Memory In Black). This stylish little device is a USB flash disk, with a capacity of 256 MB, which is more than enough for my personal needs: transferring files to/from work.

For those who are interested, a picture of this device is inserted below, and the MiB is manufactured by a company named PQI.

The MiB I bought was only US$ 99.00 (on sales at J&R) and its (poorly written) documentation mentioned that it was compatible with the Linux kernel 2.4.X. This is excellent, since I use mainly free UNIXes at home.

Installation under Windows XP (which is what I have to use at work) was painless and automatic. In 5 seconds, my Dell workstation was able to correctly identify the device and use it. Transfer rates were excellent, and the device was, overall, a pleasure to use.

The problem


Unfortunately, the problems started as soon as I tried to plug it, at home, on my IBM Thinkpad A22e laptop running Slackware Linux (or GNU/Linux, for all of you purists out there). I have used Slackware 8.1, with the "normal" 2.4.18 kernel, for many months now.

The MiB device was unrecognized by Slackware. Looking over the Internet (Thanks to Google) did not yield any significant results, since most sites returned were usually nothing more than resellers.

The problem here lies with the documentation of the MiB, which is very poorly written and seems to be based on a Red Hat installation. All the documentation says is this (any spelling mistake in the text below is straight from the documentation -- including the weird presentation!):

In Linux OS, you can follow the following instruction to mount the device, Execute cd /etc/sysconfig/ ( cat /etc/sysconfig/hwconf | more ) Check the device information in hwconf write down the mount point. Make a directory in /mnt (ex: mkdir /mnt/usbHD ) Then, execute mount /dev/sda /mnt/usbHD (if mount point was .dev/sda )

As you can probably notice, if you know Slackware, this procedure does not work at all, since Slackware does not have a directory named /etc/sysconfig/.

I gave up trying to access the device and went to bed. When I woke up, I had the solution. And it was so simple I just kicked myself for not thinking about it earlier!

The solution


You simply need to uncomment (as root) the following line in the file /etc/rc.d/rc.modules:

# USB Mass Storage support:
/sbin/modprobe usb-storage

Restarting the machine allowed the Linux kernel to (a) activate the USB interface (an Intel one, on my Thinkpad) (b) detect the MiB and (c) assign the MiB to an SCSI device, usually /dev/sda1.

The rest is as simple as typing the following:

sudo mount -t msdos /dev/sda1 /mnt/hd

The USB device then becomes immediately available to the system, and a simple df -h reports the following:

/dev/hda1 1.9G 41M 1.7G 3% /
[etc...]
/dev/sda1 251M 0 251M 0% /mnt/hd

It then becomes possible to transfer files to/from the MiB, using the normal GNU file utilities of Linux.

Conclusion


It works, and it works pretty well. The MiB is an excellent little USB device, which allows me to transfer files quickly and easily between Windows XP and Linux.

Of course, your mileage may vary. If you have any questions or remarks on this little "guide", feel free to send me an email at the following address:

gil [at] panix [dot] com

That's All, Folks!

Last updated: 2003-01-08