Hi

I am using libguestfs-1.46.2 on Ubuntu 22.04

I already enabled
export LIBGUESTFS_DEBUG=1
export LIBGUESTFS_TRACE=1

I want to mount a vhdx file (which is known to be corrupted) with
root@HenrikUbuntu2204:/mnt/sdj# guestmount -a 
8b062ac7-00000006-d6ac6b69-64ac6b69-002b5000-4a448456 -m /dev/sda1 --ro 
/mnt/sdk/
the attached file 5TB is the output of the command above

where I can see the following error message from output
[   46.629055] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 
524288 not in group (block 0)!
[   46.629656] EXT4-fs (sda1): group descriptors corrupted!
command: mount returned 32

I want to actually add debug logs into ext4_check_descriptors with printk
To print out the hex values of superblock in the corrupted vhdx file

I tried to recompile Ubuntu kernel and add some printk messages, they don't 
show up in dmesg when I run
root@HenrikUbuntu2204:/mnt/sdj# guestmount -a 
8b062ac7-00000006-d6ac6b69-64ac6b69-002b5000-4a448456 -m /dev/sda1 --ro 
/mnt/sdk/

I guess the following messages are from libvirt / KVM ?
[   46.629055] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 
524288 not in group (block 0)!
[   46.629656] EXT4-fs (sda1): group descriptors corrupted!

How do I use printk to add logs in the kernel messages from libguestfs?




Regards
Henrik



Internal Use - Confidential

Attachment: 5TB
Description: 5TB

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to