Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How the Ubuntu kernel updates the configuration

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to update the configuration of the Ubuntu kernel, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

Host environment: Ubuntu desktop 9.04 is similar if it is 9.10.

* Kernel: linux-2.6.31.6 can be downloaded by www.kernel.org if you are using another kernel, the method should be similar

Here we go:

1. Extract the downloaded linux source code package (tar.bz2 package) to / usr/src. If you don't know how to extract it, please google. After decompressing, you can see a linux-2.6.31.6 folder in the / usr/src directory.

two。 Transfer the directory to linux-2.6.31.6 with the following command:

Cd / usr/src/linux-2.6.31.6

3. First configure the Ubuntu kernel: make menuconfig

I don't know exactly how to configure it, but basically it doesn't need to be configured. Just choose *, and save,exit will be OK.

4. Then start compiling the kernel: make

It's a long process. Wait slowly. It took me nearly an hour and a half.

5. Join the module:

Make modules_install

6. Generate an executable Ubuntu kernel boot file:

Make bzImage (note that I should be capitalized)

7. Copy bzImage to / boot:

The bzImage directory of the cp arch/i386/boot/bzImage / boot/vmlinuz-2.6.31.6 / / 2.6.32Ubuntu kernel is arch/x86/boot/bzImage

8. Clear redundant creation files:

Make clean / / leave this step * * to * (now you can skip this step), so that you can come back here and redo it even if you make a mistake later, without having to recompile it.

9. Copy System.map to / boot:

Cp System.map / boot/System.map-2.6.31.6

10. Generating initrd.img is very important, I started to make a mistake about this, and I rebooted it for nothing. Command:

Cd / lib/modules/2.6.31.6

Sudo mkinitramfs-o / boot/initrd.img-2.6.31.6 / / 2.6.32 can be sudo update-initramfs-c-k 2.6.32

11. Automatically find a new Ubuntu kernel and add it to the grub boot:

Sudo update-grub

This process can also be done manually by changing the menu.lst file in the / boot/grub directory. This file boots the startup of the system, the structure is very simple, just specify the boot file, you can refer to the existing startup item modification, my is to add the following content to this file:

TitleUbuntu 9.04, kernel 2.6.31

Uuid753efade-04e8-4e2c-8bbb-965e9792b2f5

Kernel/boot/vmlinuz-2.6.31.6 root=UUID=753efade-04e8-4e2c-8bbb-965e9792b2f5 ro quiet splash

Initrd/boot/initrd.img-2.6.31.6

Ubuntu kernel 9.04 uses the Grub2 startup file to replace the file with grub.cfg in the directory / boot/grub. If you add it manually, please refer to it as follows:

Menuentry "Ubuntu, Linux 2.6.32" {

Recordfail=1

If [- n ${have_grubenv}]; then save_env recordfail; fi

Set quiet=1

Insmod ext2

Set root= (hd0,3)

Search-- no-floppy-- fs-uuid-- set 3c611c5f-f941-4970-956f-fe4c7bf75714

Linux/boot/vmlinuz-2.6.32 root=UUID=3c611c5f-f941-4970-956f-fe4c7bf75714 ro quiet splash

Initrd/boot/initrd.img-2.6.32

twelve。 Restart the computer: reboot you will find that the startup item has an option of Ubuntu 9.04, kernel 2.6.31 (Ubuntu, Linux 2.6.32). Select this to enter the system.

Complete ~

Thank you for reading this article carefully. I hope the article "how to update the configuration of the Ubuntu kernel" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report