Do it Chad style — write raw images directly to partitions (might require specifically formatted raw images, not sure about details).
qemu... -drive file=/dev/ada0,format=raw,if=virtio
Instead of a file you use a device :
Code:-drive file=/dev/ada0,format=raw,if=virtio
tar cvf - filename | dd of=/dev/sda1s2 bs=16M
root@marietto:/home/marietto # mount -t auto /dev/da1p2 /mnt/da1p2
mount: /dev/da1p2: Operation not supported by device
root@marietto:/home/marietto # mount -t ufs /dev/da1p2 /mnt/da1p2
mount: /dev/da1p2: No such file or directory
root@marietto:/home/marietto # ls /dev/da1*
/dev/da1 /dev/da1p1 /dev/da1p2
=> 63 1953259457 da1p2 MBR (931G)
63 1953259457 - free - (931G)
=> 34 1953525101 diskid/DISK-20130506005976F GPT (932G)
34 2014 - free - (1.0M)
2048 262144 1 efi (128M)
264192 1953259520 2 dragonfly-label64 (931G)
1953523712 1423 - free - (712K)
=> 63 1953259457 gptid/5da2a10d-668a-11ec-9f5e-e1d55ee21f22 MBR (931G)
63 1953259457 - free - (931G)
=> 63 1953259457 diskid/DISK-20130506005976Fp2 MBR (931G)
63 1953259457 - free - (931G)
The error indicates that you tried to do something to a device which the device is not capable of doing. Bizarre examples are things like asking a disk for "eject paper" (yes, such a SCSI command does exit!), or asking a printer to read a disk sector. Obviously, you didn't do these bizarre examples. But the indications here are that you are asking either /dev/da1p2 or /mnt/da1p2 to do something they are not capable of.root@marietto:/home/marietto # mount -t auto /dev/da1p2 /mnt/da1p2
mount: /dev/da1p2: Operation not supported by device
Was this done at the same time as the command above? Recheck that both /dev/da1p2 and /mnt/da1p2 exist and are the correct type of thing (character device and directory, both writeable).root@marietto:/home/marietto # mount -t ufs /dev/da1p2 /mnt/da1p2
mount: /dev/da1p2: No such file or directory
The partition type says that /dev/da1p2 is not a UFS file system, but a DragonFly file system, perhaps Hammer. But that doesn't have to mean that this is what it contains: it is perfectly possible to put data for file system X into a partition that's labelled to be type Y (but a bad idea). You might want to check what data is really in there with "fstyp /dev/da1p2", but I don't know whether that's reliable in detecting DragonFly file systems. You can also try "file -s /dev/da1p2"; again, I know that it will reliably detect UFS when run on FreeBSD, but again, I would not trust it for foreign file systems....
264192 1953259520 2 dragonfly-label64 (931G)
root@marietto:/dev # file /dev/da1p2
/dev/da1p2: character special (1/92)
root@marietto:/dev # ls -l /dev/da1p2
crw-r----- 1 root operator 0x15c 26 dic 21:43 /dev/da1p2
root@marietto:/dev # touch /mnt/da1p2/foo
root@marietto:/dev # rm /mnt/da1p2/foo
root@marietto:/dev # fstyp /dev/da1p2
fstyp: /dev/da1p2: filesystem not recognized
root@marietto:/home/marietto # camcontrol devlist
<SATA CT500MX500SSD4 M3CR> at scbus1 target 0 lun 0 (da0,sg0,pass0)
<SATA Samsung SSD 860 RVT0> at scbus2 target 0 lun 0 (da1,sg1,pass1)
<SATA WDC WD3200AAJS-0 01.0> at scbus3 target 0 lun 0 (da2,sg2,pass2)
<TOSHIBA External USB 3.0 0> at scbus4 target 0 lun 0 (da8,sg8,pass8)
root@marietto:/home/marietto # gpt show /dev/da8
start size index contents
0 1 - PMBR
1 1 - Pri GPT header
2 32 - Pri GPT table
34 2014 - Unused
2048 262144 0 GPT part - EFI System
264192 1953259520 1 GPT part - DragonFly Label64
1953523712 1423 - Unused
1953525135 32 - Sec GPT table
1953525167 1 - Sec GPT header
root@marietto:/mnt # mkdir /mnt/dragonfly-ufs
root@marietto:/mnt # mount -t ufs /dev/da8p1 /mnt/dragonfly-ufs
mount_ufs: /dev/da8p1: No such file or directory
root@marietto:/mnt # ls /dev
acpi da1s1d kbd0 pass0 stderr ttyve uhid0
ata da1s1e kbd1 pass1 stdin ttyvf uhid1
bpf da2 kbd2 pass2 stdout tun uhid2
bpf0 da2s0 kbd3 pass8 sysmouse udev ums0
bpf1 da2s1 kbd4 pci tty udevs ums1
bpf2 da2s2 klog ptmx ttyv0 ugen0.1 upmap
bpf3 da8 kmem pts ttyv1 ugen0.2 urandom
bpf4 da8s0 kpmap random ttyv2 ugen0.3 usb
console da8s1 log serno ttyv3 ugen0.4 usbctl
consolectl da8s1a lpmap sg0 ttyv4 ugen0.5 vn
crypto da8s1d md0 sg1 ttyv5 ugen1.1 vn0
da0 devctl md0s0 sg2 ttyv6 ugen1.2 vn1
da0s0 devfs mem sg8 ttyv7 ugen1.3 vn2
da0s1 dri midistat sga ttyv8 ugen1.4 vn3
da1 dsp mixer sgb ttyv9 ugen1.5 wdog
da1s0 dsp0 mixer0 sgc ttyva ugen1.6 xpt0
da1s1 fd null sgi ttyvb ugen1.7 zero
da1s1a input nvmm slice-by-uuid ttyvc ugen1.8
da1s1b io part-by-uuid sndstat ttyvd ugen2.1
root@marietto:/mnt # mount -t ufs /dev/da8s1 /mnt/dragonfly-ufs
mount_ufs: /dev/da8s1 on /mnt/dragonfly-ufs: incorrect super block
root@marietto:/mnt # mount -t ufs /dev/da8s1a /mnt/dragonfly-ufs
root@marietto:/mnt # ls /mnt/dragonfly-ufs
boot boot2 loader mbr
boot0 boot2_64 loader.conf modules.local
boot0sio cdboot loader.efi pxeboot
boot1 defaults loader.help pxeboot_tftp
boot1.efi dloader.rc loader_tftp
boot1_64 kernel loader_tftp.help
root@marietto:/home/marietto # gpart show
=> 63 1953259457 da0p2 MBR (931G)
63 1953259457 - free - (931G)
=> 34 1953525101 diskid/DISK-20130506005976F GPT (932G)
34 2014 - free - (1.0M)
2048 262144 1 efi (128M)
264192 1953259520 2 dragonfly-label64 (931G)
1953523712 1423 - free - (712K)
=> 63 1953259457 gptid/5da2a10d-668a-11ec-9f5e-e1d55ee21f22 MBR (931G)
63 1953259457 - free - (931G)
=> 63 1953259457 diskid/DISK-20130506005976Fp2 MBR (931G)
63 1953259457 - free - (931G)
root@marietto:/home/marietto # ls /dev/da0*
/dev/da0 /dev/da0p1 /dev/da0p2
root@marietto:/home/marietto # bsdlabel da0p2
bsdlabel: /dev/da0p2: no valid label found
file -s /dev/da0p2
root@marietto:/usr/home/marietto # file -s /dev/da0p2
/dev/da0p2: DOS/MBR boot sector
try mdconfig -t vnode /dev/da0p2
and then gpart show md0
root@marietto:/usr/home/marietto/bhyve # mdconfig -t vnode /dev/da0p2
mdconfig: /dev/da0p2 is not a regular file
for i in $(jot 256);do echo -n $i;dd if=/dev/da0p2 iseek=$i count=30 2>/dev/null|file -;done|grep -v ": data"
do this from a bourne shell prompt (sh/bash/zsh)
see if you see something about ufs