Score:0

Flashing .img with Balena Etcher reduces microSD size

pg flag

I flashed an ubuntu image with Balena Etcher for my Odroid XU4 and when I boot up I get a warning about limited disk space remaining. Checking the disk reports that the main installation is taking up around 6.7GB and the available remaining space is just 300MB!

I have a 64GB micro SD card so this doesn't make any sense to me.

How can I make the entire SD card size available to the linux image? I already tried resizing the partition with resize2fs which did nothing.

The SD card is otherwise functional and definitely is 64GB.

ru flag
that's a limitation of the flashing. Once the image is flashed you have to resize the SD card images, etc. for reuse with larger file sizes. The image is "minimum size" so that you can fit on an SD card and not have to download a 50GB image. You'll have to expand the disk yourself in another environment, either another Linux system (boot to a LiveUSB and then open the SDcard in gparted and resize the partitions) or with an advanced partitioning tool like Paragon Partition Manager on Windows.
GARcher avatar
pg flag
@ThomasWard I see - What is the least painful approach to doing this? Can I somehow edit the .img file to change the partition size before I flash it? Or use a different software for flashing that allows me to use the full microSD size?
ru flag
not really, the image is fixed, editing the image won't fix that and editing the image can cause problems. This is where you need to update the SD card post-flashing and then resize the partitions. This is the same for most devices where you're doing a direct image flashing to the SD card yourself - i say this because unless you are using a tool like partclone, etc. to make the image (which ALSO makes the image with 'free space' as well) it won't work that way. These images are designed to only have the OS and files, not be set to default expand.
ru flag
The least painful approach is to use an advanced partition editor (like Paragon Partition Manager if your environment is Windows or gparted on another Linux environment) to resize the partitions now that your SDcard has been flashed. That'd be the least painful approach. Editing the image or such as you suggested is a much more complicated headachey approach.
GARcher avatar
pg flag
@ThomasWard Thank you, I will try something like gparted and see if I get anywhere.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.