Using dmesg is tricky -- if the panic happens early enough in the boot, say before the filesystems are mounted, then there will be no log written. One option is to set LILO or GRUB to use a serial console as the boot console and then hook a laptop up with a serial cable and use a terminal emulator to capture the boot. I've never actually done this, but I believe GRUB and LILO support it, try
this howto.