[General Topics] Ferather:
How to convert a less common drive image into a more common drive image, and then convert it into a virtual drive image, which is dynamic and is 12GB in size.

In this example I will be using 'NomadBSD' which normally flashes to a USB, and has no drive install method (setup for current drive, usb).

First I need to convert the '.efi' file into an '.img' file using Commander || dd if=D:\Files\Downloads\nomadbsd-1.2-RC2.efi of=D:\Files\Downloads\NomadBSD.img

Next I convert it into a dynamic '.vdi' file || "C:\Program Files\Virtual Box\VBoxManage" convertfromraw -format VDI "D:\Files\Downloads\NomadBSD.img" "D:\Files\Downloads\NomadBSD.vdi" --variant Standard

Now I want to resize it to 12GB || "C:\Program Files\Virtual Box\VBoxManage" modifyhd "D:\Files\Downloads\NomadBSD.vdi" --resize 12288

I prefer another format '.vmdk' || "C:\Program Files\Virtual Box\VBoxManage" clonehd "D:\Files\Downloads\NomadBSD.vdi" "D:\Virtual\NomadBSD.vmdk" --format vmdk

Next I delete unused files || del /f D:\Files\Downloads\NomadBSD.img & del /f D:\Files\Downloads\NomadBSD.vdi

For good measure I check before closing || ls D:\Files\Downloads\ & ls D:\Virtual\

https://ibb.co/3NW22Wz

Now setup VirtualBox, when at the drive setup part, drag and drop your created drive into the VirtualBox created folder, in this case 'D:\Virtual\Nomad\'.

Select 'Existing drive' and add your created drive image, I have a SSD, so I also check the 'SSD' option within the machine preferences.

----

How to setup nomad as a virtual guest:

sudo su

pkg update && pkg upgrade

pkg install virtualbox-ose

pw groupmod vboxusers -m nomad

pw groupmod operator -m nomad

pkg autoremove

geany /boot/loader.conf

Add || vboxdrv_load="YES"

Add || vboxvfs_load="YES"

geany /etc/rc.conf

Add || vboxservice_enable="YES"

Add || vboxguest_enable="YES"

reboot

--

How to mount a drive img:

After mdconfig (see post 4) || sudo dsbmc || This will open the mount manager as 'root'.

Generic method || sudo mount -t FILESYSTEM /DEVICE /LOCATION

--

How to fix the screen resolution:

Menu > Settings > ARandR > Outputs > Select a supported resolution > Save as: monitor > Open Pcmanfm > View > Show Hidden > .screenlayout > Edit 'monitor.sh' to suit.

https://ibb.co/1sCK0qP

Menu > Settings > DSBAutostart > Add: ~./screenlayout/monitor.sh > Move up to the top > Delete: redphase, batterymon and the audio monitor.

https://ibb.co/ZVpHrhM

--

How to setup shared folders:

In your virtual machine, select: Settings > Shared Folders > Add > Select your folder, but don't bother with auto-mount as it does not work with FreeBSD.

https://ibb.co/p3KQ4dx

Now I make a folder to mount my shared folder || mkdir ~/Files & chmod 777 ~/Files || Note '~' means current user home: /home/nomad

https://ibb.co/3pzDbqR

Next I create a script that will auto-mount drives || >~/.config/shared.sh

Now I need to edit the script || geany ~/.config/shared.sh

Header: #!/bin/sh || Code: mount -t vboxvfs Files ~/Files

https://ibb.co/qgkJ3Zb

Next I add the script to auto start || dsbautostart

https://ibb.co/4YD3VhD

reboot

----

Note for Lubuntu:

To install Lubuntu on virtualbox, disconnect the network cable (in preferences), I believe a web address has changed.

Do not 'disable' the virtual adapter, otherwise the install will not setup any drivers by default.

https://ibb.co/fXGqN3p

----

How to create a shared storage drive:

This method uses a virtual drive with NTFS as a universal filesystem bridge between OS's.

The drive can be mounted via Windows, which allows you to transfer files.

https://ibb.co/6RmzT5t

https://ibb.co/3Fr3g3m

https://ibb.co/qyzKRvs

https://ibb.co/71y5TVr

https://ibb.co/d2DMG99

https://ibb.co/2nvpqJZ

https://ibb.co/kSvDw4T

https://ibb.co/gSWmwNd

https://ibb.co/j4PtzCj

https://ibb.co/DwLjfgJ

Tips:

Drive image files (example, system.img) can be directly mounted from the storage.

Remember to unmount, detach the virtual disk in Windows.

----

If you have 'su', superuser on your phone, you can use Commander as the terminal:

adb shell || Then || su || To test || ls /system/bin

----

Helpful links:

Linux manual | FreeBSD manual | A-Z bash commands | ADB shell manual

----