DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-06-21 21:25:56

robinson
Member
Registered: 2009-06-20
Posts: 19

[SOLVED] How to get USB drives working?

What steps would be necessary to get a USB flash drive working on the DNS-343?

I have tried following directions for the DNS-323, however they are different enough to not work. When I try to insmod usb-storage.ko, I get "invalid model format".

I don't know what to do next. I've looked for info on compiling a version compatible with the DNS-343, however - i've had no luck so far.

Offline

 

#2 2009-06-21 23:19:26

johnkeye
Member
Registered: 2009-06-11
Posts: 16

Re: [SOLVED] How to get USB drives working?

Very interested in the same, mostly because I'd love to put my USB HDD on behind the DNS-343.


Best known for not understanding why D-Link chose the name "DNS" for a non-nameserver-product. Seriously, WTF?

Offline

 

#3 2009-06-22 00:10:08

robinson
Member
Registered: 2009-06-20
Posts: 19

Re: [SOLVED] How to get USB drives working?

Indeed.

My primary reason is to get ffp runing on a USB key, so my HDD's don't keep spinning... hmm

Offline

 

#4 2009-06-22 06:46:58

robinson
Member
Registered: 2009-06-20
Posts: 19

Re: [SOLVED] How to get USB drives working?

Well, I found out that the kernel version (on 1.03b70) is 2.6.22.7, and the usb-storage.ko has been compiled for a different (edit: earlier) kernel version, hence the error.

grr. now i have to recompile it. here goes gcc, et. al on the NAS...

Last edited by robinson (2009-06-22 06:47:29)

Offline

 

#5 2009-06-25 05:26:14

robinson
Member
Registered: 2009-06-20
Posts: 19

Re: [SOLVED] How to get USB drives working?

tada!! I have my USB drive mounted!

I'm working on writing up a tutorial... this was a pain to figure out, mostly because there are "special" versions of everything on the 343. Generic errors suck!

edit 1:
I'll have the tutorials up as soon as I figure out how to get ffp running off of the USB drive as well.

edit2:
Update 1: So.. these things are as sensitive as hell to what KIND of USB flash drive you use. It might work when you unplug/plug it in, but when you BOOT with it in... it doesn't work. Fortunately, I found another drive that worked when you boot.

note: if you plug the incompatible UBS key into a USB hub.... it worked on boot. weird!

Last edited by robinson (2009-06-25 08:44:33)

Offline

 

#6 2009-06-27 08:42:46

robinson
Member
Registered: 2009-06-20
Posts: 19

Re: [SOLVED] How to get USB drives working?

Steps to get a USB drive working on the DNS-343. I had firmware 1.03b70 installed.

1) You have to install the kernel modules.
  - insmod /sys/crfs/driver/usb-storage.ko
  - insmod /sys/crfs/driver/fat.ko
  - insmod /sys/crfs/driver/vfat.ko

2) Plug in your USB drive.
  - dmesg should show you info about your USB drive. If not - you probably didn't wait long enough.
      Initializing USB Mass Storage driver...
      scsi4 : SCSI emulation for USB Mass Storage devices
      usbcore: registered new interface driver usb-storage
      USB Mass Storage support registered.
      usb-storage: device found at 2
      usb-storage: waiting for device to settle before scanning
      scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer Mini      0.2  PQ: 0 ANSI: 2
      sd 4:0:0:0: [sde] 2001888 512-byte hardware sectors (1025 MB)
      sd 4:0:0:0: [sde] Write Protect is off
      sd 4:0:0:0: [sde] Mode Sense: 03 00 00 00
      sd 4:0:0:0: [sde] Assuming drive cache: write through
      sd 4:0:0:0: [sde] 2001888 512-byte hardware sectors (1025 MB)
      sd 4:0:0:0: [sde] Write Protect is off
      sd 4:0:0:0: [sde] Mode Sense: 03 00 00 00
      sd 4:0:0:0: [sde] Assuming drive cache: write through
      sde: sde1
      sd 4:0:0:0: [sde] Attached SCSI removable disk
      sd 4:0:0:0: Attached scsi generic sg4 type 0
      usb-storage: device scan complete

  - fdisk -l  should show you where your device is connected (ie. /dev/sde1)

