In casper-premount, a script looks for the custom_installation folder, copies it to /custom_installation, copies the preseed file to / for initrd preseeding and runs casper_premount.sh. In casper-bottom, a script runs casper_bottom.sh and then moves /custom_installation to /root/custom_installation. Further hooks are used within ubiquity. The structure of the custom_installation folder is as follows.
/custom_installation
/custom_installation/preseed.cfg #the preseed file is loaded via initrd preseeding
/custom_installation/hooks #the following scripts are executed as follows:
/custom_installation/hooks/casper_premount.sh #executed as soon as the casper folder is copied
/custom_installation/hooks/casper_bottom.sh #executed within casper-bottom
/custom_installation/hooks/early_command.sh #executed at the beginning of the Ubiquity installation
/custom_installation/hooks/late_command.sh #executed at a later stage of the Ubiquity installation
/custom_installation/hooks/success_command.sh #executed at the end of the Ubiquity installation
External files and packages can be placed anywhere within the casper folder, it's up to the hook scripts to use them.
Revised external hooks proposal:
Add 1 extra boot parameter (which replaces find_preseed, override_script, and override_files)
custom_ installation= /path/to/ custom/ installation/ folder
In casper-premount, a script looks for the custom_installation folder, copies it to /custom_ installation, copies the preseed file to / for initrd preseeding and runs casper_premount.sh. In casper-bottom, a script runs casper_bottom.sh and then moves /custom_ installation to /root/custom_ installation. Further hooks are used within ubiquity. The structure of the custom_installation folder is as follows.
/custom_ installation installation/ preseed. cfg #the preseed file is loaded via initrd preseeding installation/ hooks #the following scripts are executed as follows: installation/ hooks/casper_ premount. sh #executed as soon as the casper folder is copied installation/ hooks/casper_ bottom. sh #executed within casper-bottom installation/ hooks/early_ command. sh #executed at the beginning of the Ubiquity installation installation/ hooks/late_ command. sh #executed at a later stage of the Ubiquity installation installation/ hooks/success_ command. sh #executed at the end of the Ubiquity installation
/custom_
/custom_
/custom_
/custom_
/custom_
/custom_
/custom_
External files and packages can be placed anywhere within the casper folder, it's up to the hook scripts to use them.