6

I want to study the kernel of Linux without any distribution.

I found the LoadLin boatloader of Ms-dos, but i think it works only in older version of windows (windows 95,98, ME).

So i need to install the kernel only in my PC if Possible.

How I can install it?

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Ahmed Djamel
  • 138
  • 1
  • 6

3 Answers3

6

The kernel only is not that much useful to you; you'll probably need some shell and a working compiler if you want to test things first-hand, and these are not part of the kernel.

There's a distribution called Linux From Scratch which basically allows you to install the kernel and then whatever other stuff you want, literally from scratch (as in, by compiling stuff yourself and only adding what YOU want)

I am wondering though, what is it exactly you want to study and how does having a distribution affect your studying of the kernel? (Yes, some distributions ship custom kernels but the major features are almost always the same)

Fingolfin
  • 5,363
  • 6
  • 45
  • 66
  • I have a confuse between a distribution files,directories and commands and kernel files,directories and commands , note: i have the compiled kernel – Ahmed Djamel Mar 24 '14 at 14:19
  • 1
    @AhmedDjamel The commands are simple programs, mostly. The kernel as a binary image is usually located in the /boot directory. – Fingolfin Mar 24 '14 at 16:12
  • ok, thanks @xci13 as I understand the kernel itself is useless without the operating system files (distribution files ) . – Ahmed Djamel Mar 24 '14 at 16:30
  • 1
    @AhmedDjamel Indeed it is, that's what what I said; you do need a shell to work with, even a basic one, and some basic utilities to make your life easier along with a compiler if you want to test things. – Fingolfin Mar 24 '14 at 16:44
3

Minimal Linux Live is a 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 then easily boot into the system, which might be a more convenient way to study the kernel.

Or you can just use the Live ISO as a regular distribution and install it on metal.

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.

See also:

Community
  • 1
  • 1
Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
0

Why not use a distribution? Just get some free VM (eg. virtualbox) and install an arbitrary Linux distribution. You have all the build tools there you need to compile the kernel, without actually touching your system.

Ortwin Angermeier
  • 5,957
  • 2
  • 34
  • 34
  • as a beginner i want to isolate the kernel files from the distribution files . so i can learn what i can do with kernel only. – Ahmed Djamel Mar 24 '14 at 14:26
  • There is only one kernel file and that's the kernel itself loaded by the bootloader. What are you hoping to isolate? – tangrs Mar 25 '14 at 09:24
  • Ok i misunderstand the structure of kernel, i was think in like a compressed folder :). but now i understand it thank you very much – Ahmed Djamel Mar 26 '14 at 22:44