OPTIONAL) You can format the drive to ext2 if you want.
  - mke2fs -L USB /dev/sde1
     : note:  you cannot have the drive mounted when you do this.

3) Mount the drive.
  - mkdir /mnt/usb
  - mount /dev/sde1 -t vfat /mnt/usb -o noatime
    OR   mount  /dev/sde1 -t ext3 /mnt/usb -o noatime
    OR   mount  /dev/sde1 -t ext2 /mnt/usb -o noatime
  - the "-o noatime" prevents linux from writing access times to the files.
  - if you want to be able to mount your USB drive so you can access from the network share (from windows)
     : mkdir /mnt/HD_a2/USB
     : in the mount commands listed above, change "/mnt/usb" -> "/mnt/HD-a2/USB"

4) Check to see if it works:
  - ls -l /mnt/usb   this should show you the contents of the usb drive.
    OR check via windows if you mounted it to a directory on your share.

5) Check to see if it is COMPATIBLE.
    : Sometimes a USB drive will be mountable, HOWEVER it will not be compatible with the system.
      - Reboot. Make sure to leave the USB drive in the system.
      - After you have booted back up, follow steps 1-4 again - BUT make *sure* to not unplug your USB drive.
         : If you are able to mount your USB drive *without* un-plugging it, it most likely compatible.
         : I had one USB drive that *would not* mount unless i re-plugged it in *every* time I rebooted.

To see more info about your USB drive
  - cat /proc/scsi/usb-storage/<hit tab>
  - dmesg to see USB connection info
  - fdisk -l to see what it's device location is

Last edited by robinson (2009-06-27 19:25:34)

Offline

 

#7 2009-06-30 22:09:35

johnkeye
Member
Registered: 2009-06-11
Posts: 16

Re: [SOLVED] How to get USB drives working?

Awesome! Thanks for putting this together. I'll hopefully have time to hit this in the coming weekend. Thanks again smile


Best known for not understanding why D-Link chose the name "DNS" for a non-nameserver-product. Seriously, WTF?

Offline

 

#8 2009-07-04 23:37:46

johnkeye
Member
Registered: 2009-06-11
Posts: 16

Re: [SOLVED] How to get USB drives working?

Aww. It does not have support for HFS+ drives at the moment, though the rest went off without a hitch. The drives I've tested show up fine in fdisk, but I'll have to set some time aside to migrate data to reformat a drive, which'll have to wait until I have time. Thanks again for the tutorial smile
It ought to be put into the wiki.


Best known for not understanding why D-Link chose the name "DNS" for a non-nameserver-product. Seriously, WTF?

Offline

 

#9 2009-07-13 00:59:47

robinson
Member
Registered: 2009-06-20
Posts: 19

Re: [SOLVED] How to get USB drives working?

in order to support HFS+, you'll need HFS+ kernel modules, but yea -- i'm thinking about sticking this on the wiki. DNS-343 wiki info is LACKING. sad

Offline

 

#10 2013-04-04 09:56:33

wushi
New member
Registered: 2013-04-03
Posts: 1

Re: [SOLVED] How to get USB drives working?

Hi Robson,

I'm a total newbie on linux and command line ( I mean total!!! ) but I´ve managed to get ffp on my DNS343, have Apache, mysql, and Php running ( wich took me forever to get working! )

I intent to have SABnzb + Sickbeard working off a 32GB USB stick, but I'm stuck on loading the usb-storage.ko ( module invalid )

1) Is there a compatible usb-storage.ko for the 434 or do I have to compile it as you did? How do I go about doing it? ( complete newbie )

2) Know of a good way to get those two packages working on the 343, or am I just wasting time?

3) Where do I download vfat.ko and fat.ko from?

Thanks in advanced

Last edited by wushi (2013-04-04 09:58:01)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB