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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
anandrkris

Multiple Kernels - Understanding

Post by anandrkris »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
AlbertP
Level 16
Level 16
Posts: 6701
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Multiple Kernels - Understanding

Post by AlbertP »

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.
anandrkris

Re: Multiple Kernels - Understanding

Post by anandrkris »

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.
AlbertP
Level 16
Level 16
Posts: 6701
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Multiple Kernels - Understanding

Post by AlbertP »

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.
Locked

Return to “Other topics”