Just a couple of problems

15 replies [Last post]
mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012

I'm trying to mount a USB memory stick for extra storage. I see th estick when inserted and can see it under dmesg but can't mount it. I've looked at the wili http://www.dbzoo.com/livebox/development#usb_filesystem_support but when I try commands like

insmod vfat.o

I get ....
insmod: can't insert 'vfat.o': Operation not permitted


I guess I'm missing something...

I'm looking at this from a mac based knowledge of unix (yes I can use terminal to a degree)
Half of the commands that I am used to don't exist....

Do I have to build a new firmware to include USB support?
From the wiki I would say no but so confused at the moment.
I guess I have filled my head with stuff and bits are leaking.

Maybe I should take a rest :) I work on industrial electronics all day then come home and play
with this stuff. I must be mad, or will be soon :)

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Mounting a USB stick

I haven't done it for a while, but from my notes:

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....

Is what I wrote. I think it worked for me

 

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Sorry

Just tried that on my system and it doesn't work. :-(

 

Only other thing you might try is to format the stick as ext3 and see if that works.

 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
The instructions on that wiki

The instructions on that wiki page are out of date.  When busybox was upgraded things changes slightly you need to supply the full path when using insmod.

Please look at the contents of /etc_ro_fs/mount-usb

UPDATE:

If you are using EXT3 there is an error in that file I just noticed.  JDB should be JBD.

-insmod $base/fs/jdb/jdb.o
+insmod $base/fs/jbd/jbd.o

Brett

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Thanks, I'll have another go

Thanks, I'll have another go later when my brain has cooled a little :)

Update.....

Success!!!

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
startup script

I now have USB stick mounted and being used but how do I get it to mount on reboot?

At the moment I have to enter the following after I telnet in

# insmod /lib/modules/2.4.17/kernel/fs/fat/fat.o
# insmod /lib/modules/2.4.17/kernel/fs/vfat/vfat.o
# mount /dev/sda1 /mnt/usb

I have tried copying the example file from etc_ro_fs to init.d but it doesn't work.

I must admit I did the copying using FileZilla.

Any advice? I have read just about avery page on the wiki now, so much so that none of it makes sense anymore :)

andy
Offline
United Kingdom
Joined: 17 Mar 2012
Mark,pop those commands into

Mark,

pop those commands into your rc.local

/etc/rc.d/

--andy

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Cheers for that andy

Cheers for that andy but I didn't see a rc.local in /etc/rc.d/

 

I have created one now and added the commands to that file but how do I get it to run?

I assumed this ran at startup but it seems not.

andy
Offline
United Kingdom
Joined: 17 Mar 2012
Mark. Please check, have you

Mark.

 

Please check, have you got a /etc/rc1.d/S99.local file?

If not, please relocate those commands from /etc/rc.d/rc.local and create same commands in /etc/rc1.d/S99.local instead.

If S99.local exists, append commands.  

 

As the LB goes to runlevel 1 then S99 will be executed at end of startup seq.

 

--andy

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Thanks for the info AndyJust

Thanks for the info Andy

Just to clarify for anyone else...

I have created a file called S99sdram using a text editor (textedit as I'm on a mac) and placed this in the /etc/rc1.d/ folder.

After reboot I can now see the usb memory is mounted by using the command df

EJ-Ambient
Offline
Ringwood, United Kingdom
Joined: 5 Aug 2011
Still no joy...

Hi guys

Just tried all the above (trying to get a USB stick mounted) - no joy.  I've created the S99USB on /etc/rc1.d and entered the commands as shown....rebooted....typed in df and only got /dev/root, tempfs and /dev/mtdblock2...... if I type mount I also get 'none on /proc/bus/usb type usbdevfs (rw)'

What've I missed?......

Hope you can help.....

EJ

I now have this from dmesg

Freeing unused kernel memory: 60k freed
hub.c: USB new device connect on bus1/1, assigned device number 2
hub.c: USB hub found
hub.c: 4 ports detected
Algorithmics/MIPS FPU Emulator v1.5
hub.c: USB new device connect on bus1/1/3, assigned device number 3
ttyACM0: USB ACM device
hub.c: USB new device connect on bus1/1/4, assigned device number 4
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: General   Model: USB Flash Disk    Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 15656960 512-byte hdwr sectors (8016 MB)
sda: Write Protect is off
Partition check:
 sda: sda1 sda2 sda3 sda4
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4

So its there!!  Why can't I mount it using.... # mount /dev/sda1 /mnt/usb    .....? EJ

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Your USB stick has four

Your USB stick has four parititions?  Really.  That's pretty strange.  Perhaps you might want to try mounting the other partitions and see what happens. Do make sure its formatted FAT32 and not exFAT/NTFS and that you have loaded those kernel drivers with insmod.

Brett

EJ-Ambient
Offline
Ringwood, United Kingdom
Joined: 5 Aug 2011
Nothing happens when I try

Nothing happens when I try and mount the other partitions......

All the kernel drivers are loaded ok...

Bit the bullet and reformatted the stick (from dos - FAT32) - tried again, same results so I got another USB stick.  Resulting in...

hub.c: USB new device connect on bus1/1/4, assigned device number 4
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: FLASH     Model: Drive UT_USB20    Rev: 0.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
SCSI device sdb: 15794160 512-byte hdwr sectors (8087 MB)
sdb: Write Protect is off
 sdb: sdb1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
# mount /dev/sdb1 /mnt/usb1
# mount
/dev/root on / type cramfs (ro)
/proc on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
tmpfs on /var type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock2 on /mnt/jffs2/jffs2_3 type jffs2 (rw)
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                13140     13140         0 100% /
tmpfs                      256        24       232   9% /var
/dev/mtdblock2             640       300       340  47% /mnt/jffs2/jffs2_3
#
So still nothing gets mounted.....any ideas?

EJ

EJ-Ambient
Offline
Ringwood, United Kingdom
Joined: 5 Aug 2011
I removed the 4-port USB HUB

I removed the 4-port USB HUB (the one recommended here on the Forums) - inserted the stick into the Hub....it re-booted itself!

Ensured all the insmods were present...

issued the mount command to mount onto /mnt/usb.....and lo... there it be!!  full R/W access - success....so I removed the stickand plugged in a different one - it re-booted itself.....

So what I've found out so far:

1/. USB sticks will only mount if they are the ONLY device plugged into the USB port

2/. Plugging in a stick will re-boot the HAHub

3/. Some sticks are completely INCOMPATIBLE with the HAHub!!

4/. I can only mount to /mnt/usb

 

What I need help with:

Is there a dismount command - so I can elegantly remove my stick?

Is there a USB stick that won't cause a re-boot (or is that HAHub reqt?)?

Is there a USB Hub that'll allow me to plug a stick and other devices onto the same port?

Is there a means whereby I can access a network shared drive/folder from the HAHub?

hope you all can assist.....ta!

EJ

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Ah you didn't say there was a

Ah you didn't say there was a USB hub in the way when mentioning you where having USB flash drive issue !

There is an dismount command.

# umount <directory>
or - where X is the partition mounted.
# umount /dev/sdaX

Personally I prefer to NFS mount another computers drives onto my HAH.

Brett

EJ-Ambient
Offline
Ringwood, United Kingdom
Joined: 5 Aug 2011
Thanks Brett - yeah, I was

Thanks Brett - yeah, I was hoping to have two or three gadgets on the USB hub, is there any possibility? Also is the HAHub opsys linux(ish)?  and do you have a preffered site to point we novice users at, otherwise I'll struggle with the syntax and keep throwing in noob requests.....sorry!

Hardware Info