How about change boot to use whatever boot.cfg says is the default
boot option, and boot ...anything... to be the override-the-menu
command?
How does the attached look? It should implement the suggested idea.
The changes you propose sound like a good idea, however, I'm not sure
I completely understand how the bootloader is changing. Do you mind
prototyping the interaction in an email? I.e., simulate a typescript
of someone operating bootloader with the changes in place? [It may be
less trouble to create an actual typescript. :-)]
Sure, I'll give it a try:
[ First boot-up will display on VGA: ]
Welcome to the NetBSD 5.3 installation CD
=
ACPI should work on all modern and legacy hardware, however if you have
problems, please try disabling it.
If you encounter problems on hardware manufactured after 1998 with ACPI
enabled, please file a problem report including output from the 'dmesg'
command.
1) Install NetBSD
2) Install NetBSD (no ACPI)
3) Install NetBSD (no ACPI, no SMP)
4) Drop to boot prompt
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 30
[ press 4 using the PC keyboard ]
type ? or help for help.
consdev com0
[ ...and on the com0 serial port you will get: ]
Welcome to the NetBSD 5.3 installation CD
===
ACPI should work on all modern and legacy hardware, however if you have
problems, please try disabling it.
If you encounter problems on hardware manufactured after 1998 with ACPI
enabled, please file a problem report including output from the 'dmesg'
command.
[ Now, with my diff, if you simply do boot, you will instead of
just cycling through the kernel names the boot loader knows
about, you will instead get the command from the default menu
entry: ]
boot
command(s): load /miniroot.kmod;boot netbsd
booting cd0a:netbsd
10089136+518916+618576 [521152+509152]=0xbb28d8
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All
etc.
This is with the slightly modified diff, attached.
One problem is that if boot.cfg only contains boot as a
command, that will create an infinite loop in the boot loader. I
can add a static int to allow bootdefault()'s body only to be
invoked once, breaking this loop.
I still think it's a good idea to add the menu command, in that
case the interaction could go something like this:
[ First boot-up will display on VGA: ]
Welcome to the NetBSD 5.3 installation CD
=
ACPI should work on all modern and legacy hardware, however if you have
problems, please try disabling it.
If you encounter problems on hardware manufactured after 1998 with ACPI
enabled, please file a problem report including output from the 'dmesg'
command.
1) Install NetBSD
2) Install NetBSD (no ACPI)
3) Install NetBSD (no ACPI, no SMP)
4) Drop to boot prompt
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 30
[ press 4 using the PC keyboard ]
type ? or help for help.
consdev com0
[ ...and on the com0 serial port you will get: ]
Welcome to the NetBSD 5.3 installation CD
===
ACPI should work on all modern and legacy hardware, however if you have
problems, please try disabling it.
If you encounter problems on hardware manufactured after 1998 with ACPI
enabled, please file a problem report including output from the 'dmesg'
command.
menu
Welcome to the NetBSD 5.3 installation CD
=
ACPI should work on all modern and legacy hardware, however if you have
problems, please try disabling it.
If you encounter problems on hardware manufactured after 1998 with ACPI
enabled, please file a problem report including output from the 'dmesg'
command.
1) Install NetBSD
2) Install NetBSD (no ACPI)
3) Install NetBSD (no ACPI, no SMP)
4) Drop to boot prompt
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 30
[ and you can then chose whichever option you want ]
Regards,
- HÃ¥vard
Index: boot/boot2.c
===
RCS file: /cvsroot/src/sys/arch/i386/stand/boot/boot2.c,v
retrieving revision 1.58
diff -u -r1.58 boot2.c
--- boot/boot2.c4 Aug 2012 03:51:27 - 1.58
+++ boot/boot2.c26 Jul 2013 18:26:50 -
@@ -439,6 +439,10 @@
bootit(filename, howto, tell);
} else {
int i;
+
+#ifndef SMALL
+ bootdefault();
+#endif
for (i = 0; i NUMNAMES; i++)