[nycbug-talk] OpenBSD, kernel debugger

Ray Lai nycbug
Mon Mar 6 00:51:39 EST 2006


On Sun, Mar 05, 2006 at 10:25:53PM -0500, Charles Sprickman wrote:
> Looking for a little help in resurrecting my OpenBSD firewall.  I sort of 
> gave up on it when I couldn't upgrade past 3.3 since everything after that 
> either locks up or panics on boot from CD or the hard drive.  So right now 
> I've got PFSense running on what was a desktop workstation, but it does so 
> many complex things with just a "point-n-click" that I'm not properly 
> learning queueing/shaping, tags, anchors and all that other newish stuff.
> 
> So the gist of my problem is this...  Something has changed post OpenBSD 
> 3.3 that has made it not work on the hardware I want to use.  I don't 
> think that I can provide any useful info to the OBSD folks without getting 
> a core dump and taking a look at where the panic originates.  But I'm 
> totally lost as to how to force a dump to disk when the kernel is still 
> booting.  Ignoring the rest of the possible problems here (I did give the 
> hardware a good once-over, including a 24+ hour memtest86+ run), how do I 
> accomplish getting it to dump to disk when it panics with a 3.4 or newer 
> kernel booted either off of CD or hard drive?
> 
> I've asked this a few times on -misc, but haven't really pulled a good 
> answer out of anyone there...  So any clever OBSD lurkers - delurk!

Try booting a CD image of the latest OpenBSD snapshot and try to
record the dmesg and backtrace, if you haven't done so already.
Send it in.

If you insist on trying to get a core dump, ensure the swap partition
on the same disk as your root partition is larger than the amount
of RAM you have, preferably double that amount.  So if your root
partition is sd1a and you have 512 megs RAM, make sure you have at
least a 512 meg partition in sd1a, preferably 1 gig RAM.  Also make
sure your /var/crash directory can hold that much as well!

Stick a copy of the latest OpenBSD snapshot's kernel in your root
directory and name it nbsd or something so you don't overwrite your
existing kernel.

You probably won't be able to boot that directly using your existing
boot manager thing, so you'll have to boot using a floppy or
something.  So burn a CD image or dd a floppy disk, boot it, and
when it gets to the "boot> " prompt, tell it to load the hard drive
kernel ("boot> boot hd1a:/nbsd" in this example).

You should be booting your new kernel now.  Once it panics and drops
into ddb, type "boot dump".  This saves the core dump into the swap
partition.  Upon reboot the system should see the core dump in the
swap and save it to /var/crash.  You now have a core dump.

I hope these instructions work.  You may need some improvisation,
street smarts, and frosted lucky charms.

-Ray-



More information about the talk mailing list