Linux failure boot is deleted recovery measures

  

Linux administrators should be aware of the configuration information in grub.conf, you can use the CD to enter the linux rescue mode,

/boot system boot directory and /etc/fstab deleted failure recovery

The /boot directory contains the kernel and memory disk files for grub.conf and system boot. This directory is deleted. Generally, the grub configuration interface is not used, and there is a prompt error15. The solution can only rely on the system. The rescue mode of the disc. Let's examine the worst case. When the /boot directory is deleted, fstab is also deleted. How do I recover?

If the system does not restart, don't restart. If it has been restarted and stays in the grub interface, use Linux rescue mode to do the following

1. Install initrd-2.4.20-8. Img

Copy isolinux/vmlinuz from the first system CD to the /boot/directory and execute the following command

mkinitrd /boot/initrd-2.4.20-8.img 2.4. 20-8 #Set the loaded memory disk file

2. Install grub

Enter the mount command on the command line to get the following information

[root@localhost root]# mount

/dev/sda2 on /type ext3 (rw)

none on /proc type proc (rw)

usbdevfs on /proc/bus/usb type usbdevfs (rw )

/dev/sda1 on /boot type ext3 (rw)

none on /dev/pts type devpts (rw,gid=5,mode=620)

None on /dev/shm type tmpfs (rw)

You can also use df -h

or findfs (see more intuitively). Here is the result of findfs output:

[root@localhost root]# findfs LABEL=/boot

/dev/sda1

Because everything in the /boot directory has been deleted, installing grub requires re-creating the grub file in the /boot directory.

a. If you know the contents of the original system grub.conf or have grub The .conf backup is as simple as placing a grub.conf file directly under /boot/grub and entering the following command to install grub

grub-install /dev/sda

b, If you don't know the contents of grub.conf

Go to the /usr/share/grub/i386-redhat/directory and copy all the files to the /boot/grub directory

Copyright © Windows knowledge All Rights Reserved