Until this issue is resolved in balena OS, if you want to run balenaOS from a USB stick on a raspberryPi 3 you will need to manually increase the size of the disk partitions.
I tested this on a raspberryPi 3 model B v1.2 using balenaOS 2.29.0+rev1:
- Log into the Host OS (I used the webterminal, but the CLI would work as well)
- Download and run a debian docker container in privileged mode
balena run --privileged --name parted -dit debian
- Enter a bash session in the container
balena exec -it parted bash
- Update packages
apt-get update
- Install
parted
apt-get install parted
- Resize partition 4 using
parted
parted /dev/sda -- resizepart 4
- You will see a warning saying
Warning: Partition /dev/sda6 is being used. Are you sure you want to continue?
, this is ok, just typeYes
and continue. - You will be prompted for an end value for the resize (it will look like this
End? [1808MB]?
), here you need to type-1s
(-1s
specifies exactly the last sector). - Follow the same steps (7 & 8) for partition 6 using
parted /dev/sda -- resizepart 6
- exit the docker container back to the Host OS
- run partprobe to re-read the partition table and then check the sizes of the partitions
partprobe && fdisk -l
- You should now see that the partition sizes match up with the size of your USB drive
- Finally, clean up the docker container and image
balena stop parted && balena rm parted && balena rmi debian
It should, in theory, be possible to skip the interactive mode of parted
using the -s
flag, however I couldn’t get it to work. The only way I could get the parted commands to run was using the interactive mode.