How to prevent preseed writing partition tables on all disks?
by cpalmer48583 from LinuxQuestions.org on (#5B1NR)
We are preseeding physical servers that contain 2 x SSD, 6 x NVMe, and 24 x HDD. The aim is to create software RAID1 (/boot) and RAID10 (lvm) with custom recipe on the SSDs (always /dev/sda and /dev/sdb), but to leave all the other devices untouched.
Everything works fine with the SSDs - initialised, partitioned, RAID, LVM, volumes exactly as we want. And any existing stuff on those SSDs is correctly erased.
BUT, I can't find any way to prevent partition tables being written to the HDDs. Which is not good as they contain application data (e.g. PV on /dev/sdc - no partition table). After the preseed all they contain is an empty partition table. Which if the preseed was only supposed to refresh Debian is a bit of a problem.
Is there any way to automatically do the nominated SSDs, but leave the remainder alone? We already have the following line in the preseed:
Code:d-i partman-auto/disk string /dev/sda /dev/sdbWe don't have the option to change the layout of the HDDs.
Many thanks


Everything works fine with the SSDs - initialised, partitioned, RAID, LVM, volumes exactly as we want. And any existing stuff on those SSDs is correctly erased.
BUT, I can't find any way to prevent partition tables being written to the HDDs. Which is not good as they contain application data (e.g. PV on /dev/sdc - no partition table). After the preseed all they contain is an empty partition table. Which if the preseed was only supposed to refresh Debian is a bit of a problem.
Is there any way to automatically do the nominated SSDs, but leave the remainder alone? We already have the following line in the preseed:
Code:d-i partman-auto/disk string /dev/sda /dev/sdbWe don't have the option to change the layout of the HDDs.
Many thanks