Saturday, September 26, 2020

Problems With Your Kernel Boot in VirtualBox?

I had a boot problem with my SilverHawk Linux build.  It runs under VirtualBox, and the "init" for the boot did not load.  It actually resulted in a Python stack trace that had so much information, it scrolled past what was needed, and you can't scroll back.  There was instantaneously a need to log all kernel boot information.  Here's what you need to do in VirtualBox.

  1. Open the settings for your virtual machine.
  2. Click on "Serial Ports"
  3. Place a check mark in "Enable Serial Port".
  4. Select "COM1" for the port number (unless you have another one, obviously).
  5. Select "Raw File" for the Port Mode.
  6. In the "Path/Address", you can then specify the file you want it logged to.

Once that is done, you can then add a kernel command to redirect output to your boot kernel command line in your Grub/Grun2/ISOLinux boot program.

serial --speed=115200


Now when you boot your system, you should get a new file (overwritten) that contains the boot sequence that can be used to debug your boot problem!

No comments:

Post a Comment