Is it possible to install the Linux kernel alone?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












41















I'm just curious if it's possible to install the Linux kernel alone, or if you need to use one of the flavours. If it were possible, how would you do it? I don't need a detailed tutorial. I just want to know how it would be done conceptually. I'm not good with low-level stuff, and want to know how you get an OS into the computer. I imagine it has something to do with the MBR.



Oh and I noticed that a lot of the answers suggest a certain distribution of some minimal Linux. I should have probably stated that I am not looking to install a minimal or bare bones Linux. This question is purely theoretical. Still, I really appreciate all the answers, and will refer to them immediately, if ever I would want to install a truly personalized Linux.










share|improve this question



















  • 3





    What do you mean by "alone" and "flavors"? Linux is not an OS it is a kernel, what would a kernel without an OS be good for? Are you trying to figure out the boot loader sequence instead?

    – Caleb
    Jul 21 '11 at 10:24






  • 3





    If you want to understand how a kernel/OS is getting into the computer, here is the place to start. Just make sure not to ask "newbie" questions there, they will bite you, ask them on SO instead.

    – Philomath
    Jul 21 '11 at 10:35






  • 3





    By alone, I mean just the kernel, minus the user interface and included programs like OpenOffice. By 'flavours', I mean the different distributions of linux, like ubuntu, redhat, debian, and mandriva. I have almost no idea of what I'm talking about. I was imagining that the Linux kernel had some basic bash capabilities like DOS. I think I may have my ideas of kernels and operating systems tangled up.

    – cesar
    Jul 21 '11 at 10:47






  • 4





    Yes you are them REALLY tangled up :) Bash is just a user-land program that runs as a process managed by the kernel. A kernel by itself gives you nothing except a platform to run other things on. The suggestion of LFS (Linux From Scratch) in Shadur's answer is right on target. You would learn a lot about what all the different pieces are and what makes a distro a distro and where the kernel ends and user-land begins by building a scratch system.

    – Caleb
    Jul 21 '11 at 10:54







  • 2





    Actually, the DOS kernel didn't have any basic bash capabilities either. The standard user interface was provided by the shell program COMMAND.COM. The closest you could get to a bare kernel doing anything useful would be to boot using the kernel parameter init=/bin/bash (assuming a minimal Linux is on disk). As answered, if you only have the bootloader and the kernel, it will stop very quickly when it doesn't find init.

    – StarNamer
    Jul 27 '12 at 18:41















41















I'm just curious if it's possible to install the Linux kernel alone, or if you need to use one of the flavours. If it were possible, how would you do it? I don't need a detailed tutorial. I just want to know how it would be done conceptually. I'm not good with low-level stuff, and want to know how you get an OS into the computer. I imagine it has something to do with the MBR.



Oh and I noticed that a lot of the answers suggest a certain distribution of some minimal Linux. I should have probably stated that I am not looking to install a minimal or bare bones Linux. This question is purely theoretical. Still, I really appreciate all the answers, and will refer to them immediately, if ever I would want to install a truly personalized Linux.










share|improve this question



















  • 3





    What do you mean by "alone" and "flavors"? Linux is not an OS it is a kernel, what would a kernel without an OS be good for? Are you trying to figure out the boot loader sequence instead?

    – Caleb
    Jul 21 '11 at 10:24






  • 3





    If you want to understand how a kernel/OS is getting into the computer, here is the place to start. Just make sure not to ask "newbie" questions there, they will bite you, ask them on SO instead.

    – Philomath
    Jul 21 '11 at 10:35






  • 3





    By alone, I mean just the kernel, minus the user interface and included programs like OpenOffice. By 'flavours', I mean the different distributions of linux, like ubuntu, redhat, debian, and mandriva. I have almost no idea of what I'm talking about. I was imagining that the Linux kernel had some basic bash capabilities like DOS. I think I may have my ideas of kernels and operating systems tangled up.

    – cesar
    Jul 21 '11 at 10:47






  • 4





    Yes you are them REALLY tangled up :) Bash is just a user-land program that runs as a process managed by the kernel. A kernel by itself gives you nothing except a platform to run other things on. The suggestion of LFS (Linux From Scratch) in Shadur's answer is right on target. You would learn a lot about what all the different pieces are and what makes a distro a distro and where the kernel ends and user-land begins by building a scratch system.

    – Caleb
    Jul 21 '11 at 10:54







  • 2





    Actually, the DOS kernel didn't have any basic bash capabilities either. The standard user interface was provided by the shell program COMMAND.COM. The closest you could get to a bare kernel doing anything useful would be to boot using the kernel parameter init=/bin/bash (assuming a minimal Linux is on disk). As answered, if you only have the bootloader and the kernel, it will stop very quickly when it doesn't find init.

    – StarNamer
    Jul 27 '12 at 18:41













41












41








41


18






I'm just curious if it's possible to install the Linux kernel alone, or if you need to use one of the flavours. If it were possible, how would you do it? I don't need a detailed tutorial. I just want to know how it would be done conceptually. I'm not good with low-level stuff, and want to know how you get an OS into the computer. I imagine it has something to do with the MBR.



Oh and I noticed that a lot of the answers suggest a certain distribution of some minimal Linux. I should have probably stated that I am not looking to install a minimal or bare bones Linux. This question is purely theoretical. Still, I really appreciate all the answers, and will refer to them immediately, if ever I would want to install a truly personalized Linux.










share|improve this question
















I'm just curious if it's possible to install the Linux kernel alone, or if you need to use one of the flavours. If it were possible, how would you do it? I don't need a detailed tutorial. I just want to know how it would be done conceptually. I'm not good with low-level stuff, and want to know how you get an OS into the computer. I imagine it has something to do with the MBR.



Oh and I noticed that a lot of the answers suggest a certain distribution of some minimal Linux. I should have probably stated that I am not looking to install a minimal or bare bones Linux. This question is purely theoretical. Still, I really appreciate all the answers, and will refer to them immediately, if ever I would want to install a truly personalized Linux.







linux-kernel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 3 '16 at 1:23









Jeff Schaller

44.4k1162143




44.4k1162143










asked Jul 21 '11 at 10:20









cesarcesar

314136




