Hey everyone… I was trying to get DietPi working in an Unraid VM and had many failed attempts. There didn’t seem to be many people trying to get this working either. It might have been obvious to some but since I know not-so-much about linux in general it was more than a few hours of work over multiple days to figure it out.
So here’s the problem… downloading the NativePC image and using it as an Unraid disk ended up in a boot loop so to speak trying to check for updates because there was no free space available on the disk.
The solution is to resize the image.
Here’s the couple commands I used in a Debian VM to increase the disk size and create an image that can be used in Unraid.
qemu-img resize DietPi_NativePC_BIOS-x86_64-Stretch.img 4G
cp DietPi_NativePC_BIOS-x86_64-Stretch.img DietPi_NativePC_BIOS-x86_64-Stretch-orig.img
virt-resize -expand /dev/sda1 DietPi_NativePC_BIOS-x86_64-Stretch-orig.img DietPi_NativePC_BIOS-x86_64-Stretch.img
Now DietPi_NativePC_BIOS-x86_64-Stretch.img is a 4GB disk that can be used to create the Unraid VM. If you want more than 4GB just change the 4G to whatever you want for size. 10G, 20G, 30G, whatever.
I hope this is helpful.
Many thanks for sharing!
Btw I would recommend to use e.g. the VMware image as basis instead of the Native PC one, so the system is correctly identified as VM. I guess Unraid VM supports VMDK?
If you face missing free disk space, then the automatic resize seems to fail or does Unraid VM creates a virtual disk which overall size matches the one from the image? Also in this case the VMware VMDK would be a solution since it is a dynamically allocated 8 GiB disk, AFAIK.
I first tried with the VMware image and resized it in the same fashion as I’ve outlined here, using the information from a thread on the Unraid forums… but using that image gave the error below when trying to boot up… and I wasn’t able to figure out how to resolve it… which led me to using the native pc image.
I’m not sure if anyone tried using the vmdk directly in unraid, the post I was using as a guide converted the image to qcow2. Perhaps that was not needed.
Hmm, somehow the drive seems to have a different UUID than what the image/bootloader is looking for. I remember one other case with a similar issue, not 100% sure in which cases (which image format?) the UUID from the image is applied an when not.