NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-amd64/59207: unexpected behavior of dev command in bootstrap code
>Number: 59207
>Category: port-amd64
>Synopsis: unexpected behavior of dev command in bootstrap code
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 23 11:00:00 +0000 2025
>Originator: Paul Goyette
>Release: NetBSD 10.99.12
>Organization:
+---------------------+--------------------------+----------------------+
| Paul Goyette (.sig) | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | 1B11 1849 721C 56C8 F63A | paul%whooppee.com@localhost |
| Software Developer | 6E2E 05FD 15CE 9F2D 5102 | pgoyette%netbsd.org@localhost |
| & Network Engineer | | pgoyette99%gmail.com@localhost |
+---------------------+--------------------------+----------------------+
>Environment:
System: NetBSD speedy.whooppee.com 10.99.12 NetBSD 10.99.12 (GENERIC) #0: Wed Mar 19 03:32:11 UTC 2025 paul%speedy.whooppee.com@localhost:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
In the final stage bootstrap code (where the menu of boot selections
is presented, the dev command does not appear to work when included
in the boot.cfg file; the default device does not get updated. When
entered interactively (from the ``boot prompt'') it works as one would
expect.
The problem occurs in both "standard" and "efi" bootstrap code (files
/usr/mdec/boot and /usr/mdec/bootx64.efi) so probably lives in common
shared code.
>How-To-Repeat:
1. Install a base VM system - the system created by sysutils/anita works
fine for this step.
2. Boot the resulting VM, login as root, and edit the /boot.cfg file to
a) add a failsafe menu entry #4, just in case it works!
b) add an invocation of the ``dev'' command to select a different
default device
The following boot.cfg is useful here:
# more /boot.cfg
menu=Boot normally:rndseed /var/db/entropy-file;boot
menu=Boot single user:rndseed /var/db/entropy-file;boot -s
menu=Drop to boot prompt:prompt
menu=Boot normally:rndseed /var/db/entropy-file;boot hd0a:/netbsd
default=1
timeout=5
clear=1
dev=fd0a:
3. Boot the VM, drop to the boot prompt, and observe that the default
device has not been set:
<Banner removed for brevity>
1. Boot normally
2. Boot single user
3. Drop to boot prompt
4. Boot normally
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
Option: [1]:3
type "?" or "help" for help.
> dev
disk hd0 size 25 GB
hd0a(NetBSD FFS) hd0b(NetBSD Swap)
disk fd0
fd0a
disk fd1
fd1a
default hd0a
>
4. Enter the dev command manually and note the default device updates:
> dev fd0a:
> dev
disk hd0 size 25 GB
hd0a(NetBSD FFS) hd0b(NetBSD Swap)
disk fd0
fd0a
disk fd1
fd1a
default fd0a
>
>Fix:
Please
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index