From: Crystal Kolipe Subject: Re: New 'Select root disk by size' install option To: Eric Radman Cc: tech@openbsd.org Date: Mon, 2 Mar 2026 16:22:07 +0000 On Mon, Mar 02, 2026 at 10:10:39AM -0500, Eric Radman wrote: > For systems with more than one disk, the order of sd(4) devices make it > very likely that autoinstall will destroy a volume intended only for > data. In the following example, sd1 (at sdmmc0) is the intended target, > but if an NVMe or a second SATA devices is added, the correct choice > will become sd2: > > sd0: ATA, ST5000LM000-2U81, 0001 naa.5000c500eb875982 (4657.5G) > sd1: Samsung, BJTD4R, 0000 (29.1G) > > To guard against this, you really have to reboot, double-check the > device assignments, then reboot again to begin the install. Why do you need to reboot and double check the assignments? The installer displays the disk type, model number, capacity. > The attached patch allows autoinstall to sort disks based on expected > size. Devices between 1 and 1000GB are presented as the default choice: > > Select root disk by size? (range in GB) [1-1000] > Available disks are: sd0 sd1 sd2 sd3. > Which disk is the root disk? ('?' for details) [sd2] ? > sd0: VirtIO, Block Device (0.5G) > sd1: VirtIO, Block Device (4096.0G) > sd2: VirtIO, Block Device (5.0G) > sd3: VirtIO, Block Device (10.0G) > > As before, any disk may be selected, but this provides a mechanism for > picking a plausible install target. I don't see any usefulness in this whatsoever. Also, the values seem to be fairly arbitrary. USB flash drives with less than 1 Gb of capacity are increasingly difficult to find, so it's entirely plausible that a 4 Gb or 8 Gb drive is the install media. Drives of this size are also practical install targets, so how can you make a resonable assumption just based on size alone?