Sample Header Ad - 728x90

Does guestmount sypport ufs?

1 vote
1 answer
378 views
I am trying to use guestmount to inspect/modify a FreeBSD .qcow2 image (I saw several answers here, but I found nothing actually solving my problem). I am working under Debian Sid. Apparently image is correctly recognized:
mcon@cinderella:~/projects/LXD$ guestfish -a /home/mcon/VirtualBox\ VMs/FreeBSD-13.2-RELEASE-amd64.qcow2

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
      ‘man’ to read the manual
      ‘quit’ to quit the shell

> run
> list-filesystems
/dev/sda1: unknown
/dev/sda2: vfat
/dev/sda3: unknown
/dev/sda4: ufs
>
but mount fails badly:
mcon@cinderella:~/projects/LXD$ guestmount -a /home/mcon/VirtualBox\ VMs/FreeBSD-13.2-RELEASE-amd64.qcow2 -m /dev/sda4 --rw -o subtype=ufs2 /mnt 
libguestfs: error: mount_options: mount exited with status 32: mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
guestmount: ‘/dev/sda4’ could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: 	/dev/sda1 (unknown)
guestmount: 	/dev/sda2 (vfat)
guestmount: 	/dev/sda3 (unknown)
guestmount: 	/dev/sda4 (ufs)
I did some variations and I also tried recompiling the whole package from sources, but result is the same. What am I missing? Note: I cannot use qemu-nbd and sudo mount -t ufs -o ufstype=ufs2 /dev/nbd0p4 /mnt/ because ufs.ko kernel module is compiled without write support.
Asked by ZioByte (910 rep)
Jul 16, 2023, 07:24 AM
Last activity: Jul 19, 2024, 03:21 PM