jharris1993 wrote: ↑Sat Jan 23, 2021 12:41 pm
So, do you think that a 100 meg buffer for the boot partition is adequate? Can it be made smaller by default? Or are there additional subtleties that I don't understand or know about yet?
In the case of a plain Raspbian/Raspberry Pi OS image, the original boot partition (say Jessie or Stretch maybe) was smaller, but at some point the boot partition was increased to about 250MB. Mostly I think this is to do with apt upgrades of the firmware etc. It needs enough free space to store the new image, expand it, and keep a backup of the original so you could rollback in the event of an error. It also needs some free space to allow for future expansion. I've never seen a newer firmware or software version be smaller than the previous one! The 100MB is a guideline for any OS. It may be a bit under the recommended size for Raspbian/PiOS. If in doubt, you can keep it the same as the original boot partition size of OS you are backing up, since this partition is a fixed size, therefore no estimation is typically required.
The root partition is another matter, however, as you can't use the existing partition size since it depends on the size of your SD card. Here 400MB is the recommended guideline, but even this could well be a bit on the small side. Imagine if you install as many OSes as you can onto an SD card. Each will take up their minimum size since there is no free space to add to them. Does 400MB leave you enough free space for a full apt-update on Raspbian? Previous issues indicate it is not. Do I know enough about each OS to know the minimum size required? Even if I did, I don't know how big a future upgrade will be. Imagine updating Mathematica or LibreOFFICE, for example, they would require much more free space. Lack of free disk space often prevents the desktop environment from loading too. Don't forget you may need a swap file on there too.
jharris1993 wrote: ↑Sat Jan 23, 2021 1:54 pm
Perhaps the "backup" PINN image should be exactly the same as a raw installer package.
How can that be?
Suppose you install a normal image of a distro to an SD card, then immediately take another image of it. That would be an exact image of the original.
But suppose you then boot that image and take another image. Would that be the same? No, because a lot of things have now been configured for it to work on your system. This is the same for any backup system.
jharris1993 wrote: ↑Sat Jan 23, 2021 1:54 pm
If the result of a backup is the same as a raw installer package, then it doesn't matter. Any installation becomes the same as every installation, regardless of system or configuration.
From PINN's point of view, it is exactly the same process because it uses the same meta-files and tar files. Any differences are due to the nature of the partition_setup.sh script itself that is used to customise the image for use within the PINN multi-boot environment, and this is totally OS dependent. PINN only facilitates the script to have different behaviours to help it avoid unnecessarily performing the same customisations twice. In the case of Raspbian, their script can copy wifi and other network configuration files from NOOBS/PINN on first installation for convenience. But it doesn't need to do this a second time when restoring a backup, and probably shouldn't, hence why I provide the option for it to know the difference. PINN only provides the capability. What you do with it on your own custom image is up to you. And if you use an existing script, just make sure it still does what you want and doesn't conflict with anything you have customised.
There shouldn't be any reason why your backup wifi doesn't work the same after being restored. I have no idea what your image does or how it works. My suggestion was the only thing I could think of where PINN could potentially have an influence, but I doubt it is that. Mostly you can just use a backup as an standard installation.
jharris1993 wrote: ↑Sat Jan 23, 2021 1:54 pm
One of the advantages of this is in the case where multiple people are working on a project and have decided that PINN images are the best way to distribute working images to the rest of the team for test and/or review. If the result of a backup is the same as a raw installer package, then it doesn't matter. Any installation becomes the same as every installation, regardless of system or configuration.
This is largely how it is intended to work already. The result should be an accurate image of what you originally backed up, which would mostly not be the same as raw installer package, because you customised it before backing it up.
jharris1993 wrote: ↑Sat Jan 23, 2021 1:54 pm
A parallel case is the one where a package maintainer wants to release an operating system as both an image file AND a PINN formatted installation package file for those who have PINN installed. After the basic configuration is done, beta testing is complete, and management approval for release is obtained, all that needs to be done is "backup" the installation, rename it, compress it if desired, and place it on the server for distribution.
That's not how distro maintainers create raw installation images. They do not copy files to an SD card, customise it, then take an image from it.
The images are always created virtually and directly.
Take Gentoo64 for example, previously maintained by Sakaki. As the Gentoo maintainter, she created normal installation images and PINN installation images. The PINN installation images were made directly from the raw installation images. They were not backups of an SD card after the raw installation had been installed and executed.
It's the same with any PINN OS image that I create, or the gaming distros produced by Matt.
The main difference is that a raw installation (whether an .img file or a set of .tar.xz files) is a plain vanilla image with no personal data in it, no crypto keys, or hashes etc. However, a backup image (whether an .img file or a set of .tar.xz files) may contain plenty of these as they are normally created on first boot. Backups will also contain your own passwords, hostname, ssh keys etc.
So whilst backups can be installed in the same way as a raw installation, they should not be treated in the same way.
Yes, you can distribute them as you suggest, but just be aware of what information you are distributing inside them.
You may need to sanitize them first by deleting any of your own personal data you don't want to share, and maybe create a run-on-first-boot script for the user to personalise it to themselves, just like a real raw distro might.
Have you started with your GPIO boot selection code yet? How is it coming along?