1

I've used buildroot to compile a Linux kernel image with the root file system embedded as an initramfs. But when I go to boot it I see grub select the enctry and then I get a solid cursor in the up left of the screen and nothing else. I've used the below Grub configuration to load the kernel from an EFI boot partition. Is this the correct way to load a kernel with an embedded initramfs or how do I go about debugging this?

menuentry "linux" {
        linux /bzImage console=/dev/tty1
}
0

It's correct, — (belated edit: except for console=/dev/tty1 which should not have /dev/ in it) — and you can embed kernel parameters too, so it reduces to just linux thefile. I used this style for my Gentoo install with a builtin, custom initramfs - but I still passed optional microcode as dedicated file. It worked nicely.

menuentry "Default Linux" {
    linux "/bzImage-default"
    initrd "/early-microcode.img"
}

How to debug, that's hard to answer while knowing nothing about your hardware, kernel configuration and usecase. Usually it's missing drivers or modular drivers and no way to actually load the modules, so enable more things and recompile.

If nothing else works, you can also try booting it in a VM and see if it fares any better than the bare metal, and with a VM you can check out serial console, CPU activity, I/O and RAM state.

  • 1
    I figured out the problem. The value I was passing to the console parmeter should not be an absolute path it needs to just be "tty1" /dev/tty1 worked when I was loading with grub because it used a different init but the one that was getting called with the initramfs crashed when given that value. – Pete May 30 at 1:46
  • @Pete oh... sorry for missing that. ^^; – frostschutz May 30 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.