How-To DietPi in an UNRAID VM
Posted: Sat Jun 29, 2019 11:42 am
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.
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.