How to handle Linux kernel upgrade failure

Source: Internet
Author: User
How to handle Linux kernel upgrade failure-general Linux technology-Linux programming and kernel information. For more information, see the following. To solve a linux kernel upgrade failure, you do not need to perform numerous compilation tests.

The main idea is to create a new kernle intrd File Based on the intrd file that is started normally to ensure normal system guidance.

Copy the upgraded initrd-2.4.20-28.7smp.img file, decompress the mount and compare with the content of the normally started initrd-2.4.18-3.img file, found the problem.

1. view the disk drive in normal conditions

Grep scsi_mod/proc/modules | tr '[]' "" | cut-c33-

2. decompress the initrd file into an image file, and then mount the file for comparison.

RD =/boot/initrd-2.4.18-3smp.img

Cp $ {RD }$ {RD}. Original

Gunzip <$ RD>/tmp/initrd. img

Mkdir/tmp/initrd. mnt

Mount-o loop/tmp/initrd. img/tmp/initrd. mnt

Perform the same operation on the initrd file after the upgrade, and the mont will go to another location. Then, compare the file loaded by the file Core Driver Module with the linuxrc file.

<Echo "Loading aic7xxx module"

<Insmod/lib/aic7xxx. o

---

> Echo "Loading aacraid module"

> Insmod/lib/aacraid. o

Upgrade 7.3 kernel. Use with caution) in two cases

1. Machines with raid

A. Directly copy/boot from the previous normal machine the kernel file to be upgraded, such as the initrd file/lib/modules // lib/modules/2.4.20-28.7

B. Modify lilo or grub.

2. For machines without raid, perform steps A and B on the machines with raid first.

A. Unlock the upgraded initrd driver File

RD =/boot // boot/initrd-2.4.20-28.7smp.img

Cp $ {RD }$ {RD}. Original

Gunzip <$ RD>/tmp/initrd. img

Mkdir/tmp/initrd. mnt

Mount-o loop/tmp/initrd. img/tmp/initrd. mnt

B. Modify the/tmp/initrd. mnt/linuxrc File

Echo "Loading aacraid module"

Insmod/lib/aacraid. o

2 actions

Echo "Loading aic7xxx module"

Insmod/lib/aic7xxx. o

C. copy/lib/modules/2.4.20-28.7smp/kernel/drivers/scsi/aic7xxx/aic7xxx. o file to/tmp/initrd. mnt/lib/

D. Pack the modified initrd file and replace the problematic initrd imgfile in/boot.

Sync

Umount/mnt/initrd. img

Cd/tmp; Gzip <initrd. img> initrd-2.4.20-28.7smp.img

Cp initrd-2.4.20-28.7smp.img/boot/

So far, the modification of the self-made driver has been completed due to/lib/modules/ The following driver files are very rich, which makes it easier to replace the driver. The driver and kernel versions must be strict.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.