How to automate System Customizations for Remastering?

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

How to automate System Customizations for Remastering?

Post by Neo_78 »

I customize FatDog on a regular basis to test different customizations which are then remastered and burned to DVD. I find myself frequently repeating the same steps manually, for instance:

- Creating custom configuration files (e.g. hosts, resolv.conf.head)
- Removing packages in Gslapt
- Installing packages in Gslapt, .deb files manually from the Debian repository, as well as PET files
- Disabling / enabling certain system modules
- Creating a new user and changing the root password
- Changing host name

I was wondering what the best approach would be to automate those tasks. I thought about creating a bash script that could be hosted e.g. on GitHub that is pulled in initially to execute and implement those changes. System configuration files could also be hosted there and then pulled in via that script to replace the default files. Customization changes could then be edited incrementally in the online repository instead of having to manually create the changes before each remastering session.

What is your take on this? How do you automate repetitive customizations?

User avatar
rockedge
Site Admin
Posts: 6594
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2794 times
Been thanked: 2664 times
Contact:

Re: How to automate System Customizations for Remastering?

Post by rockedge »

What is your take on this? How do you automate repetitive customizations?

I basically do what you have described to build WDL and KLV systems. I am not using Git for this, but will eventually. I use one I set up on a host server. A core KLV build is totally automated by script written by @wiak and plugin files for recipes to augment those builds with all the extra utilities and tools contributed by members of the Puppy Linux community and not in the Void Linux repos. The build script download those config files and the packages that are required to make the KLV-Airedale-alpha12 for example.

I still cheat and add things manually because with this build method I can directly access the base uncompressed rootfs.

Your idea I believe will work well if you can integrate this into the automated remaster process.

Clarity
Posts: 3920
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1651 times
Been thanked: 536 times

Re: How to automate System Customizations for Remastering?

Post by Clarity »

I have always considered that remastering is an EXCELLENT feature of the PUPs/DOGs. But, I still find it much too complicated for users than a preselection Remaster Menu screen would/could avoid. For example, the steps you've outlined could be in a Remaster Front-end where either thru checkboxes or some other methods, a user could fill-in such that when the enter/OK/Continue key is pressed, the remaster would carry out all of the step without need for any user step-wise intervention. ALSO, if the Remaster developer chose, the Front-end could offer the current stepwise manner, as well, for those who want to pursue the current route. Lastly, the Front-end could provide a "config" outcome that could be reused in the future for those of us who repeat the same process from time to time.

It just an idea. I am sure others may have thought of it too.

jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: How to automate System Customizations for Remastering?

Post by jamesbond »

Neo_78 wrote: Mon Feb 07, 2022 4:43 pm

What is your take on this? How do you automate repetitive customizations?

Fatdog64 ISO Builder

User avatar
stemsee
Posts: 784
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 187 times
Been thanked: 132 times

Re: How to automate System Customizations for Remastering?

Post by stemsee »

Neo_78 wrote: Mon Feb 07, 2022 4:43 pm

What is your take on this? How do you automate repetitive customizations?

Instead of remastering why not have your different configurations each as a seprate, small savefile. Then turn those into sfs modules, which you un/load as required for each remaster. Or just have several basesfs remaster files, use sfs-direct-remaster for a super quick , easy and cleaned remaster .... about 2-3 minutes!

Alternatively S:N:ApP allows custom setups as scripts.

stemsee

user1111

Re: How to automate System Customizations for Remastering?

Post by user1111 »

stemsee wrote: Sun Feb 20, 2022 5:35 pm
Neo_78 wrote: Mon Feb 07, 2022 4:43 pm

What is your take on this? How do you automate repetitive customizations?

Instead of remastering why not have your different configurations each as a seprate, small savefile. Then turn those into sfs modules, which you un/load as required for each remaster. Or just have several basesfs remaster files, use sfs-direct-remaster for a super quick , easy and cleaned remaster .... about 2-3 minutes!

Alternatively S:N:ApP allows custom setups as scripts.

stemsee

Fatdog's multi-session saves was originally for use with CD/DVD where a additional safe sfs files is added at each save and all of those are loaded at bootup. I use that method of running Fatdog but where the save files/sfs are stored on HDD instead. In practice I tend to just merge those into fd64.sfs using something like

unsquashfs fd64.sfs to extract fd64.sfs
unsquashfs -f -d squashfs-root multi....base.sfs
unsquashfs -f -d squashfs-root muti....save.sfs
and then reform the fd64.sfs with
mksquashfs squashfs-root/ fd64.sfs -comp lz4 -Xhc
and then delete the multi.... save files.

Fundamentally however you could maintain those multi... files and select which ones to actually have loaded (or not) by moving them into/out of the fd64.sfs folder where the multi-session files are usually stored/loaded/saved. A issue there however is that you'd probably run into conflicts/corrupted-sessions where some recorded changes were dependent upon others that might be in a different save file that you hadn't loaded as part of the set.

I tend to leave squashfs-root present on HDD once its been extracted, so to manually make changes I can enter that tree and edit files within it and just run the mksquashfs .. action to create a new fd64.sfs from that updated image/version. lz4 compression is quite quick, and even quicker if you don't use the -Xhc high compression switch
mksquashfs squashfs-root/ fd64.sfs -comp lz4

But this is all a aside, I've not answered how to automate customisations. I'd do that via scripts but that involves having to know relatively deep knowledge of how/where Fatdog is structured. In the container script that I use with Fatdog I store config files in the same script after the final exit 0 command line so anything after that isn't interpreted and extract/cut out those using sed and tokens. For example for my rox pinboard I have the configuration of that in the script 'text' (after exit 0) area with a <!-- roxpinboardStart --> and <!-- roxpinboardEnd --> tokens that the script pulls out using sed to where I want that content/file

Code: Select all

sed -n '/<!-- r\oxpinboardS -->/{:a;n;/<!-- r\oxpinboardE -->/b;p;ba}' \
                 $SCRIPT >top/root/.config/rox.sourceforge.net/ROX-Filer/PuppyPin
Post Reply

Return to “FatDog64”