The Linux administrator should be clear about the configuration information in grub. conf and can use the CD to enter the linux rescue mode for operations,
/Boot system boot directory and/etc/fstab deleted fault recovery
The/boot directory contains grub. conf and kernel and memory disk files used for system boot. deletion of this directory usually causes the grub configuration interface to be unavailable and the error error15 is prompted, the solution can only rely on the rescue mode of the system CD. The worst case is that the/boot directory is deleted and fstab is deleted. How can this problem be solved?
If the system is not restarted, do not restart it first. If the system has restarted and remains on the grub interface, perform the following operations in Linux rescue mode:
1. Install initrd-2.4.20-8.img
Copy isolinux/vmlinuz from the first system disk to the/boot/directory and run 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 in the command line to obtain 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 a more intuitive view of findfs) The findfs output result is as follows:
[Root @ localhost root] # findfs LABEL =/boot
/Dev/sda1
Because everything in the/boot directory has been deleted, you need to re-create the grub file in the/boot directory to install grub.
A. If the grub of the original system is clear. conf content or grub. conf backup is simple. You can directly create a grub. put the conf file under/boot/grub and enter the following command to install grub:
Grub-install/dev/sda
B. If you are not clear about grub. conf
Go to the/usr/share/grub/i386-redhat/directory and copy all the files to the/boot/grub directory.
# P #
Enter the grub interface and enter the following command
Grub> root hd0, 0) # Because grub is installed in/boot, And/boot is mounted on sda1
Grub> setup (hd0)
3. Install the kernel and reinstall the backup Kernel File.
Rpm-ivh kernel-2.4.20-8.i686.rpm -- root =/-- force
4. reboot
5. The system will stay on the grub interface and enter the following command
Kernel/vmlinux-2.4.20-8 ro root = LABEL =/
Initrd/initrd-2.4.20-8 ro root = LABEL =/
6. boot
- Pxe boot diy network startup tool set 2
- Go to linux 2-driver development technology
- Help, linux Installation