314136







  • 3





    What do you mean by "alone" and "flavors"? Linux is not an OS it is a kernel, what would a kernel without an OS be good for? Are you trying to figure out the boot loader sequence instead?

    – Caleb
    Jul 21 '11 at 10:24






  • 3





    If you want to understand how a kernel/OS is getting into the computer, here is the place to start. Just make sure not to ask "newbie" questions there, they will bite you, ask them on SO instead.

    – Philomath
    Jul 21 '11 at 10:35






  • 3





    By alone, I mean just the kernel, minus the user interface and included programs like OpenOffice. By 'flavours', I mean the different distributions of linux, like ubuntu, redhat, debian, and mandriva. I have almost no idea of what I'm talking about. I was imagining that the Linux kernel had some basic bash capabilities like DOS. I think I may have my ideas of kernels and operating systems tangled up.

    – cesar
    Jul 21 '11 at 10:47






  • 4





    Yes you are them REALLY tangled up :) Bash is just a user-land program that runs as a process managed by the kernel. A kernel by itself gives you nothing except a platform to run other things on. The suggestion of LFS (Linux From Scratch) in Shadur's answer is right on target. You would learn a lot about what all the different pieces are and what makes a distro a distro and where the kernel ends and user-land begins by building a scratch system.

    – Caleb
    Jul 21 '11 at 10:54







  • 2





    Actually, the DOS kernel didn't have any basic bash capabilities either. The standard user interface was provided by the shell program COMMAND.COM. The closest you could get to a bare kernel doing anything useful would be to boot using the kernel parameter init=/bin/bash (assuming a minimal Linux is on disk). As answered, if you only have the bootloader and the kernel, it will stop very quickly when it doesn't find init.

    – StarNamer
    Jul 27 '12 at 18:41












  • 3





    What do you mean by "alone" and "flavors"? Linux is not an OS it is a kernel, what would a kernel without an OS be good for? Are you trying to figure out the boot loader sequence instead?

    – Caleb
    Jul 21 '11 at 10:24






  • 3





    If you want to understand how a kernel/OS is getting into the computer, here is the place to start. Just make sure not to ask "newbie" questions there, they will bite you, ask them on SO instead.

    – Philomath
    Jul 21 '11 at 10:35






  • 3





    By alone, I mean just the kernel, minus the user interface and included programs like OpenOffice. By 'flavours', I mean the different distributions of linux, like ubuntu, redhat, debian, and mandriva. I have almost no idea of what I'm talking about. I was imagining that the Linux kernel had some basic bash capabilities like DOS. I think I may have my ideas of kernels and operating systems tangled up.

    – cesar
    Jul 21 '11 at 10:47






  • 4





    Yes you are them REALLY tangled up :) Bash is just a user-land program that runs as a process managed by the kernel. A kernel by itself gives you nothing except a platform to run other things on. The suggestion of LFS (Linux From Scratch) in Shadur's answer is right on target. You would learn a lot about what all the different pieces are and what makes a distro a distro and where the kernel ends and user-land begins by building a scratch system.

    – Caleb
    Jul 21 '11 at 10:54







  • 2





    Actually, the DOS kernel didn't have any basic bash capabilities either. The standard user interface was provided by the shell program COMMAND.COM. The closest you could get to a bare kernel doing anything useful would be to boot using the kernel parameter init=/bin/bash (assuming a minimal Linux is on disk). As answered, if you only have the bootloader and the kernel, it will stop very quickly when it doesn't find init.

    – StarNamer
    Jul 27 '12 at 18:41







3




3





What do you mean by "alone" and "flavors"? Linux is not an OS it is a kernel, what would a kernel without an OS be good for? Are you trying to figure out the boot loader sequence instead?

– Caleb
Jul 21 '11 at 10:24





What do you mean by "alone" and "flavors"? Linux is not an OS it is a kernel, what would a kernel without an OS be good for? Are you trying to figure out the boot loader sequence instead?

– Caleb
Jul 21 '11 at 10:24




3




3





If you want to understand how a kernel/OS is getting into the computer, here is the place to start. Just make sure not to ask "newbie" questions there, they will bite you, ask them on SO instead.

– Philomath
Jul 21 '11 at 10:35





If you want to understand how a kernel/OS is getting into the computer, here is the place to start. Just make sure not to ask "newbie" questions there, they will bite you, ask them on SO instead.

– Philomath
Jul 21 '11 at 10:35




3




3





By alone, I mean just the kernel, minus the user interface and included programs like OpenOffice. By 'flavours', I mean the different distributions of linux, like ubuntu, redhat, debian, and mandriva. I have almost no idea of what I'm talking about. I was imagining that the Linux kernel had some basic bash capabilities like DOS. I think I may have my ideas of kernels and operating systems tangled up.

– cesar
Jul 21 '11 at 10:47





By alone, I mean just the kernel, minus the user interface and included programs like OpenOffice. By 'flavours', I mean the different distributions of linux, like ubuntu, redhat, debian, and mandriva. I have almost no idea of what I'm talking about. I was imagining that the Linux kernel had some basic bash capabilities like DOS. I think I may have my ideas of kernels and operating systems tangled up.

– cesar
Jul 21 '11 at 10:47




4




4





Yes you are them REALLY tangled up :) Bash is just a user-land program that runs as a process managed by the kernel. A kernel by itself gives you nothing except a platform to run other things on. The suggestion of LFS (Linux From Scratch) in Shadur's answer is right on target. You would learn a lot about what all the different pieces are and what makes a distro a distro and where the kernel ends and user-land begins by building a scratch system.

– Caleb
Jul 21 '11 at 10:54






Yes you are them REALLY tangled up :) Bash is just a user-land program that runs as a process managed by the kernel. A kernel by itself gives you nothing except a platform to run other things on. The suggestion of LFS (Linux From Scratch) in Shadur's answer is right on target. You would learn a lot about what all the different pieces are and what makes a distro a distro and where the kernel ends and user-land begins by building a scratch system.

– Caleb
Jul 21 '11 at 10:54





2




2





Actually, the DOS kernel didn't have any basic bash capabilities either. The standard user interface was provided by the shell program COMMAND.COM. The closest you could get to a bare kernel doing anything useful would be to boot using the kernel parameter init=/bin/bash (assuming a minimal Linux is on disk). As answered, if you only have the bootloader and the kernel, it will stop very quickly when it doesn't find init.

