Output from the Kernel Build Process

[email protected]: /usr/src/linux- # make bzlmage

CHK /usr/src/linux- 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- # 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- # 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- # 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- # make modules_install

3. Create a new initial ramdisk to correspond to the new kernel: [email protected]: /usr/src/linux- # 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.

Now you can reboot and select the new kernel.

^ 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?

0 0

Post a comment