1

I've got some sort of home entertainment system running an old version of Linux 2.6. It has a SATA > USB bridge system and a couple of USB ports. What I want to do is use it as Network Attached Storage.

Now, luckily, it has an open and accessible telnet server running.

The problem is, I can't find where the kernel, nor the init system are. The box is running BusyBox.

The board has a single flash chip on it. But, under sysfs in block/ I see multiple flash chips:

/sys/block # ls
...
mtdblock0  mtdblock2  mtdblock4
mtdblock1  mtdblock3

Why is that btw?

Now, I want to create a /dev entry for them so I can dump each of them to a USB flash drive and analyze them.

So I did this:

/sys/block # cat /sys/block/mtdblock0/dev
31:0

And ..

mknod /dev/mtdblock0 c 31 0

Which exited with 0, then I try to read raw data to test the device:

/sys/block # cat /dev/mtdblock0 
cat: /dev/mtdblock0: No such device or address

Why is that? dd is saying the same. There is entries in /proc/devices:

/sys/block # cat /proc/devices 
Character devices:
  1 mem

{ ... }

Block devices:
  1 ramdisk
  7 loop
  8 sd
 31 mtdblock

{ ... }
1
mknod /dev/mtdblock0 c 31 0

You created a character device. You wanted a block device. So use b instead of c in the mknod command.

Block device numbers and character device numbers are independent. Block device 31:0 is unrelated to character device 31:0. Your kernel has no driver for character device 31:0, hence the “No such device or address” error.

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.