[DragonFlyBSD - Submit #1700] skip boot2 menu on <enter>
sigttou
bugtracker-admin at leaf.dragonflybsd.org
Sat Oct 3 05:36:09 PDT 2026
Issue #1700 has been updated by sigttou.
File boot2-cr-lf-refresh.patch added
I refreshed Johannes Hofmann's proposal against current master and extended it to
accept LF as well as CR at the initial loader wait. Enter now follows the normal
/boot/loader path instead of dropping straight to the boot2 prompt.
It builds for both disklabel32 and disklabel64, and Enter, serial CR and serial
LF all boot the layout; Escape still opens the prompt. The CR-only version did
not handle serial LF.
Could this refreshed and extended version be considered?
----------------------------------------
Submit #1700: skip boot2 menu on <enter>
http://bugs.dragonflybsd.org/issues/1700#change-14766
* Author: Johannes.Hofmann
* Status: In Progress
* Priority: Normal
* Assignee: tuxillo
* Target version: 6.4
----------------------------------------
Hi,
tuxillo noticed that the trick to speedup booting by hitting <enter>
does not work with default UFS-based installations, as those have no
separate /boot partition, and therefore the default location for the
loader is wrong (it had been changed to match default HAMMER
installations in commit:3735e368a1bdbe773c79c34512f49c905ff77bd7)
We could change boot2 to just continue it's normal operation without
entering the prompt when the user hits <enter>. That way one can avoid
the delay on UFS and HAMMER systems:
<pre>
<code class="ruby">
diff --git a/sys/boot/pc32/boot2/boot2.c b/sys/boot/pc32/boot2/boot2.c
index 459436f..55516be 100644
--- a/sys/boot/pc32/boot2/boot2.c
+++ b/sys/boot/pc32/boot2/boot2.c
@@ -346,7 +346,7 @@ main(void)
*/
if (autoboot && !*kname) {
memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
- if (!keyhit(3*SECOND)) {
+ if (!keyhit(3*SECOND) || xgetc(0) == '\r') {
load();
memcpy(kname, PATH_BOOT3_ALT, sizeof(PATH_BOOT3_ALT));
load();
</code>
</pre>
To actually enter the prompt one has to hit any other key (e.g. Esc).
The check for '\r' works ok for me, but maybe we also need to check
for '\n'?
Cheers,
Johannes
---Files--------------------------------
boot2-cr-lf-refresh.patch (1.28 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Submit
mailing list