Score:1

How to run script after partitioning step in a automated debian install (preseed.cfg)?

br flag

I am trying to configure an automated Debian 12 installation using the BTRFS filesytem, which should support timeshift for snapshots. So far, I have a complete preseed.cfg, integrated into the Debian 12 netinstall iso, which fully automates the installation process. However, the Debian installer uses @rootfs instead of @ for the root BRTFS volume. Unfortunately, this layout does not work with timeshift.

Following the instructions on https://www.youtube.com/watch?v=TKK1YYF2Pro, I managed to change the volume path from @rootfs to @, by switching to a shell right after the partitioning step. Using this manual approach, the installation and timeshift works. So basically the only missing step is to run a script, performing the required changed I did manually, after the partitioning step. However, I only managed to execute a script after the installation completed using the following preseed entry:

d-i preseed/late_command string sh /adjust-btrfs-volumes.sh

Running the script after the installation, leaves the installation broken, as many files created during the installation point to the now invalid @rootfs paths.

Is there any way to automatically execute my script after the partitioning step of the install, (or to even just stop the installer after the partitioning step is completed)?

Any help, or other ideas/workarounds are highly appreciated, thank you!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.