Mounting USB Drive

5 replies [Last post]
stevee
Offline
Joined: 13 Aug 2010

I would like more storage on the box .. so need to mount a USB drive. I can't however make this work. I see, from dmesg,

scsi0 : SCSI emulation for USB Mass Storage devices

  Vendor: CBM       Model: Flash Disk        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: 2068992 512-byte hdwr sectors (1059 MB)

sda: Write Protect is off

Partition check:

 sda: sda1

 

I've added into fstab:

/dev/sda1        /tmp/usb        vfat        defaults         0 0

 

but cannot mount the filesystem.

 

Is this possible? 

Cheers,

 

steve

stevee
Offline
Joined: 13 Aug 2010
Think I've found the answer
derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Did it work?

Yup. This is the howto note. It took me a while to find the correct mke2fs parameters, but once this was sorted, the USB pen mounted just fine.

Did you get it working?

Derek 

stevee
Offline
Joined: 13 Aug 2010
Can't make it work

Hi Derek,

I installed the prebuilt usb-driver modules and tried both FAT32 and ext2 filesystems .. with no success.

I see the following when the usb-drive is inserted .. which is good

# dmesg | grep sda

 

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

SCSI device sda: 2068992 512-byte hdwr sectors (1059 MB)

sda: Write Protect is off

 sda: sda1

 

However it won't mount (mount returns .. just nothing there! Tried FAT32 as well.) I did notice that in the prebuilt usb-filesystem there is no ext2.o file. Is this still necessary?

 

# mount /dev/sda1 /mnt/usb
# mount
/dev/root on / type cramfs (ro)
/proc on /proc type proc (rw)
tmpfs on /var type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock2 on /mnt/jffs2/jffs2_3 type jffs2 (rw)

Anything obvious I'm missing? 

On another note .. I wanted to see kernel modules loaded.
# modprobe
modprobe: cannot parse modules.dep
Is this the expected return?

Cheers,
steve

 

 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Check out the sample file

Check out the sample file already on your livebox:  /etc_ro_fs/mount-usb

Actually running this I see that I've already compiled in the USB STORAGE drivers into the kernel.  So all you need to do to mount a VFAT/FAT partition would be to load the module for that.

# insmod fat.o
# insmod vfat.o

This should get you moving....

If you format the USB drive as EXT3 it will work out of the box and you don't need to load these addnl drivers.  EXT3 is the perferred filesystem.   EXT2 is a subset of EXT3 - so it does not explicity appear. EXT2 is EXT3 without jounalling.

To see already loaded modules

# cat /proc/modules
vfat                   12496   0 (unused)
fat                    37504   0 [vfat]
switch                  1200   0 (unused)
bcm_enet               20848   4
#

PS: you don't need to download or install anything additional.

stevee
Offline
Joined: 13 Aug 2010
Working

Thanks Brett .. running the sample file, then mounting works. Unclear to me how this is different from what I did!

KR,

Hardware Info