[email protected]: /usr/src/linux-126.96.36.199-0.12 # make bzlmage
CHK /usr/src/linux-188.8.131.52-0.12/include/linux/version.h HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf -s arch/x86_64/Kconfig
# using defaults found in .config
When the build process has completed successfully, you will see a message similar to this:
Root device is (8, 1) Boot sector 512 bytes. Setup is 7289 bytes. System is 1416 kB
Kernel: arch/x86_64/boot/bzImage is ready (#1) You can now navigate to that directory and see the file that has been created: [email protected]: ~ # cd /usr/src/linux/arch/x86_64/boot/
[email protected]: /usr/src/linux-184.108.40.206-0.12/arch/x86_64/boot/ # ls -l bzlmage
You should see a brand-new file bzImage with a timestamp showing that it has just been created. The exact directory where the image is built depends on the kernel version and the architecture.
When you've made the bzImage, you have several more steps to perform:
1. Build the modules:
[email protected]: /usr/src/linux-220.127.116.11-0.12/ # make modules
As noted, if you simply issue the command make or make all, the bzImage and the modules will be built in one step.
2. Install the kernel and the modules:
[email protected]: /usr/src/linux-18.104.22.168-0.12/ # make install
This copies the bzImage file to the /boot directory. (Before you dothisyou may want to back up the old kernel, particularly if it has the same version number.)
[email protected]: /usr/src/linux-22.214.171.124-0.12/ # make modules_install
3. Create a new initial ramdisk to correspond to the new kernel: [email protected]: /usr/src/linux-126.96.36.199-0.12/ # mkinitrd
4. Check that both the new and old kernels are referenced in the GRUB menu so that you can go back to the old kernel if you need to. Edit the file /boot/grub/menu.lst to confirm this.
If you use LILO for booting, you need to edit /etc/lilo.conf to ensure that both the new and old kernels are included and run the lilo command.
^ If you have compiled things into the kernel that were previously being loaded as modules, it is important that these modules themselves should not be loaded when the new kernel is booted; otherwise, unexpected problems could occur. You may need to adjust
Was this article helpful?