Homepage Wiki Forum Buy



severity (level) requirement Gnublin family
Gnublin logo advanced.png Kernel compile, Toolchain All

You can use a USB Mass Storage Device on your GNUBLIN-board. To make this working you have to bridge the HOST-Jumper between the USB-Connectors and set the Jumper (J1) above the USB-Connectors to H.(Gnublin v1.3 and higher)

If you have got an older Version of the Gnublin-Board you also have to set the Jumper above the USB-Connectors to H and in addition you must drag the ID-Pin to GND. To drag the ID-pin to GND you have to solder a wire from the USB-Connector to the pin.


If the jumpers are set you will also need an adapter from Mini-USB-A to standard USB-A.


You can get this adapter in our Online-Shop [1]

Alternativly if you wont solder a wire to the USB-Connector you can buy a special adapter, which also works.



After the boot process you can plugin the device. You should get this or similiar output on the shell.

root@armv5te:/# root@armv5te:/# usb 1-1: new high speed USB device using lpc-ehci and address 5 usb 1-1: New USB device found, idVendor=0781, idProduct=5567 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: Cruzer Blade usb 1-1: Manufacturer: SanDisk usb 1-1: SerialNumber: 20052844830C5B212647 scsi1 : usb-storage 1-1:1.0 scsi 1:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 2 sd 1:0:0:0: Attached scsi generic sg0 type 0 sd 1:0:0:0: [sda] 15625216 512-byte logical blocks: (8.00 GB/7.45 GiB) sd 1:0:0:0: [sda] Write Protect is off sd 1:0:0:0: [sda] Assuming drive cache: write through sd 1:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 1:0:0:0: [sda] Assuming drive cache: write through sd 1:0:0:0: [sda] Attached SCSI removable disk

It is possible that some device-files were not created yet. You know that these devices must be created, if the mount instruction (next command below) does not work properly:

root@armv5te:/# mknod /dev/sda b 8 0
root@armv5te:/#mknod  /dev/sda1 b 8 1

Mounting the device

To access the files on your USB-Stick you must mount the partition into the Linux filesystem. If the mass-storage-device was recognized and well configured by the system, the next instruction should work. If the next instruction doesn't work for you, please see comment above.

mount /dev/sda1 /mnt

Now you can access your files by just changing into the /mnt directory

cd /mnt 


If you plugout the Gnublin, while it's running you can harm your filesystem and get strange errors afterwards. If you get some filesystem-errors you can fix it with a PC/Laptop running Linux. To fix the filesystem just do the following instruction:


With the command dmesg, you can identify the device-name of your SD-card, after plugging the cars into a PC/Laptop. The first (bigger) partition is the partition with the filesystem on it. The filesystem is an ext2-filesystem which can be fixed.

[ 1549.424156] sd 7:0:0:2: [sdh] Assuming drive cache: write through [ 1549.425624] sdh: sdh1 sdh2 [ 1549.427527] sd 7:0:0:2: [sdh] Assuming drive cache: write through [ 1549.427533] sd 7:0:0:2: [sdh] Attached SCSI removable disk [ 1549.730223] EXT2-fs (sdh1): warning: mounting unchecked fs, running e2fsck is recommended

In this case the relevant partition is /dev/sdh1. First we must unmount the partition from our filesystem:

umount /dev/sdh1

Now you can recover your filesystem with different tools (in this example we use e2fsck, you can also use fsck.ext2 instead)

sudo e2fsck /dev/sdh1
e2fsck 1.41.14 (22-Dec-2010) /dev/sdh1 wurde nicht ordnungsgemäß ausgehängt, Prüfung erzwungen. Durchgang 1: Prüfe Inodes, Blocks, und Größen Durchgang 2: Prüfe Verzeichnis Struktur Durchgang 3: Prüfe Verzeichnis Verknüpfungen Durchgang 4: Überprüfe die Referenzzähler Durchgang 5: Überprüfe Gruppe Zusammenfassung /dev/sdh1: 20165/952504 Dateien (1.0% nicht zusammenhängend), 774628/1903702 Blöcke

It's possible that the program is asking you if it may execute some operations, like fixing blocks or something like that. If you get asked something like that you should always press y to fix everything.

After that everything should work fine.

In other languages