Skip to main content

USB Flash Drive with Linux

Here are the instructions to make a 128 MB USB flash drive from Edge Tech Corp work under Linux (using kernel 2.6.11.7):

  1. Compile and install the usb-storage module. This option is under "Device Drivers" -> "USB Support" -> "USB Mass Storage Support" in the kernel configuration options.
  2. Load the module using modprobe usb-storage. Look at /var/log/messages; you should see messages like this:
    Jul 1 21:10:15 trinity Initializing USB Mass Storage driver...
    Jul 1 21:10:15 trinity usbcore: registered new driver usb-storage
    Jul 1 21:10:15 trinity USB Mass Storage support registered.
  3. Plug in the flash drive and look at the messages in /var/log/messages again. This will help you identify what SCSI device the flash drive was simulated as. Here are some sample message from the log:
    Jul 1 21:10:45 trinity usb 3-3: new high speed USB device using ehci_hcd and address 4
    Jul 1 21:10:45 trinity scsi0 : SCSI emulation for USB Mass Storage devices
    Jul 1 21:10:51 trinity Vendor: Model: Secure Guard Rev: PMAP
    Jul 1 21:10:51 trinity Type: Direct-Access ANSI SCSI revision: 00
    Jul 1 21:10:51 trinity SCSI device sda: 243200 512-byte hdwr sectors (125 MB)
    Jul 1 21:10:51 trinity sda: assuming Write Enabled
    Jul 1 21:10:51 trinity SCSI device sda: 243200 512-byte hdwr sectors (125 MB)
    Jul 1 21:10:51 trinity sda: assuming Write Enabled
    Jul 1 21:10:51 trinity /dev/scsi/host0/bus0/target0/lun0: p1
    Jul 1 21:10:51 trinity Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
    Jul 1 21:10:51 trinity Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
    Jul 1 21:10:51 trinity Vendor: Model: Secure Guard Rev: PMAP
    Jul 1 21:10:51 trinity Type: Direct-Access ANSI SCSI revision: 00
    Jul 1 21:10:51 trinity SCSI device sdb: 2880 512-byte hdwr sectors (1 MB)
    Jul 1 21:10:51 trinity sdb: assuming Write Enabled
    Jul 1 21:10:51 trinity SCSI device sdb: 2880 512-byte hdwr sectors (1 MB)
    Jul 1 21:10:51 trinity sdb: assuming Write Enabled
    Jul 1 21:10:51 trinity /dev/scsi/host0/bus0/target0/lun1: unknown partition table
    Jul 1 21:10:51 trinity Attached scsi removable disk sdb at scsi0, channel 0, id 0, lun 1
    Jul 1 21:10:51 trinity Attached scsi generic sg1 at scsi0, channel 0, id 0, lun 1, type 0
    Jul 1 21:10:52 trinity scsi.agent[15707]: disk at /devices/pci0000:00/0000:00:0a.2/usb3/3-3/3-3:1.0/host0/target0:0:0/0:0:0:0
    Jul 1 21:10:52 trinity scsi.agent[15734]: disk at /devices/pci0000:00/0000:00:0a.2/usb3/3-3/3-3:1.0/host0/target0:0:0/0:0:0:1
  4. Now simply mount the appropriate SCSI drive e.g.: mount -t vfat -o umask=0000 /dev/sda1 /mnt/usb/ and your flash drive is ready for use.

Comments

Popular posts from this blog

FCC Aproves Sirius-XM Merger

This has been a long time coming but finally the FCC has finally approved the merger of Sirius Satellite Radio with XM Satellite Radio . The combined entity is pretty much a monopoly in the satellite radio space but they are still competing with terrestrial radio. Either way, their stocks, NASDAQ:SIRI and NASDAQ:XMSR should get a good boost on Monday. Yahoo! Finance Quote for SIRI Quote for XMSR

Lead Tide SIM Reader

I recently came across a cheap little device for reading SIM cards . It was available from Meritline for less than USD 5 with free shipping. Curious to see what it was like, I ordered one. The device came in a small package along with a mini CD containing drivers. The packaging advertised the device as the LEAD TIDE Sim reader . Like most things these days, it's made in China. The device has a USB 1.1 interface. There was no product code or number anywhere on the packaging. Installing the drivers for the device turned out to be harder than I expected. The mini CD's autorun installed some stuff but Microsoft Windows XP couldn't install any suitable driver for the device. The mini-CD had several top level directories with what appeared to be product codes but I couldn't match any to the device itself since it had no product code. Google searches revealed that I wasn't alone in my endeavors to get the device working . Further digging revealed pointers to some thir

Getting Mailvelope on Chrome to use GnuPG on macOS

Mailvelope is a browser add-on that helps use GPG encryption and signing on webmail systems like Gmail. Here are the steps on macOS (tested with "Big Sur") to get Mailvelope to use the GnuPG backend. Install gpgme via Homebrew: brew install gpgme This will install gpgme-json in /usr/local/bin by default.  Create a file called gpgmejson.json in  "~/Library/Application Support/Google/Chrome/NativeMessagingHosts" with the following contents: {     "name": "gpgmejson",     "description": "Integration with GnuPG",     "path": "/usr/local/bin/gpgme-json",     "type": "stdio",     "allowed_origins": [         "chrome-extension://kajibbejlbohfaggdiogboambcijhkke/"     ] } Now in Mailvelope > Options > General , GnuPG will show up as the encryption backend.