Linux kernel will not boot

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

The Linux kernel may not boot for a numerous variety of reasons. The purpose of this page is to build a diagnostic flow that will lead the user to the proper cause and thus to the proper solution.

Black screen

Symptoms:
- the bootloader is properly configured and the right partition with the linux kernel is being booted.
- however, during the boot process, the computer freezes 1 We can only see a black screen with white written output.
Part of the output (without the memory addresses appended to each line):

apic_timer_interrupt
? panic
? printk
mount_block_root
mount_root
prepare_namespace
kernel_init_freeable
? rest_init
kernel_init
ret_from_fork
? rest_init

This happens when the kernel cannot mount the filesystem.

To book, Linux needs a rootfs: initrd must be set.
Make sure the initrd or initramfs has properly been compiled and installed into the /boot directory.
Make sure the bootloader is properly configured and passes the proper initrd parameter.

Example, relevant part of /boot/grub/grub.cfg:

menuentry "Gentoo Base System release 2.2 (on /dev/sda1)" --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(/dev/sdc,msdos1)'
        search --no-floppy --fs-uuid --set=root 45uidhb8-aoeu-oeui-a922-05a7fab71495
        linux /boot/vmlinuz-4.4.21-gentoo root=/dev/sdc1
        initrd  /boot/initramfs-genkernel-x86_64-4.4.21-gentoo # If this line is missing, it will cause the above error.
}

As a last resort, it can be because a hard drive is dead or badly connected 2.

Other resources

http://processors.wiki.ti.com/index.php/Kernel_-_Common_Problems_Booting...
http://www.tuxradar.com/content/how-fix-linux-boot-problems