LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to install Linux Kernel on a bare machine? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-install-linux-kernel-on-a-bare-machine-4175432546/)

amitkpa 10-16-2012 01:01 PM

Is it possible to install Linux Kernel on a bare machine?
 
Hi,

Actually, I just bought a new laptop which has DOS support only.
Now I can install any Windows distribution or any other Linux distributions using DVDs or live CDs.

What, I just want to know that without installing any other Linux distribution, is it possible to install the Linux kernel onto my Laptop.

Means Is it possible to just download the latest Vanila-Kernel from http://www.kernel.org/ and install the same using some bootloader.

Elv13 10-16-2012 01:11 PM

Hi, welcome to LQ

Yes, but it would be useless. Linux is less than DOS. You will not have the real command prompt, only the basic kernel one, used for debugging purposes. You wont be able to do anything useful at all. You also need to compile it first. It is like having an engine without a car, don't expect to drive anywhere with it. Just like an engine, it will start* , "do something", but alone, it won't be enough. But it is nice to try, just for fun. It is very educational.

*(given there is gas inside the engine and ignition power, just like the computer have to be plugged and you need to press the power button)

amitkpa 10-16-2012 01:45 PM

Thanks to reply

:-) Yes, I agree with your opinion.

Can you just let me know, How to start this engine alone :-)
I mean to say, where to compile the Kernel source code, because we are not having any other ditros so we don't have the libraries required for compilation of kernel source code.

Again, if compilation is possible(I am assuming that you will provide me some suggestion like compiling the kernel using some other computer or something), then what would be the next steps like how configure the kernel for the specific architecture and all that.

JaseP 10-16-2012 02:02 PM

The kernel is just part of the OS,... A kernel alone is (relatively) useless. You need all the GNU tools to build a complete OS.

And to build it, you need a build environment. The first Linux distros were born by compiling them on other OSes...

For a project intended to help build Linux based systems for the embedded market,... look here;
http://www.yoctoproject.org/about

That ought to help you to understand what is needed...

TobiSGD 10-16-2012 02:05 PM

To better understand how to create a minimal bare bones Linux system you may want to have a look at Linux from Scratch: http://www.linuxfromscratch.org/lfs/

Elv13 10-16-2012 03:02 PM

Quote:

Originally Posted by amitkpa (Post 4807441)
Thanks to reply

:-) Yes, I agree with your opinion.

Can you just let me know, How to start this engine alone :-)
I mean to say, where to compile the Kernel source code, because we are not having any other ditros so we don't have the libraries required for compilation of kernel source code.

Again, if compilation is possible(I am assuming that you will provide me some suggestion like compiling the kernel using some other computer or something), then what would be the next steps like how configure the kernel for the specific architecture and all that.

The best way is to compile it in another Linux distributions. There is very little libraries dependencies as the kernel can not use libraries, as such, it does not require any. The only ones are used by the compiler itself. You could compile it in Mac OSX with xcode command line utilities installed or in Windows with much, much more preliminary setup, but it is harder than seflhosting it (compile Linux in Linux). I am not stating it is impossible, but it is impractical. Just download a distribution and win it in a VM if you don't want to install it. The compilation does not have to take place on the same computer.

Then, just install a bootloader capable of running Linux and point it to the executable. There is no other step required just to have Linux to start. Again, it wont do anything. It will just print some text then an error ().

theNbomr 10-16-2012 03:17 PM

You can create a kernel that will self-load from the MBR of a PC. You may be able to find one already built for you. You can use a live CD to provide the dd command to write the kernel image file to your hard disk. As others have said, it will do approximately four-fifths of the square-root of diddly-squat. I feel certain that this is the very ablsolute minimum Linux possible.

EDIT: The OP asked about installing with a bootloader. In most common usage, a bootloader is used to boot a kernel into memory from storage somewhere. A kernel is 'installed' by storing it in that place from where the booloader fetches it. If the question intended some other context, then the OP should clarify.

jefro 10-16-2012 03:17 PM

I think the Linux from Scratch is the way you are asking about.

You could even get something like zipslack and run it on a umsdos filesystem.

I assume you have either a new laptop with freedos or a very old laptop with some version of DOS. If this is an old system you may not get linux to run.


All times are GMT -5. The time now is 05:39 PM.