– StarNamer
Jul 27 '12 at 18:41





Actually, the DOS kernel didn't have any basic bash capabilities either. The standard user interface was provided by the shell program COMMAND.COM. The closest you could get to a bare kernel doing anything useful would be to boot using the kernel parameter init=/bin/bash (assuming a minimal Linux is on disk). As answered, if you only have the bootloader and the kernel, it will stop very quickly when it doesn't find init.

– StarNamer
Jul 27 '12 at 18:41










7 Answers
7






active

oldest

votes


















49














You can technically install just a bootloader and the kernel alone, but as soon as the kernel boots, it will complain about not being able to start "init", then it will just sit there and you can't do anything with it.



BTW, it is a part of the bootloader that is in the MBR. The kernel sits somewhere on the regular area of a disk. The bootloader is configured to know where that is, so it can load the kernel and execute it.






share|improve this answer

























  • How would you put it into the MBR?

    – cesar
    Jul 22 '11 at 6:07











  • Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

    – Shawn J. Goff
    Jul 22 '11 at 12:26











  • Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

    – Patrick
    Jul 27 '12 at 14:22











  • @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

    – Pratik Singhal
    Nov 2 '14 at 13:34






  • 4





    @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

    – Shawn J. Goff
    Nov 3 '14 at 14:44


















18














I don't think you understand exactly what you're asking, but you might want to take a look at the Linux From Scratch project.






share|improve this answer























  • LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

    – Gilles
    Jul 21 '11 at 15:47



















11














If you are asking if you can just install or upgrade a kernel "over" an existing system without installing a bunch of other programs?



The Linux kernel is a binary file usually named vmlinuz-x.x.x-x-name in the boot directory (which is usually a separate small partition at the beginning of the hard drive) where the x's are a version number. "name" is just a chosen name for the kernel that can be set at compile time, you can use it to identify what type of machine or architecture the kernel is for or any other reason.



It's loaded at boottime by a bootloader, typically GRUB which is invoked by boot code in the MBR which is invoked by the BIOS ROM. Once it's loaded it's not "held open" or protected specially. So you can replace that file with another working kernel. But, GRUB has a cool feature which lets you select multiple kernels to boot from. So it's pretty smart to add your additional kernel to that list, but keep the original known working kernel just in case things go wrong.



Almost all distributions I believe make a "modular" kernel where device drivers are in separate files. So most kernels need a filesystem containing drivers available to it at boot time and that is what an "initrd" (initial RAM disk) or "initramfs" is for. GRUB will load the kernel at a location in memory, and the initrd at a different location, and jump to the kernel telling it where the initrd is, starting Linux.



Drivers can also be "built into" the kernel and are therefore automatically loaded and available when the bootloader loads the vmlinuz image. Kernels that are meant to work on diverse systems (such as those of most distributions) usually minimize what is built into the kernel because available hardware will be scanned later in the boot process and only modules representing present hardware will be loaded.



There are tools to modify and create initrds. Debian has nice tools and I imagine other distributions do as well.



So, if you download a more recent kernel from kernel.org and compile it to create a new kernel binary image, you need to make or update an initrd with drivers that work with that kernel. The old initrd won't work because drivers have to match up with the version of the kernel that is running.



The initrd file is named initrd.img-x.x.x.x-name similarly to the kernel, and can be replaced after boot just like the kernel, and best practice would indicate you don't delete a known working initrd until you know you can boot into your new kernel+initrd successfully.



I hope that provides some context.



If you are looking for a "barebones" Linux install that has little to no additional programs installed with it, my favorite choice has always been installing the Debian netinst image. Pretty much you have only the most basic tools needed to run a command line text console and nano as a text editor.






