On Wed, 2026-07-15 at 09:11 +0200, Pascal Hambourg wrote: > On 13/07/2026 at 23:01, Holger Wansing wrote: >> Am 13. Juli 2026 20:14:11 MESZ schrieb Pascal Hambourg >> <[email protected]>: >>> >>> For all partitioning modes: >>> - if the entire disk is mounted -> skip the disk >>> - if a partition is mounted and unseen by parted -> skip the disk >>> "Skip" means that the disk will not be visible nor usable for partitioning. >>> >>> For manual partitioning: >>> - lock the mounted partition >>> "Lock" means that the partition is visible but altering or deleting it or >>> creating a new partition table on its disk is prohibited. This is an >>> existing feature designed to protect RAID members and physical volumes for >>> LVM and encryption, but AFAICS the lock is checked only in manual >>> partitioning. > > I updated the merge request [1] to implement the above. It should address > this bug report when using official images written to an entire USB drive.
Thank you so much for working on it, especially with such a quick turn-around! Sorry it has taken me so long to test it. I can confirm that the ISO from Salsa CI does not produce the "Partition(s) 1 on /dev/sda have been written, but [...]" error message. However, it does still overwrite the USB stick. Is that expected? I've attached an updated script to reproduce the issue with the ISO from Salsa in QEMU. >>> For automatic partitioning using an entire disk: >>> - skip the disk with a mounted partition >>> "Skip" means that the disk is not added to the available disk list. > > This will require extra changes in partman-auto, and maybe partman-auto-*. If I write the ISO[1] to a USB stick and boot it (on either real hardware or QEMU) without modification or preseed: - If I select "Guided - use the largest continuous free space" it installs to the USB stick in new partitions added after the ones from the ISO. The bootloader is overwritten so the USB stick boots to the new installation and the installer is no longer accessible. - If I select "Guided - use whole disk" it overwrites the USB stick. (This is expected until changes are made to parman-auto?) - If I select "Manual" it appears that all partitions can be changed, removed, or discarded by selecting the whole disk. Note: I don't see /dev/sda in /proc/mounts. Is that expected with how isohybrid images are loaded? Could that explain why I'm not seeing any partitions locked? And why it didn't produce the "failed to reread partition table [...] partitions in use" error message? Or perhaps I'm testing it wrong? >> Sounds really smart to me. > > You and Kevin deserve credit for challenging me about "the best we can do" > and giving me new ideas. It's much easier to come up with ideas than implement them. Thanks for doing the hard work! One other idea we haven't discussed, which might be helpful to distinguish the use cases you outlined from missing disks, would be to prompt the user to modify the installer media. For example: "No disks were detected other than the one containing this installer. Installing to this disk will modify the installer media. Continue?" Thanks again for all your work and explanation on this. Cheers, Kevin
repro-salsaci.sh
Description: Bourne shell script

