intelligent-agent / Reflash

Flasher image for Refactor distro for use with Recore 3D printer board
GNU Affero General Public License v3.0
1 stars 0 forks source link

Initializing the image for copy from eMMC to 8G #26

Closed goeland86 closed 1 year ago

goeland86 commented 1 year ago

The Recore's eMMC is 8GB, and so if there are files causing the size of the data on eMMC to be above 5GB it causes an issue when trying to run a backup. Initializing the image file at 8GB guarantees a successful copy, with the compression reducing the size of the final image later.

eliasbakken commented 1 year ago

I agree that it needs to be increased, but there is no guarantee that an 8 GB eMMC is 8 GB. It is usually something smaller, like 7.5 GB or even as low as 7.3 GB. A higher value will probably work during the backup, but it will not fit on to a new eMMC. I suggest we decrease it to 7 GB and also run a test to make sure that it works for at least one board. Screenshot from 2023-03-14 21-48-38

goeland86 commented 1 year ago

actually... Why not get the direct value from lsblk or even simply du -s for that particular folder, we take the unknown out of the equation.

eliasbakken commented 1 year ago

The size of the host will give you a pointer, but it does vary from board to board, so there should be some leeway to account for board variations. You can submit the solution using du -s as a PR, but add some leeway there as well, like 100 MB or so. A clean Mainsail v3.1.1 is 4.3 GB. I haven't tested OctoPrint. This function was implemented for a customer that wanted to roll out Mainsail.

eliasbakken commented 1 year ago

We have reverted back to using dd for creating an image of the eMMC, so this PR is no longer relevant.