Multiple Kernels - Understanding

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Multiple Kernels - Understanding

Postby anandrkris on Wed Feb 27, 2013 6:51 am

Hi All,

I would like to understand how Mint (per se, any other Desktop Environment) work in case of multiple kernels installed in a system. I recently upgraded my Kernel from 3.2 to 3.8 and GRUB presents both the kernels and could select either of the kernel while booting as desired.

Both kernels work on the same root and home partitions. I believe when a kernel is installed it generates an image which will store all the configurations in terms of applications installed,etc.

I will be grateful if someone can take the pains to explain / point to material on how desktop environment interfaces with kernel. Looks like desktop environment is coupled with kernle loosely enough to talk to mutilple kernels. (Non-concurrently)

I have also upgraded my KDE to 4.10 and kernel to 3.8. Also, how does Mint update manager handle and upgrade only the relevant package since I have deviated from initial installation.

Thanks for your time.
Cheers,
If there is a drive, there will be a path
User avatar
anandrkris
Level 5
Level 5
 
Posts: 772
Joined: Fri Nov 16, 2012 1:13 am
Location: Chennai

Linux Mint is funded by ads and donations.
 

Re: Multiple Kernels - Understanding

Postby AlbertP on Wed Feb 27, 2013 7:16 am

The "kernel image" is a different thing than what you're describing here. It does not contain installed software, it's the kernel itself packaged into a file that bootloaders like Grub can load. The kernel image does not contain much of the kernel's hardware drivers, those are stored separately as modules in a folder inside /lib/modules/ for every kernel version.

The desktop and any other userspace software, is not linked to any kernel. The kernel, after being told what it's root partition is, just starts the "init" program of the Linux system on that partition. init in turn loads all the system components. That way you do not have to link anything to a kernel, any kernel will run init allowing all software to run. The executable files of all software, such as the desktop environment, are in a file format that allows running them on any Linux or Unix kernel (ELF for example).
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 16
Level 16
 
Posts: 6501
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Multiple Kernels - Understanding

Postby anandrkris on Wed Feb 27, 2013 10:38 am

Thanks AlbertP for the clarification. 'init' got me started in the right direction.

After every installation or update, i think this 'initrd.img' file gets updated? This is what i wrongly assumed as some sort of an image which contains system specific / distro specific / hardware info? What does the above files contain ?

Code: Select all
anand@AnandLaptop ~ $ locate initrd.img
/initrd.img
/initrd.img.old
/boot/initrd.img-3.2.0-23-generic
/boot/initrd.img-3.8.0-030800-generic


Pls spare me for trivial questions. Am keen to learn how the OS functions.
Cheers,
If there is a drive, there will be a path
User avatar
anandrkris
Level 5
Level 5
 
Posts: 772
Joined: Fri Nov 16, 2012 1:13 am
Location: Chennai

Re: Multiple Kernels - Understanding

Postby AlbertP on Wed Feb 27, 2013 11:04 am

initrd contains a copy of important system files such as drivers which need to be loaded before the kernel is able to mount its root filesystem. Since the drivers are specific to a certain kernel version, every kernel version has its own initrd. The kernel images are the "vmlinuz" files the /boot folder.

The vmlinuz and initrd.img files in the root directory are actually links to files in /boot. They point to the default version used, when you boot without specifying a kernel version yourself.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 16
Level 16
 
Posts: 6501
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands


Return to Other topics

Who is online

Users browsing this forum: No registered users and 3 guests