Re: debugging a kernel that doesn't start

2022-09-14 Thread Emmanuel Dreyfus
On Mon, Sep 12, 2022 at 10:56:46PM +0200, Edgar Fuß wrote: > Probably stupid question: I can switch the machine to UEFI. Is it easier > to debug things from there that from a BIOS boot? My experience on a mac is that it helps a lot. You can printf() during early boot, until you call UEFI's ExitBo

Re: debugging a kernel that doesn't start

2022-09-13 Thread Edgar Fuß
> I'm trying to run NetBSD on a Dell PowerEdge R6515, and the kernel is being > loaded (PXE or USB) but then the machine hangs hard. I've made a giant step forward: booting the -current install image from a USB key /via UEFI/ works. Maybe it's a bug in the server's CSM. Thanks for all the helpfu

Re: debugging a kernel that doesn't start

2022-09-13 Thread Kengo NAKAHARA
Hi, On 2022/09/13 4:17, Edgar Fuß wrote: I'm trying to run NetBSD on a Dell PowerEdge R6515, and the kernel is being loaded (PXE or USB) but then the machine hangs hard. What's the way to debug a kernel that hangs so early that you can't printf or drop into ddb? I guess that's a phenomenon quit

Re: debugging a kernel that doesn't start

2022-09-13 Thread tlaronde
Le Mon, Sep 12, 2022 at 09:17:52PM +0200, Edgar Fuß a écrit : > I'm trying to run NetBSD on a Dell PowerEdge R6515, and the kernel is being > loaded (PXE or USB) but then the machine hangs hard. > > What's the way to debug a kernel that hangs so early that you can't printf > or drop into ddb? I

Re: debugging a kernel that doesn't start

2022-09-12 Thread Brian Buhrow
hello. Another thing to try is to see if you can get to the boot prompt and boot the kernel with various options, i.e. -a, -c, and possibly -2, to disable acpi. If -c gets you to a driver selection prompt, then you know the kernel is loaded and ready for you to disable drivers. If you

Re: debugging a kernel that doesn't start

2022-09-12 Thread Manuel Bouyer
On Mon, Sep 12, 2022 at 10:04:24PM +0200, Edgar Fuß wrote: > > If you can setup a serial console, it may make things much easier. > I do have a serial port on the machine. > > > I almost always use serial consoles on dev machines; I don't remember the > > details but doing the equivalent of a putc

Re: debugging a kernel that doesn't start

2022-09-12 Thread Robert Swindells
>> The simplest way to debug something is using a serial port, do you have >> access to the one on this machine? > >Yes, there is one. It seems to sort-of mirror the on-screen messages up to >the point the NetBSD boot runs. I tried > consdev com0,9600 >from the boot prompt but that hung th

Re: debugging a kernel that doesn't start

2022-09-12 Thread Manuel Bouyer
On Mon, Sep 12, 2022 at 10:02:33PM +0200, Edgar Fuß wrote: > > Have you tried booting a custom kernel with some drivers removed? > No. I wouldn't know which drivers to remove. > The problem is the Kernel utters absolutely nothing, so it must hang very, > very early. > > > have you tried an uncomp

Re: debugging a kernel that doesn't start

2022-09-12 Thread Edgar Fuß
> then you can bypass all the worries of using BIOS routines or whatnot > and just poke the hardware directly. Probably stupid question: I can switch the machine to UEFI. Is it easier to debug things from there that from a BIOS boot?

Re: debugging a kernel that doesn't start

2022-09-12 Thread Edgar Fuß
> That could be a strong clue or it could be unrelated. OK, just in case that might be another clue: If I want to interrupt the boot countdown, the first keystroke gets lost, I need to press a second time.

Re: debugging a kernel that doesn't start

2022-09-12 Thread Mouse
>> The simplest way to debug something is using a serial port, do you >> have access to the one on this machine? > Yes, there is one. It seems to sort-of mirror the on-screen messages > up to the point the NetBSD boot runs. I tried > consdev com0,9600 > from the boot prompt but that hung the

Re: debugging a kernel that doesn't start

2022-09-12 Thread Edgar Fuß
> If you can setup a serial console, it may make things much easier. I do have a serial port on the machine. > I almost always use serial consoles on dev machines; I don't remember the > details but doing the equivalent of a putchar very early was possible. Is the BIOS still available or how does

Re: debugging a kernel that doesn't start

2022-09-12 Thread Edgar Fuß
> Have you tried booting a custom kernel with some drivers removed? No. I wouldn't know which drivers to remove. The problem is the Kernel utters absolutely nothing, so it must hang very, very early. > have you tried an uncompressed one? No, but I guess the official install image (on a USB key) i

Re: debugging a kernel that doesn't start

2022-09-12 Thread Manuel Bouyer
On Mon, Sep 12, 2022 at 09:17:52PM +0200, Edgar Fuß wrote: > I'm trying to run NetBSD on a Dell PowerEdge R6515, and the kernel is being > loaded (PXE or USB) but then the machine hangs hard. > > What's the way to debug a kernel that hangs so early that you can't printf > or drop into ddb? I gue

Re: debugging a kernel that doesn't start

2022-09-12 Thread Robert Swindells
Edgar Fuß wrote: > I'm trying to run NetBSD on a Dell PowerEdge R6515, and the kernel is being > loaded (PXE or USB) but then the machine hangs hard. Have you tried booting a custom kernel with some drivers removed? I tried PXE booting an i386 machine today using pxeboot_ia32.bin from -curren

debugging a kernel that doesn't start

2022-09-12 Thread Edgar Fuß
I'm trying to run NetBSD on a Dell PowerEdge R6515, and the kernel is being loaded (PXE or USB) but then the machine hangs hard. What's the way to debug a kernel that hangs so early that you can't printf or drop into ddb? I guess that's a phenomenon quite common for a new port or changes to loc