share|improve this answer






























    3














    I would like to second Shadur's suggestion you should make your hands dirty the Linux From Scratch way.

    Also, something similar, try Pocket Linux.




    The Pocket Linux Guide demonstrates how to build a small console-based GNU/Linux system using only source code and a couple of diskettes. It is intended for Linux users who would like to gain a deeper understanding about how their system works beneath the shroud of distribution specific features and tools.







    share|improve this answer




















    • 2





      Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

      – Shadur
      Jul 21 '11 at 14:30


















    3














    It is possible to install a Linux kernel without the usual user-space tools. This is commonly done in embedded systems such as routers. Typically, the kernel is loaded from ROM or Flash memory, and has been customised for the device in question (usually with required drivers compiled into the kernel rather than being loaded as modules).



    At least one user-space program needs to exist, to become the 'init' process (not necessarily called init, but started by the kernel as process 1, and the automatic parent of any orphaned processes) - unless the kernel has been modified (rather than simply customised) to not require this.



    It's certainly not necessary to have a shell available to have a working Linux-based device, although it can make development much easier!






    share|improve this answer






























      3














      Single executable rootfs



      The absolute minimum system runs a single /init program as I've explained at Single Application Linux | Super User





      Minimal Linux Live



      https://github.com/ivandavidov/minimal



      For a more interesting interactive system, this is a (mostly educational) small script that:



      • downloads the source for the kernel and busybox

      • compiles them

      • generates a bootable 8Mb ISO with them

      The ISO then leaves you in a minimal shell with busybox.



      With QEMU you can easily boot into the system.



      I have modified it to allow running it from the kernel source directory: https://github.com/cirosantilli/runlinux



      Usage:



      git clone https://github.com/ivandavidov/minimal
      cd minimal/src
      ./build_minimal_linux_live.sh
      # Wait.
      # Install QEMU.
      # minimal_linux_live.iso was generated
      ./qemu64.sh


      and you will be left inside a QEMU Window with you new minimal system. Awesome.



      Since it is small, this is a good option to read the source and understand what is going on.



      Tested on Ubuntu 16.04.



      Buildroot



      https://buildroot.org/



      Large set of Makefile scripts that manage:



      • GCC cross compilation toolchain

      • kernel compilation

      • bootloader compilation

      • generation of rootfs

      • has tons of package download / build recipes in the source tree, including complex stuff like GTK. There is a dependency system.

      Minimal example:



      git clone git://git.buildroot.net/buildroot
      cd buildroot
      git checkout 2016.05
      make qemu_x86_defconfig
      # Can't use -jN, use `BR2_JLEVEL=2` instead.
      BR2_JLEVEL=2 make
      # Wait.
      # cat board/qemu/x86_64/readme.txt
      qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
      # You are now in a shell with BusyBox utilities.


      It even has recipes for building X11 from scratch: How to install X11 on my own Linux Buildroot system?



      Professional stuff.



      Alpine Linux



      https://github.com/gliderlabs/docker-alpine



      Embedded distribution with a package manager that offers precompiled binaries from a website.



      See also



      • Linux distro with just busybox and bash

      • Load Linux bzImage in QEMU?

      • What are the minimum root filesystem applications that are required to fully boot linux?





      share|improve this answer
































        2














        Many distros provide "core" installs. This is what you want.
        See ubuntu-minimal, debian net-install, archlinux (default is just core).



        The other answers are useful if you want to learn, but that might not be the case =p






        share|improve this answer























          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f17122%2fis-it-possible-to-install-the-linux-kernel-alone%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          49














          You can technically install just a bootloader and the kernel alone, but as soon as the kernel boots, it will complain about not being able to start "init", then it will just sit there and you can't do anything with it.



          BTW, it is a part of the bootloader that is in the MBR. The kernel sits somewhere on the regular area of a disk. The bootloader is configured to know where that is, so it can load the kernel and execute it.






          share|improve this answer

























          • How would you put it into the MBR?

            – cesar
            Jul 22 '11 at 6:07











          • Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

            – Shawn J. Goff
            Jul 22 '11 at 12:26











          • Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

            – Patrick
            Jul 27 '12 at 14:22











          • @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

            – Pratik Singhal
            Nov 2 '14 at 13:34






          • 4





            @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

            – Shawn J. Goff
            Nov 3 '14 at 14:44















          49














          You can technically install just a bootloader and the kernel alone, but as soon as the kernel boots, it will complain about not being able to start "init", then it will just sit there and you can't do anything with it.



          BTW, it is a part of the bootloader that is in the MBR. The kernel sits somewhere on the regular area of a disk. The bootloader is configured to know where that is, so it can load the kernel and execute it.






          share|improve this answer

























          • How would you put it into the MBR?

            – cesar
            Jul 22 '11 at 6:07











          • Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

            – Shawn J. Goff
            Jul 22 '11 at 12:26











          • Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

            – Patrick
            Jul 27 '12 at 14:22











          • @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

            – Pratik Singhal
            Nov 2 '14 at 13:34






          • 4





            @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

            – Shawn J. Goff
            Nov 3 '14 at 14:44













          49












          49








          49







          You can technically install just a bootloader and the kernel alone, but as soon as the kernel boots, it will complain about not being able to start "init", then it will just sit there and you can't do anything with it.



          BTW, it is a part of the bootloader that is in the MBR. The kernel sits somewhere on the regular area of a disk. The bootloader is configured to know where that is, so it can load the kernel and execute it.






          share|improve this answer















          You can technically install just a bootloader and the kernel alone, but as soon as the kernel boots, it will complain about not being able to start "init", then it will just sit there and you can't do anything with it.



          BTW, it is a part of the bootloader that is in the MBR. The kernel sits somewhere on the regular area of a disk. The bootloader is configured to know where that is, so it can load the kernel and execute it.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 21 '11 at 12:21

























          answered Jul 21 '11 at 11:41









          Shawn J. GoffShawn J. Goff

          30.2k19112134




          30.2k19112134












          • How would you put it into the MBR?

            – cesar
            Jul 22 '11 at 6:07











          • Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

            – Shawn J. Goff
            Jul 22 '11 at 12:26











          • Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

            – Patrick
            Jul 27 '12 at 14:22











          • @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

            – Pratik Singhal
            Nov 2 '14 at 13:34






          • 4





            @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

            – Shawn J. Goff
            Nov 3 '14 at 14:44

















          • How would you put it into the MBR?

            – cesar
            Jul 22 '11 at 6:07











          • Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

            – Shawn J. Goff
            Jul 22 '11 at 12:26











          • Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

            – Patrick
            Jul 27 '12 at 14:22











          • @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

            – Pratik Singhal
            Nov 2 '14 at 13:34






          • 4





            @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

            – Shawn J. Goff
            Nov 3 '14 at 14:44
















          How would you put it into the MBR?

          – cesar
          Jul 22 '11 at 6:07





          How would you put it into the MBR?

          – cesar
          Jul 22 '11 at 6:07













          Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

          – Shawn J. Goff
          Jul 22 '11 at 12:26





          Every bootloader comes with a tool for installing itself into the MBR. There are also friendlier tools like Boot-Repair (help.ubuntu.com/community/Boot-Repair).

          – Shawn J. Goff
          Jul 22 '11 at 12:26













          Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

          – Patrick
          Jul 27 '12 at 14:22





          Well you could create an initramfs and embed it into the kernel image, and then you'd have a fully working system from just a kernel image file :-)

          – Patrick
          Jul 27 '12 at 14:22













          @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

          – Pratik Singhal
          Nov 2 '14 at 13:34





          @ShawnJ.Goff Why would the kernel complain of not being able to start init, if we provide the initramfs ?

          – Pratik Singhal
          Nov 2 '14 at 13:34




          4




          4





          @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

          – Shawn J. Goff
          Nov 3 '14 at 14:44





          @ps06756 If you have the initramfs, that is not the kernel "alone" as the question asked. If the initramfs has an init, the kernel will not complain.

          – Shawn J. Goff
          Nov 3 '14 at 14:44













          18














          I don't think you understand exactly what you're asking, but you might want to take a look at the Linux From Scratch project.






          share|improve this answer























          • LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

            – Gilles
            Jul 21 '11 at 15:47
















          18














          I don't think you understand exactly what you're asking, but you might want to take a look at the Linux From Scratch project.






          share|improve this answer























          • LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

            – Gilles
            Jul 21 '11 at 15:47














          18












          18








          18







          I don't think you understand exactly what you're asking, but you might want to take a look at the Linux From Scratch project.






          share|improve this answer













          I don't think you understand exactly what you're asking, but you might want to take a look at the Linux From Scratch project.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 21 '11 at 10:28









          ShadurShadur

          20.1k84658




          20.1k84658












          • LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

            – Gilles
            Jul 21 '11 at 15:47


















          • LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

            – Gilles
            Jul 21 '11 at 15:47

















          LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

          – Gilles
          Jul 21 '11 at 15:47






          LFS would be a good idea to figure out how to build a minimum system. Or you could look at MINIX (and read the book). Or, for a different introduction (less work, but less informative), look at the packages tagged “essential” (aptitude search '?essential') on Debian or Ubuntu and understand what each does (there's a bit more than the bare minimum).

          – Gilles
          Jul 21 '11 at 15:47












          11














          If you are asking if you can just install or upgrade a kernel "over" an existing system without installing a bunch of other programs?



          The Linux kernel is a binary file usually named vmlinuz-x.x.x-x-name in the boot directory (which is usually a separate small partition at the beginning of the hard drive) where the x's are a version number. "name" is just a chosen name for the kernel that can be set at compile time, you can use it to identify what type of machine or architecture the kernel is for or any other reason.



          It's loaded at boottime by a bootloader, typically GRUB which is invoked by boot code in the MBR which is invoked by the BIOS ROM. Once it's loaded it's not "held open" or protected specially. So you can replace that file with another working kernel. But, GRUB has a cool feature which lets you select multiple kernels to boot from. So it's pretty smart to add your additional kernel to that list, but keep the original known working kernel just in case things go wrong.



          Almost all distributions I believe make a "modular" kernel where device drivers are in separate files. So most kernels need a filesystem containing drivers available to it at boot time and that is what an "initrd" (initial RAM disk) or "initramfs" is for. GRUB will load the kernel at a location in memory, and the initrd at a different location, and jump to the kernel telling it where the initrd is, starting Linux.



          Drivers can also be "built into" the kernel and are therefore automatically loaded and available when the bootloader loads the vmlinuz image. Kernels that are meant to work on diverse systems (such as those of most distributions) usually minimize what is built into the kernel because available hardware will be scanned later in the boot process and only modules representing present hardware will be loaded.



          There are tools to modify and create initrds. Debian has nice tools and I imagine other distributions do as well.



          So, if you download a more recent kernel from kernel.org and compile it to create a new kernel binary image, you need to make or update an initrd with drivers that work with that kernel. The old initrd won't work because drivers have to match up with the version of the kernel that is running.



          The initrd file is named initrd.img-x.x.x.x-name similarly to the kernel, and can be replaced after boot just like the kernel, and best practice would indicate you don't delete a known working initrd until you know you can boot into your new kernel+initrd successfully.



          I hope that provides some context.



          If you are looking for a "barebones" Linux install that has little to no additional programs installed with it, my favorite choice has always been installing the Debian netinst image. Pretty much you have only the most basic tools needed to run a command line text console and nano as a text editor.






          share|improve this answer



























            11














            If you are asking if you can just install or upgrade a kernel "over" an existing system without installing a bunch of other programs?



            The Linux kernel is a binary file usually named vmlinuz-x.x.x-x-name in the boot directory (which is usually a separate small partition at the beginning of the hard drive) where the x's are a version number. "name" is just a chosen name for the kernel that can be set at compile time, you can use it to identify what type of machine or architecture the kernel is for or any other reason.



            It's loaded at boottime by a bootloader, typically GRUB which is invoked by boot code in the MBR which is invoked by the BIOS ROM. Once it's loaded it's not "held open" or protected specially. So you can replace that file with another working kernel. But, GRUB has a cool feature which lets you select multiple kernels to boot from. So it's pretty smart to add your additional kernel to that list, but keep the original known working kernel just in case things go wrong.



            Almost all distributions I believe make a "modular" kernel where device drivers are in separate files. So most kernels need a filesystem containing drivers available to it at boot time and that is what an "initrd" (initial RAM disk) or "initramfs" is for. GRUB will load the kernel at a location in memory, and the initrd at a different location, and jump to the kernel telling it where the initrd is, starting Linux.



            Drivers can also be "built into" the kernel and are therefore automatically loaded and available when the bootloader loads the vmlinuz image. Kernels that are meant to work on diverse systems (such as those of most distributions) usually minimize what is built into the kernel because available hardware will be scanned later in the boot process and only modules representing present hardware will be loaded.



            There are tools to modify and create initrds. Debian has nice tools and I imagine other distributions do as well.



            So, if you download a more recent kernel from kernel.org and compile it to create a new kernel binary image, you need to make or update an initrd with drivers that work with that kernel. The old initrd won't work because drivers have to match up with the version of the kernel that is running.



            The initrd file is named initrd.img-x.x.x.x-name similarly to the kernel, and can be replaced after boot just like the kernel, and best practice would indicate you don't delete a known working initrd until you know you can boot into your new kernel+initrd successfully.



            I hope that provides some context.



            If you are looking for a "barebones" Linux install that has little to no additional programs installed with it, my favorite choice has always been installing the Debian netinst image. Pretty much you have only the most basic tools needed to run a command line text console and nano as a text editor.






            share|improve this answer

























              11












              11








              11







              If you are asking if you can just install or upgrade a kernel "over" an existing system without installing a bunch of other programs?



              The Linux kernel is a binary file usually named vmlinuz-x.x.x-x-name in the boot directory (which is usually a separate small partition at the beginning of the hard drive) where the x's are a version number. "name" is just a chosen name for the kernel that can be set at compile time, you can use it to identify what type of machine or architecture the kernel is for or any other reason.



              It's loaded at boottime by a bootloader, typically GRUB which is invoked by boot code in the MBR which is invoked by the BIOS ROM. Once it's loaded it's not "held open" or protected specially. So you can replace that file with another working kernel. But, GRUB has a cool feature which lets you select multiple kernels to boot from. So it's pretty smart to add your additional kernel to that list, but keep the original known working kernel just in case things go wrong.



              Almost all distributions I believe make a "modular" kernel where device drivers are in separate files. So most kernels need a filesystem containing drivers available to it at boot time and that is what an "initrd" (initial RAM disk) or "initramfs" is for. GRUB will load the kernel at a location in memory, and the initrd at a different location, and jump to the kernel telling it where the initrd is, starting Linux.



              Drivers can also be "built into" the kernel and are therefore automatically loaded and available when the bootloader loads the vmlinuz image. Kernels that are meant to work on diverse systems (such as those of most distributions) usually minimize what is built into the kernel because available hardware will be scanned later in the boot process and only modules representing present hardware will be loaded.



              There are tools to modify and create initrds. Debian has nice tools and I imagine other distributions do as well.



              So, if you download a more recent kernel from kernel.org and compile it to create a new kernel binary image, you need to make or update an initrd with drivers that work with that kernel. The old initrd won't work because drivers have to match up with the version of the kernel that is running.



              The initrd file is named initrd.img-x.x.x.x-name similarly to the kernel, and can be replaced after boot just like the kernel, and best practice would indicate you don't delete a known working initrd until you know you can boot into your new kernel+initrd successfully.



              I hope that provides some context.



              If you are looking for a "barebones" Linux install that has little to no additional programs installed with it, my favorite choice has always been installing the Debian netinst image. Pretty much you have only the most basic tools needed to run a command line text console and nano as a text editor.






              share|improve this answer













              If you are asking if you can just install or upgrade a kernel "over" an existing system without installing a bunch of other programs?



              The Linux kernel is a binary file usually named vmlinuz-x.x.x-x-name in the boot directory (which is usually a separate small partition at the beginning of the hard drive) where the x's are a version number. "name" is just a chosen name for the kernel that can be set at compile time, you can use it to identify what type of machine or architecture the kernel is for or any other reason.



              It's loaded at boottime by a bootloader, typically GRUB which is invoked by boot code in the MBR which is invoked by the BIOS ROM. Once it's loaded it's not "held open" or protected specially. So you can replace that file with another working kernel. But, GRUB has a cool feature which lets you select multiple kernels to boot from. So it's pretty smart to add your additional kernel to that list, but keep the original known working kernel just in case things go wrong.



              Almost all distributions I believe make a "modular" kernel where device drivers are in separate files. So most kernels need a filesystem containing drivers available to it at boot time and that is what an "initrd" (initial RAM disk) or "initramfs" is for. GRUB will load the kernel at a location in memory, and the initrd at a different location, and jump to the kernel telling it where the initrd is, starting Linux.



              Drivers can also be "built into" the kernel and are therefore automatically loaded and available when the bootloader loads the vmlinuz image. Kernels that are meant to work on diverse systems (such as those of most distributions) usually minimize what is built into the kernel because available hardware will be scanned later in the boot process and only modules representing present hardware will be loaded.



              There are tools to modify and create initrds. Debian has nice tools and I imagine other distributions do as well.



              So, if you download a more recent kernel from kernel.org and compile it to create a new kernel binary image, you need to make or update an initrd with drivers that work with that kernel. The old initrd won't work because drivers have to match up with the version of the kernel that is running.



              The initrd file is named initrd.img-x.x.x.x-name similarly to the kernel, and can be replaced after boot just like the kernel, and best practice would indicate you don't delete a known working initrd until you know you can boot into your new kernel+initrd successfully.



              I hope that provides some context.



              If you are looking for a "barebones" Linux install that has little to no additional programs installed with it, my favorite choice has always been installing the Debian netinst image. Pretty much you have only the most basic tools needed to run a command line text console and nano as a text editor.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 21 '11 at 16:10









              LawrenceCLawrenceC

              8,68722440




              8,68722440





















                  3














                  I would like to second Shadur's suggestion you should make your hands dirty the Linux From Scratch way.

                  Also, something similar, try Pocket Linux.




                  The Pocket Linux Guide demonstrates how to build a small console-based GNU/Linux system using only source code and a couple of diskettes. It is intended for Linux users who would like to gain a deeper understanding about how their system works beneath the shroud of distribution specific features and tools.







                  share|improve this answer




















                  • 2





                    Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

                    – Shadur
                    Jul 21 '11 at 14:30















                  3














                  I would like to second Shadur's suggestion you should make your hands dirty the Linux From Scratch way.

                  Also, something similar, try Pocket Linux.




                  The Pocket Linux Guide demonstrates how to build a small console-based GNU/Linux system using only source code and a couple of diskettes. It is intended for Linux users who would like to gain a deeper understanding about how their system works beneath the shroud of distribution specific features and tools.







                  share|improve this answer




















                  • 2





                    Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

                    – Shadur
                    Jul 21 '11 at 14:30













                  3












                  3








                  3







                  I would like to second Shadur's suggestion you should make your hands dirty the Linux From Scratch way.

                  Also, something similar, try Pocket Linux.




                  The Pocket Linux Guide demonstrates how to build a small console-based GNU/Linux system using only source code and a couple of diskettes. It is intended for Linux users who would like to gain a deeper understanding about how their system works beneath the shroud of distribution specific features and tools.







                  share|improve this answer















                  I would like to second Shadur's suggestion you should make your hands dirty the Linux From Scratch way.

                  Also, something similar, try Pocket Linux.




                  The Pocket Linux Guide demonstrates how to build a small console-based GNU/Linux system using only source code and a couple of diskettes. It is intended for Linux users who would like to gain a deeper understanding about how their system works beneath the shroud of distribution specific features and tools.








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 13 '17 at 12:36









                  Community

                  1




                  1










                  answered Jul 21 '11 at 13:03









                  PhilomathPhilomath

                  2,16211520




                  2,16211520







                  • 2





                    Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

                    – Shadur
                    Jul 21 '11 at 14:30












                  • 2





                    Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

                    – Shadur
                    Jul 21 '11 at 14:30







                  2




                  2





                  Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

                  – Shadur
                  Jul 21 '11 at 14:30





                  Although note that no one in their right mind recommends /either/ LFS or PocketLinux for any kind of important production task -- they're good for learning how stuff works, but there's a reason most distributions come with a full set of tools and frontends for most stuff.

                  – Shadur
                  Jul 21 '11 at 14:30











                  3














                  It is possible to install a Linux kernel without the usual user-space tools. This is commonly done in embedded systems such as routers. Typically, the kernel is loaded from ROM or Flash memory, and has been customised for the device in question (usually with required drivers compiled into the kernel rather than being loaded as modules).



                  At least one user-space program needs to exist, to become the 'init' process (not necessarily called init, but started by the kernel as process 1, and the automatic parent of any orphaned processes) - unless the kernel has been modified (rather than simply customised) to not require this.



                  It's certainly not necessary to have a shell available to have a working Linux-based device, although it can make development much easier!






                  share|improve this answer



























                    3














                    It is possible to install a Linux kernel without the usual user-space tools. This is commonly done in embedded systems such as routers. Typically, the kernel is loaded from ROM or Flash memory, and has been customised for the device in question (usually with required drivers compiled into the kernel rather than being loaded as modules).



                    At least one user-space program needs to exist, to become the 'init' process (not necessarily called init, but started by the kernel as process 1, and the automatic parent of any orphaned processes) - unless the kernel has been modified (rather than simply customised) to not require this.



                    It's certainly not necessary to have a shell available to have a working Linux-based device, although it can make development much easier!






                    share|improve this answer

























                      3












                      3








                      3







                      It is possible to install a Linux kernel without the usual user-space tools. This is commonly done in embedded systems such as routers. Typically, the kernel is loaded from ROM or Flash memory, and has been customised for the device in question (usually with required drivers compiled into the kernel rather than being loaded as modules).



                      At least one user-space program needs to exist, to become the 'init' process (not necessarily called init, but started by the kernel as process 1, and the automatic parent of any orphaned processes) - unless the kernel has been modified (rather than simply customised) to not require this.



                      It's certainly not necessary to have a shell available to have a working Linux-based device, although it can make development much easier!






                      share|improve this answer













                      It is possible to install a Linux kernel without the usual user-space tools. This is commonly done in embedded systems such as routers. Typically, the kernel is loaded from ROM or Flash memory, and has been customised for the device in question (usually with required drivers compiled into the kernel rather than being loaded as modules).



                      At least one user-space program needs to exist, to become the 'init' process (not necessarily called init, but started by the kernel as process 1, and the automatic parent of any orphaned processes) - unless the kernel has been modified (rather than simply customised) to not require this.



                      It's certainly not necessary to have a shell available to have a working Linux-based device, although it can make development much easier!







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 5 '15 at 15:25









                      Toby SpeightToby Speight

                      5,55711134




                      5,55711134





















                          3














                          Single executable rootfs



                          The absolute minimum system runs a single /init program as I've explained at Single Application Linux | Super User





                          Minimal Linux Live



                          https://github.com/ivandavidov/minimal



                          For a more interesting interactive system, this is a (mostly educational) small script that:



                          • downloads the source for the kernel and busybox

                          • compiles them

                          • generates a bootable 8Mb ISO with them

                          The ISO then leaves you in a minimal shell with busybox.



                          With QEMU you can easily boot into the system.



                          I have modified it to allow running it from the kernel source directory: https://github.com/cirosantilli/runlinux



                          Usage:



                          git clone https://github.com/ivandavidov/minimal
                          cd minimal/src
                          ./build_minimal_linux_live.sh
                          # Wait.
                          # Install QEMU.
                          # minimal_linux_live.iso was generated
                          ./qemu64.sh


                          and you will be left inside a QEMU Window with you new minimal system. Awesome.



                          Since it is small, this is a good option to read the source and understand what is going on.



                          Tested on Ubuntu 16.04.



                          Buildroot



                          https://buildroot.org/



                          Large set of Makefile scripts that manage:



                          • GCC cross compilation toolchain

                          • kernel compilation

                          • bootloader compilation

                          • generation of rootfs

                          • has tons of package download / build recipes in the source tree, including complex stuff like GTK. There is a dependency system.

                          Minimal example:



                          git clone git://git.buildroot.net/buildroot
                          cd buildroot
                          git checkout 2016.05
                          make qemu_x86_defconfig
                          # Can't use -jN, use `BR2_JLEVEL=2` instead.
                          BR2_JLEVEL=2 make
                          # Wait.
                          # cat board/qemu/x86_64/readme.txt
                          qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
                          # You are now in a shell with BusyBox utilities.


                          It even has recipes for building X11 from scratch: How to install X11 on my own Linux Buildroot system?



                          Professional stuff.



                          Alpine Linux



                          https://github.com/gliderlabs/docker-alpine



                          Embedded distribution with a package manager that offers precompiled binaries from a website.



                          See also



                          • Linux distro with just busybox and bash

                          • Load Linux bzImage in QEMU?

                          • What are the minimum root filesystem applications that are required to fully boot linux?





                          share|improve this answer





























                            3














                            Single executable rootfs



                            The absolute minimum system runs a single /init program as I've explained at Single Application Linux | Super User





                            Minimal Linux Live



                            https://github.com/ivandavidov/minimal



                            For a more interesting interactive system, this is a (mostly educational) small script that:



                            • downloads the source for the kernel and busybox

                            • compiles them

                            • generates a bootable 8Mb ISO with them

                            The ISO then leaves you in a minimal shell with busybox.



                            With QEMU you can easily boot into the system.



                            I have modified it to allow running it from the kernel source directory: https://github.com/cirosantilli/runlinux



                            Usage:



                            git clone https://github.com/ivandavidov/minimal
                            cd minimal/src
                            ./build_minimal_linux_live.sh
                            # Wait.
                            # Install QEMU.
                            # minimal_linux_live.iso was generated
                            ./qemu64.sh


                            and you will be left inside a QEMU Window with you new minimal system. Awesome.



                            Since it is small, this is a good option to read the source and understand what is going on.



                            Tested on Ubuntu 16.04.



                            Buildroot



                            https://buildroot.org/



                            Large set of Makefile scripts that manage:



                            • GCC cross compilation toolchain

                            • kernel compilation

                            • bootloader compilation

                            • generation of rootfs

                            • has tons of package download / build recipes in the source tree, including complex stuff like GTK. There is a dependency system.

                            Minimal example:



                            git clone git://git.buildroot.net/buildroot
                            cd buildroot
                            git checkout 2016.05
                            make qemu_x86_defconfig
                            # Can't use -jN, use `BR2_JLEVEL=2` instead.
                            BR2_JLEVEL=2 make
                            # Wait.
                            # cat board/qemu/x86_64/readme.txt
                            qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
                            # You are now in a shell with BusyBox utilities.


                            It even has recipes for building X11 from scratch: How to install X11 on my own Linux Buildroot system?



                            Professional stuff.



                            Alpine Linux



                            https://github.com/gliderlabs/docker-alpine



                            Embedded distribution with a package manager that offers precompiled binaries from a website.



                            See also



                            • Linux distro with just busybox and bash

                            • Load Linux bzImage in QEMU?

                            • What are the minimum root filesystem applications that are required to fully boot linux?





                            share|improve this answer



























                              3












                              3








                              3







                              Single executable rootfs



                              The absolute minimum system runs a single /init program as I've explained at Single Application Linux | Super User





                              Minimal Linux Live



                              https://github.com/ivandavidov/minimal



                              For a more interesting interactive system, this is a (mostly educational) small script that:



                              • downloads the source for the kernel and busybox

                              • compiles them

                              • generates a bootable 8Mb ISO with them

                              The ISO then leaves you in a minimal shell with busybox.



                              With QEMU you can easily boot into the system.



                              I have modified it to allow running it from the kernel source directory: https://github.com/cirosantilli/runlinux



                              Usage:



                              git clone https://github.com/ivandavidov/minimal
                              cd minimal/src
                              ./build_minimal_linux_live.sh
                              # Wait.
                              # Install QEMU.
                              # minimal_linux_live.iso was generated
                              ./qemu64.sh


                              and you will be left inside a QEMU Window with you new minimal system. Awesome.



                              Since it is small, this is a good option to read the source and understand what is going on.



                              Tested on Ubuntu 16.04.



                              Buildroot



                              https://buildroot.org/



                              Large set of Makefile scripts that manage:



                              • GCC cross compilation toolchain

                              • kernel compilation

                              • bootloader compilation

                              • generation of rootfs

                              • has tons of package download / build recipes in the source tree, including complex stuff like GTK. There is a dependency system.

                              Minimal example:



                              git clone git://git.buildroot.net/buildroot
                              cd buildroot
                              git checkout 2016.05
                              make qemu_x86_defconfig
                              # Can't use -jN, use `BR2_JLEVEL=2` instead.
                              BR2_JLEVEL=2 make
                              # Wait.
                              # cat board/qemu/x86_64/readme.txt
                              qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
                              # You are now in a shell with BusyBox utilities.


                              It even has recipes for building X11 from scratch: How to install X11 on my own Linux Buildroot system?



                              Professional stuff.



                              Alpine Linux



                              https://github.com/gliderlabs/docker-alpine



                              Embedded distribution with a package manager that offers precompiled binaries from a website.



                              See also



                              • Linux distro with just busybox and bash

                              • Load Linux bzImage in QEMU?

                              • What are the minimum root filesystem applications that are required to fully boot linux?





                              share|improve this answer















                              Single executable rootfs



                              The absolute minimum system runs a single /init program as I've explained at Single Application Linux | Super User





                              Minimal Linux Live



                              https://github.com/ivandavidov/minimal



                              For a more interesting interactive system, this is a (mostly educational) small script that:



                              • downloads the source for the kernel and busybox

                              • compiles them

                              • generates a bootable 8Mb ISO with them

                              The ISO then leaves you in a minimal shell with busybox.



                              With QEMU you can easily boot into the system.



                              I have modified it to allow running it from the kernel source directory: https://github.com/cirosantilli/runlinux



                              Usage:



                              git clone https://github.com/ivandavidov/minimal
                              cd minimal/src
                              ./build_minimal_linux_live.sh
                              # Wait.
                              # Install QEMU.
                              # minimal_linux_live.iso was generated
                              ./qemu64.sh


                              and you will be left inside a QEMU Window with you new minimal system. Awesome.



                              Since it is small, this is a good option to read the source and understand what is going on.



                              Tested on Ubuntu 16.04.



                              Buildroot



                              https://buildroot.org/



                              Large set of Makefile scripts that manage:



                              • GCC cross compilation toolchain

                              • kernel compilation

                              • bootloader compilation

                              • generation of rootfs

                              • has tons of package download / build recipes in the source tree, including complex stuff like GTK. There is a dependency system.

                              Minimal example:



                              git clone git://git.buildroot.net/buildroot
                              cd buildroot
                              git checkout 2016.05
                              make qemu_x86_defconfig
                              # Can't use -jN, use `BR2_JLEVEL=2` instead.
                              BR2_JLEVEL=2 make
                              # Wait.
                              # cat board/qemu/x86_64/readme.txt
                              qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
                              # You are now in a shell with BusyBox utilities.


                              It even has recipes for building X11 from scratch: How to install X11 on my own Linux Buildroot system?



                              Professional stuff.



                              Alpine Linux



                              https://github.com/gliderlabs/docker-alpine



                              Embedded distribution with a package manager that offers precompiled binaries from a website.



                              See also



                              • Linux distro with just busybox and bash

                              • Load Linux bzImage in QEMU?

                              • What are the minimum root filesystem applications that are required to fully boot linux?






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Apr 16 '18 at 6:54









                              Drakonoved

                              7031723




                              7031723










                              answered May 5 '15 at 14:03









                              Ciro Santilli 新疆改造中心 六四事件 法轮功Ciro Santilli 新疆改造中心 六四事件 法轮功

                              5,38024644




                              5,38024644





















                                  2














                                  Many distros provide "core" installs. This is what you want.
                                  See ubuntu-minimal, debian net-install, archlinux (default is just core).



                                  The other answers are useful if you want to learn, but that might not be the case =p






                                  share|improve this answer



























                                    2














                                    Many distros provide "core" installs. This is what you want.
                                    See ubuntu-minimal, debian net-install, archlinux (default is just core).



                                    The other answers are useful if you want to learn, but that might not be the case =p






                                    share|improve this answer

























                                      2












                                      2








                                      2







                                      Many distros provide "core" installs. This is what you want.
                                      See ubuntu-minimal, debian net-install, archlinux (default is just core).



                                      The other answers are useful if you want to learn, but that might not be the case =p






                                      share|improve this answer













                                      Many distros provide "core" installs. This is what you want.
                                      See ubuntu-minimal, debian net-install, archlinux (default is just core).



                                      The other answers are useful if you want to learn, but that might not be the case =p







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jul 21 '11 at 13:47









                                      user606723user606723

                                      6811413




                                      6811413



























                                          draft saved

                                          draft discarded
















































                                          Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid


                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.

                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f17122%2fis-it-possible-to-install-the-linux-kernel-alone%23new-answer', 'question_page');

                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown






                                          Popular posts from this blog

                                          How to check contact read email or not when send email to Individual?

                                          Bahrain

                                          Postfix configuration issue with fips on centos 7; mailgun relay