Dear OpenWrt folks,
I have an image dump of an image that bases on openwrt-x86-64-generic-squashfs-combined.img
and I need to extract some user data from it. Unfortunately, I have difficulties to understand the image layout.
The basic layout is clear to me and I can mount the boot partition as well as the squashfs partition. But the user data is stored in an ext4 filesystem and I don't know how to locate and access it.
# fdisk squashfs-combined-2df1bc5b-f442-4821-8740-191c79c879f3.img
Command (m for help): p
Disk squashfs-combined-2df1bc5b-f442-4821-8740-191c79c879f3.img: 120 MB, 126353408 bytes, 246784 sectors
15 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
squashfs-combined-2df1bc5b-f442-4821-8740-191c79c879f3.img1 * 0,8,9 33,0,16 512 33279 32768 16.0M 83 Linux
Partition 1 has different physical/logical end:
phys=(33,0,16) logical=(2,18,16)
squashfs-combined-2df1bc5b-f442-4821-8740-191c79c879f3.img2 33,8,25 244,13,13 33792 246783 212992 104M 83 Linux
Partition 2 has different physical/logical start (non-Linux?):
phys=(33,8,25) logical=(2,26,25)
Partition 2 has different physical/logical end:
phys=(244,13,13) logical=(15,92,13)
Command (m for help):
Binwalk shows that the ext4 filesystem is behind the squashfs filesystem. It seems that both filesystems are located in partiton 2.
#binwalk squashfs-combined-2df1bc5b-f442-4821-8740-191c79c879f3.img
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
262144 0x40000 Linux EXT filesystem, blocks count: 4096, image size: 4194304, rev 2.0, ext2 filesystem data (mounted or unclean), UUID=84173db5-fa99-e35a-95c6-28613cc73cc7, volume name "kernel"
6389952 0x6180C0 xz compressed data
17301504 0x1080000 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 4333142 bytes, 1400 inodes, blocksize: 262144 bytes, created: 2024-09-23 12:34:46
21692416 0x14B0000 Linux EXT filesystem, blocks count: 102208, image size: 104660992, rev 1.0, ext4 filesystem data, UUID=93b0e514-9ff4-11ef-8fb5-525400120012, volume name "rootfs_data"
Mounting the ext4 filesystem with the offset 21692416 fails.
# mount -o 21692416 squashfs-combined-2df1bc5b-f442-4821-8740-191c79c879f3.img /mnt
mount: mounting /dev/loop38 on /mnt failed: Invalid argument
Do you have a hint how to mount the ext4 filesystem?