Failure of the analog linux5.10 system to repair

Source: Internet
Author: User

The first step, the simulation system error


Uninstalling a boot-mounted device, deleting the boot file

Umount/dev/sda1


Rm-rf/boot


Delete/etc/inittab file


Rm-rf/etc/inittab


Delete rc.sysinit file


Rm-rf/etc/rc.d/rc.sysinit


Delete/etc/fstab file


Rm-rf/etc/fstab


Restart the system after saving

Sync

Sync

Reboot


The second step, insert the System CD, Boot press F2 for the system BIOS, then boot from the CD, the installation of the Linux interface, and then F5 the system repair mode, and finally enter the Linux rescue system repair interface.

Default language: 中文版

Default keyboard: US

Do not load the network: No

Select Continue Repair: Continue

Select Repair mode OK: OK


First, use LS and DF to view the current fake system information

Ls


Df


Use Fdisk-l to view the mounted partition information for the current system

Fdisk-l


Use E2label to view files for mounted partitions

E2label/dev/sda1/boot


E2LABEL/DEV/SDA2/


E2label/dev/sda3/var


E2label/dev/sda5/home


Create a file under the current fake system test01 to mount the boot file using E2label to view the mounted partition


mkdir test01


mount/dev/sda2/test01


Go to the mounted file to see what's inside

cd/test01


Ls


Cd/etc directory, modify the previously backed up Fstab.bak file to Fstab


MV Fstab.bak Fstab


Use the VI command to edit the Fstab file


VI fstab


Finally use reboot to reboot the system


Reboot



Third, after restarting the system, enter the Linux installation interface, and then enter the Linux rescue for system repair.

Step above


To view the mounted partitions of the current system using DF

Df

Use Chroot/mntsysimage to enter the real system

Ls


Exit the real system and mount the system's optical drive

Mount/dev/sr0 Mnt/source


Df


CD Mnt/source


CD Server


LS *kernel*


Use RPM to install the kernel of the system

RPM-IVH kernel-2.6.18-371.e15.x86_64.rpm--root=/mnt/sysimage/--force


Using Chroot to enter the real system


Chroot/mnt/sysimage


Enter boot, use LS to view, and then boot into the/DEV/SDA drive using Grub-install


Grub-install/dev/sda


Using ls >/grub/grub.conf


Vim/grub/grub.conf


Title Newsystem Linux Server 5.10

Root (hd0,0)

KERNEL/VMLINUZ-2.6.18-371.E15 ro root=label=/

Initrd/initrd-2.6.18-371.e15.img


Save and then exit


Using RMP to find Inttab packages

Rpm-qf/etc/inittab


Using RPM to find the Rc.lcoal package

Rpm-qf/etc/rc.d/rc.local


Use RPM to find Rc.sysinit

Rpm-qf/etc/rc.d/rc.sysinit


Use RPM to find/etc/initab

Rpm-qf/etc/initab


Exit the real system and find the Initscripts software Department

LS *initscripts*


Then copy the initscripts into the/MNT/SYSIMAGE/MNT directory


CP initscripts-8.45.44-3.e15.x86.rpm/mnt/sysimage/tmp


Using Chroot to enter the real system


Chroot/mnt/sysimage


Cd/tmp



Unzip the initscripts package

Rpm2cpio initscripts-8.45.44-3.e15.x86.rpm | Cpio-imd


ETC catalogue in CD Press solution


CP Inittab/etc


CP RC.D/RC.LOCAL/ETC/RC.D


CP RC.D/RC/SYSINIT/ETC/RC.D


Finally reboot the system


Repair successful



This article is from the "Sky of Lavender" blog, be sure to keep this source http://youlei.blog.51cto.com/2669714/1636692

Failure of the analog linux5.10 system to repair

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.