Hey,

I have original firmware installed on my (unsupported) router and I'm
booting ELF image using tftp. My purpose is to get correct partitions
layout and access to them.

Linux correctly detects mtds, I get:
0x00000000001c-0x0000001416a4 : "linux"
0x0000001416a4-0x0000007ba000 : "rootfs"

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 001e0000 00000000 "boot"
mtd1: 00010000 00000000 "board_data"
mtd2: 00010000 00000000 "nvram"
mtd3: 00141688 00020000 "linux"
mtd4: 0067895c 00020000 "rootfs"

So the mtd I'm interested in is mtd4.

# head /dev/mtd4 | hexdump -C
00000000  73 68 73 71 2b 03 00 00  00 00 00 54 03 00 00 d8  |shsq+......T....|

# head /dev/mtdblock4 | hexdump -C
head: /: Input/output error
00000000  3d 3d 3e 20 2f 20 3c 3d  3d 0a 0a 3d 3d 3e 20 64  |==> / <==..==> d|
00000010  65 76 2f 6d 74 64 62 6c  6f 63 6b 34 20 3c 3d 3d  |ev/mtdblock4 <==|
00000020  0a 73 68 73 71 2b 03 00  00 00 00 00 54 03 00 00  |.shsq+......T...|

Again...

# head /dev/mtdblock4 | hexdump -C
00000000  73 68 73 71 2b 03 00 00  00 00 00 54 03 00 00 d8  |shsq+......T....|

Now the most interesting part:

# mount -t squashfs /dev/mtdblock4 /mnt/
mount: mounting /dev/mtdblock4 on /mnt/ failed: Invalid argument


Can someone explain to me, what does it mean? Is there something wrong
with my mtdblock4? I don't get anything interesting in dmesg.

Is that possible squashfs used by original firmware is somehow
malformed and requires original-vendor-hacked squashfs support?

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to