How To Compile A Kernel - The Mandriva Way - Page 2
5 Build The KernelTo build the kernel, simply execute this command: make rpm Now be patient, the kernel compilation can take some hours, depending on your kernel configuration and your processor speed.
6 Install The New KernelAfter the successful kernel build, a src.rpm and an rpm package have been created. The src.rpm package can be found in the /usr/src/rpm/SRPMS/ directory, you can find out about its name by running ls -l /usr/src/rpm/SRPMS/ On my system it was called kernel-2.6.18.3default-1.src.rpm. The rpm package can be found in /usr/src/rpm/RPMS/i386/, /usr/src/rpm/RPMS/i586/, /usr/src/rpm/RPMS/i686/, /usr/src/rpm/RPMS/x86_64/, etc., depending on your architecture. On my system it was located in /usr/src/rpm/RPMS/i386/, and by running ls -l /usr/src/rpm/RPMS/i386/ I found out that its name was kernel-2.6.18.3default-1.i386.rpm. Now we can install our kernel rpm package like this: cd /usr/src/rpm/RPMS/i386/ You can now even transfer the kernel rpm package to other Mandriva systems and install it there exactly the same way, which means you don't have to compile the kernel there again. Next we create a ramdisk for our new kernel, because otherwise the system will most likely not boot our new kernel: mkinitrd /boot/initrd-2.6.18.3-default.img 2.6.18.3-default
7 Configure The LILO Boot LoaderNow we must configure our LILO boot loader so that our new kernels gets booted when we restart the system. Run ls -l /boot to find out about your new kernel (typically begins with vmlinuz, e.g. vmlinuz-2.6.18.3-default) and ramdisk (typically begins with initrd, e.g. initrd-2.6.18.3-default.img). Then edit /etc/lilo.conf. Have a look at your existing (working) kernel stanzas there and take one of them as a sample for your new stanza and replace the kernel and ramdisk, then add the stanza above all other stanzas. Make sure you specify a unique name for that kernel in the label line (e.g. linux-2.6.18.3-default) and specify exactly the same name in the default line so that the kernel gets booted when you restart the system. vi /etc/lilo.conf For example, my lilo.conf looks like this before I add the new stanza:
and like this afterwards (keep in mind what I said about the label and default lines):
Then run lilo Now reboot the system: shutdown -r now If everything goes well, it should come up with the new kernel. You can check if it's really using your new kernel by running uname -r This should display something like 2.6.18.3-default If the system doesn't start, restart it, and when you come to the LILO boot loader menu, select your old kernel and start the system:
You can now try again to compile a working kernel. Don't forget to remove the stanza of the not-working kernel from /etc/lilo.conf, and make sure you run lilo after modifying /etc/lilo.conf.
8 Links
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning




print: 

Recent comments
12 hours 46 min ago
12 hours 58 min ago
14 hours 5 min ago
18 hours 21 min ago
18 hours 51 min ago
1 day 8 hours ago
1 day 17 hours ago
2 days 23 min ago
2 days 3 hours ago
2 days 4 hours ago