Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to boot the Linux kernel alone and run busybox, not including a GUI.

How can I do that? How can I make a custom bzImage, initrd.img and how can I change the file structures in that images?

share|improve this question

migrated from Jul 24 '11 at 9:25

This question came from our site for professional and enthusiast programmers.

alone is alone. with busybox it is not alone. – soubunmei May 11 '15 at 15:24

This might help you: You can customize as per you want.

share|improve this answer

Two things you need to do:

  1. Build a custom kernel and an initrd image
  2. Make a bootable USB containing the above

For the first part, you are best using the "genkernel" tool. You can probably achieve what you want by issuing genkernel --menuconfig all. This will allow you to first configure the kernel, then build it together with modules (if any) and a ramdisk image (initrd/initramfs).

However, if you have never built a custom kernel, bear in mind that kernel configuration is not an easy task. You're best staying with as many defaults as you can.

After that step, you'll find your kernel image and initramfs under /boot/ - they will be named something like kernel-genkernel-<something_including_your_kernel_version> and initramfs-genkernel-<the_same_ending>.

Once you have that, you can go for building your custom bootable USB stick containing the files. To do that, I'd recommend following the Gentoo Linux documentation, replacing emerge with the appropriate package manager command for your distribution.

share|improve this answer

You must log in to answer this question.