# Run this standalone first to verify the block is readable and contains dir entries import struct BLOCK = 4096 DEV = '/dev/dm-0' phys = 3153952 # from first debug inode with open(DEV, 'rb') as f: f.seek(phys * BLOCK) data = f.read(BLOCK) print(f"Read {len(data)} bytes") print(f"First 32 bytes: {data[:32].hex()}") # Try parsing as dir entries offset = 0 while offset < 128: ino, rec_len, name_len, ftype = struct.unpack_from(' 0: name = data[offset+8:offset+8+name_len].decode('utf-8', errors='replace') print(f" name='{name}'") offset += rec_len