5

By default to boot image bzImage of a Linux kernel you need to use the bootloader. If you try to boot the image directly it will give the error:

Booting from Hard Disk...
Direct booting from floppy is no longer supported.
Please use a boot loader program instead.
Remove disk and press any key to reboot . . .

In the older versions of Linux it was possible with:

make zImage

Is it possible to boot without a bootloader in the newer versions of the kernel? If so, how?

1
  • 1
    Off topic, but: just go back to an older version of Linux. – Ernest Friedman-Hill Apr 22 '12 at 11:20
3

If you have an EFI based system, starting with Linux kernel 3.3 the firmware can directly load and execute the kernel.

2
  • How would you set this up? – CMCDragonkai Jul 2 '14 at 7:23
  • I'd say though that the only reason we don't call EFI a "bootloader" is because it is as large as Linux :-) – Ciro Santilli TRUMP BAN IS BAD Jun 18 '20 at 20:31
2

It's not possible. At least, not with the not-so-old kernels unpatched.

You have these options:

  1. use a bootloader.
  2. use an old version of linux.
  3. hack direct booting (ie a built-in bootloader) into the kernel source so it works more-or-less like floppy booting in the old days.
2

If you have a EFI based and configured system, you can compile or get a EFI enabled kernel (https://wiki.archlinux.org/index.php/EFISTUB). You can apply these tips to most if not all more recent distro's. I personally tried a full Linux from scratch build and a basic kernel with Busybox in a initramfs (pretty useless). Arch Linux works like a charm.

Either use a EFI bootloader like Grub or Clover, or make use of the EFISTUB ability of the kernel to directly boot the kernel and pass the kernel commands by use of a efi-variable. Again, Arch's wiki worked like a charm for me.
Note, I disabled Secureboot.

Or, besides various bootloaders that can be put in either the MBR or as an optionrom, you could try look at Coreboot (or libreboot) and make Linux your payload. I consider the EFISTUB option the easiest if your system supports it. You might want to check as well if the system has some kind of bootmenu to switch between OS at boot and to disable the secureboot option.

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.