Our customers have a need to create a live USB linux system (Debian/Ubuntu based) that will be distributed on USB sticks.
I see two approaches here:
- “Factory”-based approach. Use the Debian/Ubuntu tools (live-helper) that create USB image using from some configuration, then burn the image on multiple USBs.
- “Prototype”-based approach. Install the system on the USB, update it, tweak it and make clones.
The first approach have the following pluses and minuses:
+ It clearly separates your changes/tweaks/custom packages/files from the base system. You can easily overview what changes are made to the basic system. This should simplify upgrading the base system to more recent.
+ Since the target system is not required to be update-able from “inside”, the choice of target partitions layout is broader (for example, the root file system could packed as squashfs image) (*). Also, the choice can be easily changed later by changing the configuration.
- It requires particular host Linux system for creating the images. Moreover, the version of host system should be fixed, because the tools may be broken/incompatible in later versions. Though this minus could be mitigated by using virtualization (we can provide VMWare image with this host system, for example).
- To make changes it is required to understand, how those tools are working.
The second approach, “prototype”-based have the following properties:
++ It is simpler to make changes to the live system. You only need to boot it and make some changes (install packages, update the configuration files, etc). You don’t need host Linux system to create image. You don’t need to understand how those image-creation tools are working.
- In some point of time, it will be difficult to separate the core system and the changes that were made.
- Making the system update-able from “inside” reduces the options of the target partitions layout (*). The choice is harder to change later.
Being the software developer, I prefer the first approach. Though I think the plus of other approach is quite important.
What do you think? Are there any other advantages/disadvantages that I’ve missed?
(*) This is important due to the USB/robustness/security requirements (making R/O partitions, placing parts of file system tree onto the RAM partitions, etc).