On Thu, Apr 02, 2026 at 12:30:56PM +0200, Pascal Hambourg wrote:
On 01/04/2026 at 09:23, Marc Haber wrote:
The more I think about it, the more I get convinced that the most
flexible way with the least changes in the installer is to just let
partman optionally be a no-op if there is already something mounted
on / target,
Current behaviour allows to re-run partman after completing the
partitioning and something is mounted on /target. It then unmounts it
and allows to redo the partitioning. Using "something is mounted on
/target" as a no-op hint would prevent doing this. I'd rather use a
flag file in /var/lib/partman, a preseeded debconf item or an
alternative like what is done with boot loader components
(grub-installer, systemd-boot-installer, nobootloader).
That would be perfect. I'd probably go for a preseeded debconf item
(since you need to preseed anyway to have the early_command to partition
executed) AND a check whether there is already something mounted on
/target (as if, 'nothing mounted on target' starts partman in any case
EVEN IF the debconf item is set).
so that the local admin can set the disk and basic filesystems up in
an early_command, or to have a dedicated pre-partitioning hook to
download and execute a script.
If you are going to replace partman, you may need to perform the
following actions:
- load related installer components (e.g. lvm2-udeb)
- stop old LVM volumes and RAID arrays
- create partition tables
- set up LVM, software RAID, encryption...
- create filesystems and swaps
- mount filesystems on /target
- activate swaps
- create /target/etc/crypttab and /target/etc/fstab
- install filesystem and block layer packages in the target system
- set flag file /var/lib/partman/ignore_uefi for grub-installer
That's a bunch. But probably doable. Since the preseeded installer will
not track back and can abort in the error case, I wonder whether:
- the replacement could assume that there are no old LVM volumes and
software RAIDs started and whether
- the installer really needs a swap partition. About 95 % of the servers
I have installed in my life run fine without swap.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421