LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Compiling a new kernel: why these final steps? (https://www.linuxquestions.org/questions/linux-general-1/compiling-a-new-kernel-why-these-final-steps-181589/)

fenice1976 05-14-2004 08:42 PM

Compiling a new kernel: why these final steps?
 
I have just read DrOZZ's guide to compiling a new kernel and I wonder why I should make the last steps I have never done before.
I mean THESE ONES:

Remove the following links:
rm -rf /boot/System.map
rm -rf /boot/vmlinuz

Why deleting System.map? What's its use?
I have never deleted System.map before.

Then copy the newly created kernel and system.map to /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-x.x.x
cp /usr/src/linux/System.map /boot/System.map-x.x.x

I have always and onley copied the new kernel renaming it to preserve the old ones, but never copied the new System.map...and again...what is System.map?

Make the new links:
ln -s /boot/vmlinuz-x.x.x /boot/vmlinuz
ln -s /boot/System.map-x.x.x /boot/System.map

Never created such these links.....

Next remove existing initrd.img file:
rm -rf /boot/initrd.x.x.x.img

What's the use of initrd.x.x.x.img? And why deleting it?

..And create the new one:
/sbin/mkinitrd /boot/initrd-x.x.x.img x.x.x

Why should I create a new initrd.x.x.x.img ?

Well....sorry if these questions have already been made...it's deep night here...I'm tired and....excuse me in the case :-D

Night!
(Note: )
The last set of x.x.x is the eqivalent to your new kernel version and it looks to /lib/modules for that version.

ToniT 05-14-2004 09:26 PM

-System.map contains the listing of locations where different kernel internals are pysically located in the kernelfile/memory. The listing is unique to the compiled kernel and used probably by modprobe, some debugging tools, kernel dump/panic analyzer, etc.

-Idea of the removing the old one is to not to mix up it with the new.

-Idea of the links is that you don't have to modify your lilo.conf (or grub configs) every time you upgrade your kernel; /boot/vmlinuz contains allways the newest one.

-initrd is an initial ramdisk passed to the kernel by boot loader (lilo/grub) containing kernel modules needed access the root system (hard-disk, nfs, raid-arrays, scsi-devices, cdrom[eg. in knoppix], where ever your system is configured to run itself in).
-You need to create it again if your system structure is changed or if your kernel modules are changed (eg. new kernel version). (This of course applies only if you use initrd).

fenice1976 05-15-2004 06:41 AM

So what happens if I do not change/upgrade System.map and/or initdr.img?

ToniT 05-15-2004 10:46 AM

See Peter's notes about the System.map file for few more words about the system map.

And for the initrd:
if you don't use it, nothing.
And if you use it, your system fails to boot because of version mismatch on the modules.

fenice1976 05-15-2004 09:03 PM

Tonit. I have read the document. Very clear. Thanks! :-)


All times are GMT -5. The time now is 07:22 PM.