Image - inspect with flashing, a second post

I got instructions on how to inspect an OpenWrt image without having to flash a router with it, here:

But now that I am actually about to try it, I get suck at step 1. Namely, the instructions assume that I have a *.img file when all my images, whether downloaded or created using make image, are a *.bin.

When I try to go through nevertheless, replacing sudo partx -a openwrt-*.img with sudo partx -a openwrt-*.bin, I get:

partx: /dev/loop20: failed to read partition table

What next?

I'm afraid, this kind of image is significantly more problematic to inspect:

You need to identify the exact offset/sizelimit parameters for each partition.
That allows you to split/map/mount the partitions and access the filesystem.

The following reply should be more suitable in your case:

1 Like

Thanks for that clarification. So, unless I would make it a project for understanding the topic, it'd be quicker to buy a spare router for "flash and inspect."

By the way, did you change the accepted "solution" for my other post for me? I went there to do that, but it had already been done.

1 Like

Well, did you try binwalk? It should really figure out all those offsets and stuff on its own. It has a flag to automatically extract whatever it finds, even recursively aka matroska-style :smirk:.

binwalk -eM whatever_image.binary

1 Like

Thanks for that encouragement! Last couple of weeks for this OpenWrt setup was the first time ever I used chmod, scp, tar, etc., each one of them taking hours of reading and experimentation while I tried to figure out just the basics (effect of a chance dot or slash etc.). So an advanced project like binwalk will take me some time.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.