3

I have an Inteno dg200 Router running some Iopsys linux version (kernel 3.14 or so, I believe)

I've had some trouble getting a fileshare running using the USB ports and my external harddrive. The system supports it. But no matter what I put in, it does not automatically mount it. So today I decided to ssh into the system as root rather than use my webbased control panel.

To my surprise the system does not support the usual ways of finding information on the connected, unmounted drives. Allow me to elaborate:

# fdisk -l
-ash: fdisk: not found

Very well, lets try something else then:

# lsblk
-ash: lsblk: not found

And so I begin running into trouble. From what I have been able to learn online, when people have this problem it's usually because fdisk lies in /sbin, and that is not in their path as they are not root. Well, I am root here, but to be certain I checked both /sbin and /usr/sbin, but to no avail. Neither directory contained anything called fdisk or lsblk, nor does the find command locate anything called fdisk.

Is there another way to find out what exactly to mount from CLI or can I, perhaps install fdisk on the router?

  • what does dmesg say? – Rui F Ribeiro Jan 1 '18 at 0:38
  • Well quite a lot. Do you want me to post it all, or should i run it with a specific argument or something? – rasmus91 Jan 1 '18 at 0:39
  • the last few lines, or taking out and putting in the external drive should be of interest for you – Rui F Ribeiro Jan 1 '18 at 0:41
  • 1
    These are the ones that seem to concern USB: [319198.887000] usb 1-1: new high-speed USB device number 6 using ehci_hcd [319214.101000] usb 1-1: can't set config #1, error -145 – rasmus91 Jan 1 '18 at 0:42
  • Both lsblk and fdisk come from util-linux package, so it seem you don't have it installed (but mount comes from it also, so it looks strange). Perhaps you have parted: parted -l? – jimmij Jan 1 '18 at 1:43
2

When the kernel looks for possible devices it looks at

cat /proc/partitions

Sample output:

major minor  #blocks  name

   8        0  488386584 sda
   8        1  472382464 sda1
   8        2          1 sda2
   8        5   16001024 sda5
  11        0    1048575 sr0

The already mounted devices can nab found with

mount | grep ^/

Sample output:

/dev/sda1 on / type ext3 (rw,noatime,errors=remount-ro,data=ordered)

If you don't have the mount command then

cat /etc/mtab

or

cat /proc/mounts
  • cat /proc/partitions gives me major minor #blocks name 31 0 5120 mtdblock0 31 1 5120 mtdblock1 31 2 384 mtdblock2 31 3 128 mtdblock3 31 4 119296 mtdblock4 31 5 52224 mtdblock5 31 6 67072 mtdblock6 31 7 55056 mtdblock7 31 8 55056 mtdblock8 I'm not sure how that is useful though. – rasmus91 Jan 1 '18 at 8:09
0

From your comment:

cat /proc/partitions gives me

major minor #blocks name 
31 0 5120 mtdblock0 
31 1 5120 mtdblock1 
31 2 384 mtdblock2 
31 3 128 mtdblock3 
31 4 119296 mtdblock4 
31 5 52224 mtdblock5 
31 6 67072 mtdblock6 
31 7 55056 mtdblock7 
31 8 55056 mtdblock8 

I'm not sure how that is useful though.

That indicates the router is using a Memory Technology Device as its system-disk-equivalent - and if the USB HDD is currently plugged in, then the USB storage driver is probably not even loaded.

You would need to do something like modprobe usb-storage first. If that is successful, then the partitions of the USB HDD should get added to the list in /proc/partitions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.