NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange boot behavior on NetBSD/amd64 (NetBSD/Xen) - boot.cfg question





On 2/3/21 9:48 AM, Matthias Petermann wrote:
Hello all,

I think I had already mentioned this in another context, but since I just stumbled across it again I would like to bring it up again.

It appears that the bootloader's boot menu behaves strangely in some cases. Given is the following boot.cfg:

```
menu=Boot Xen:load /netbsd-XEN3_DOM0.gz console=pc;multiboot /xen.gz dom0_mem=512M dom0_max_vcpus=1 dom0_vcpus_pin console=vga
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
default=1
timeout=5
clear=1
```
(there is no line break in the Boot Xen line in the original file).

This produces a nice boot menu similiar to this:

1) Boot Xen
2) Boot normally
3) Boot single user
....

...and properly executes the "Boot Xen" option when I select that (press 1 key). Anyway - for some reason when I select Option "Boot normally" (press 2 key) the behavior is rather strange. This is the transscript from what is printed to the screen:

```
command(s): load /netbsd-XEN3_DOM0.gz console=pc;multiboot /xen.gz dom0_mem=512M dom0_max_vcpus=1 dom0_vcpus_pin console=vga
2419744+1319904=0x3910ec
Loading /var/db/entropy-file
Loading /netbsd-XEN3_DOM0.gz
heap full (0x6b868+327678)
```

Eventually the boot attempt fails.

When I select "Boot single user" (press 3 key), it appears to do what is expected and boots into single user mode and prompts for the pathname fo the shell.

What could be the cause that "boot normally" seems to use the configuration of "boot Xen" and on top of that then fails on boot. Does my boot.cfg have a syntactical error or is it a bug?

Kind regards
Matthias





Hi Matthias,
I've been reading this thread and have had some of my own issues with UEFI and Xen, which are different, but have some info that you may find useful. You asked in one post for documentation about the xen kernel boot parameters, this page may be useful for that, although I don't know if they're all supported.
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html

One particular one that may be of interest is the "vga=" parameter. You can set it as follows "vga=keep" to have the graphics adapter stay with the xen kernel, instead of trying to pass it off to the netbsd-XEN3_DOM0.gz kernel.
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html#vga
The "console=" parameter has a few alternative options that may be useful.
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html#console

If your graphics adapter has more than one output, say VGA and HDMI, try connecting another monitor to the other graphics port. This will test if the graphics output switches from one port to the other for whatever reason. I've had this happen on one system, when using the NetBSD installation image on a USB drive. The VGA port was originally in use, but the video output switched over to the HDMI port when the installation kernel was loaded, the VGA screen went into no-signal/sleep mode after the boot screen.

I'm not sure about your boot option issue, that is indeed weird behavior. Just some wild guesses: - look at the file in a hex editor to see if there are any weird (invisible) control characters that made there way into the file - specify a kernel for the boot command on that line. Boot assumes "netbsd", but will try a few different ones if it can't find a file with that name. I don't think the xen kernel is one of them, so this is not likely the problem.



Home | Main Index | Thread Index | Old Index