[OpenWrt-Devel] Signing, meta-data, etc. on images and losetup mounts...

Petr Štetiar ynezz at true.cz
Wed Apr 29 05:06:25 EDT 2020

Philip Prindeville <philipp_subx at redfish-solutions.com> [2020-04-27 18:17:01]:

> I was trying to take a openwrt-*-generic-squashfs-combined-efi.img file from master and verify it for correctness with “losetup”, etc.
> But losetup bailed because the image wasn’t a multiple of 512 bytes long.

It works for me (tm):

 $ binwalk bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img | grep Squashfs
 17301504      0x1080000       Squashfs filesystem, little endian, version 4.0, compression:xz, size: 6672270 bytes, 1266 inodes, blocksize: 262144 bytes, created: 2020-04-29 07:43:39

 $ sudo mount -o loop,offset=17301504 bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img tmp

 $ cat tmp/etc/openwrt_version 

BTW it's usually faster to verify the correctness with QEMU:

 $ ./scripts/qemustart x86 64 bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img

-- ynezz

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list