gokrazy / tools

this repository contains the gok CLI tool of gokrazy
https://gokrazy.org
BSD 3-Clause "New" or "Revised" License
50 stars 26 forks source link

packer: fail on small device #33

Closed oliverpool closed 2 years ago

oliverpool commented 2 years ago

I (stupidly) tried to run packer on a SD card of 512MB. Everything looked fine, but nothing worked...

This PR adds a check that the device has enough capacity and fails otherwise:

device is too small (1100 MB needed, 488 MB available)

The check is not overly accurate (it actually needs a couple bytes more), but I think it will cover the vast majority of usecases.

stapelberg commented 2 years ago

Thanks!