Page 364 - Hacking Roomba
P. 364
Chapter 15 — RoombaCam: Adding Eyes to Roomba 345
root@OpenWrt:~# echo “usb-storage” >> /etc/modules
root@OpenWrt:~# echo “fat” >> /etc/modules
root@OpenWrt:~# echo “vfat” >> /etc/modules
After rebooting, plug in the USB drive and watch dmesg. You should see something like
Listing 15-2. The most important part is the Partition check section as it tells you the
full path to the disk. Use it when mounting the disk.
Listing 15-2: dmesg Output for Detected USB Drive
root@OpenWrt:~# dmesg
[...]
hub.c: new USB device 01:02.0-1, assigned address 2
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: VBTM Model: Store ‘n’ Go Rev: 5.00
Type: Direct-Access ANSI SCSI
revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun
0
SCSI device sda: 2013184 512-byte hdwr sectors (1031 MB)
sda: Write Protect is off
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
Using It
OpenWrt should attempt to mount the disk at the path /mnt/disc0_1. This is mostly reliable
but sometimes doesn’t work. To mount it yourself, use the full path from the dmesg output and
add the partition you want (usually part1 for the first partition). With the resulting device
path, mount the disk and see how much space you have on it:
root@OpenWrt:~# mkdir /mydisk
root@OpenWrt:~# mount /dev/scsi/host0/bus0/target0/lun0/part1
/mydisk
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 7.1M 3.4M 3.7M 48% /
none 14.9M 20.0k 14.9M 0% /tmp
/dev/scsi/host0/bus0/target0/lun0/part1 982.7M 107.5M i
875.2M 11% /mydisk