Page 1 of 1

How to debug a bootloader (syslinux on x86)

Posted: Sat Oct 11, 2014 4:26 pm
by anatolik
I need to patch/compile syslinux on Linux Arch (BIOS+GPT partition). Unfortunately when I install my version of syslinux it fails to boot. It gives me black screen at very early stages. There is something wrong, but syslinux does not provide any useful information. I would like to debug the problem.

What is the best way to debug bootloaders? My gut feeling that there are 2 way:
- use serial port to connect to running machine and check the debug output
- use qemu/bosch and remote gdb debugger

I was not able to find any useful information about doing either way. Did anyone tried to do these thing? Could you share your experience/steps to reproduce?

Thanks for your reply in advance.

Re: How to debug a bootloader (syslinux on x86)

Posted: Sat Oct 11, 2014 5:52 pm
by Roman
anatolik wrote:I need to patch/compile syslinux on Linux Arch (BIOS+GPT partition). Unfortunately when I install my version of syslinux it fails to boot. It gives me black screen at very early stages. There is something wrong, but syslinux does not provide any useful information. I would like to debug the problem.

What is the best way to debug bootloaders? My gut feeling that there are 2 way:
- use serial port to connect to running machine and check the debug output
- use qemu/bosch and remote gdb debugger

I was not able to find any useful information about doing either way. Did anyone tried to do these thing? Could you share your experience/steps to reproduce?

Thanks for your reply in advance.
Hi, you can also create break points with cli and hlt and test in QEMU. About using GDB with QEMU: http://wiki.qemu.org/Documentation/Debugging