Solved Any way to mount Virtualbox FreeBSD .vdi to get files?

Have a Virtualbox FreeBSD 13.2 which has failed after running freebsd-update -r 13.2-RELEASE upgrade from 13.1 Can't find kernel. No /boot/kernel, /boot/kernel.old, /boot/kernel.old/kernel

There are files in boot/kernel ..

boot-kernel.png


In the boot screen, typing
Code:
ls /usr/local/etc
I see all the files and DIRs that are needed.
Need to get config files and DIRs off this server if possible. Since it will not boot, is there any way to mount the virtual machine .vdi on the host which is ubuntu?

Since writing above, found a way to mount the Virtualbox FreeBSD .vdi file.
On the host run the following...
Code:
vboximg-mount --list
Image: gw.vdi
UUID: a391d143-c289-4a54-bf20-66acb8cead5a

Code:
mkdir vbox_gw

Code:
vboximg-mount -i a391d143-c289-4a54-bf20-66acb8cead5a -o allow_root vbox_gw

(must edit /etc/fuse.conf and uncomment user_allow_other)

Code:
ls vbox_gw
gw.vdi vhdd vol0 vol1 vol2 vol3 vol4

attempting to mount any of the names above results in:
Code:
sudo mount vbox_gw/vol4 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop12, missing codepage or helper program, or other error.

Any way to get this working??
Thanks.
 
You can boot from FreeBSD-13.2-RELEASE-amd64-bootonly.iso inside the VirtualBox then select LiveCD and mount the partition and copy the files over the network.
 
Found a backup of the Virtualbox FreeBSD and it is up and running. Just need to upgrade it from 12.1-RELEASE-p9
 
Have a Virtualbox FreeBSD 13.2 which has failed after running freebsd-update -r 13.2-RELEASE upgrade from 13.1 Can't find kernel. No /boot/kernel, /boot/kernel.old, /boot/kernel.old/kernel

There are files in boot/kernel ..

View attachment 16820

In the boot screen, typing
Code:
ls /usr/local/etc
I see all the files and DIRs that are needed.
Need to get config files and DIRs off this server if possible. Since it will not boot, is there any way to mount the virtual machine .vdi on the host which is ubuntu?

Since writing above, found a way to mount the Virtualbox FreeBSD .vdi file.
On the host run the following...
Code:
vboximg-mount --list
Image: gw.vdi
UUID: a391d143-c289-4a54-bf20-66acb8cead5a

Code:
mkdir vbox_gw

Code:
vboximg-mount -i a391d143-c289-4a54-bf20-66acb8cead5a -o allow_root vbox_gw

(must edit /etc/fuse.conf and uncomment user_allow_other)

Code:
ls vbox_gw
gw.vdi vhdd vol0 vol1 vol2 vol3 vol4

attempting to mount any of the names above results in:
Code:
sudo mount vbox_gw/vol4 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop12, missing codepage or helper program, or other error.

Any way to get this working??
Thanks.
I recently ran to the same issue, just a quick question - how to get vboximg-mount in FreeBSD? I see it's sources in virtualbox-ose-additions, but can't install it from any port :(
 
I recently ran to the same issue, just a quick question - how to get vboximg-mount in FreeBSD? I see it's sources in virtualbox-ose-additions, but can't install it from any port :(
I just investigated the same issue and you need to build and install emul/virtualbox-ose-kmod from ports with VBOXIMG=on config option (it will be off by default). That will give you vboximg-mount command.
 
Back
Top