OpenBSD Journal

The installer now prefers disks over 1GB

Contributed by rueda on from the one-gee whiz! dept.

Klemens Nanni (kn@) has committed the his proposed change [See previous article] such that the OpenBSD installer now prefers disks over 1GB when prompting for the root disk. The commit message explains the change:

CVSROOT:	/cvs
Module name:	src
Changes by:	kn@cvs.openbsd.org	2025/05/04 06:32:41

Modified files:
	distrib/miniroot: install.sub 

Log message:
Prefer disks bigger than 1G as default root disk on install

-current picks the alphanumerically first disk as default, which isn't the
beset choice if install media, softraid(4) key disks or small external media
attaches before the disk one intends to use.
Finding the "best" disk is hard, but reshuffling the list of disks such that
tiny ones come last is easy and works well enough to cover those cases:

Available disks are: sd0 sd1.
-Which disk is the root disk? ('?' for details) [sd0] ?
+Which disk is the root disk? ('?' for details) [sd1] ?
sd0: VirtIO, Block Device  (0.8G)
sd1: VirtIO, Block Device  (3.0G)

While here, rename the variable to reflect how it is used as list of disks
rather than a single one.

OK afresh1

This is likely to save a lot of us a bit of typing during our next installs. Happy hacking!


Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]