Background: to delete all files during system startup and damage the boot program, you must repair the system quickly without compromising data. Rm/boot/*-rfddif/dev/zeroof/dev/sdabs446count1rm-f/etc/inittabrm-f/etc/rc. d/rc. sys...
Background: to delete all files during system startup and damage the boot program, you must repair the system quickly without compromising data.
Rm/boot/*-rf
Dd if =/dev/zero of =/dev/sda bs = 446 count = 1
Rm-f/etc/inittab
Rm-f/etc/rc. d/rc. sysinit
Rm-f/etc/rc. d/rc. loacl
Mv/etc/fstab. bak
In summary, there are four major steps:
1. restore fstab
2. reinstall the kernel
3. reinstall inittab,/etc/rc. d/rc. sysinit,/etc/rc. d/rc. loacl
4. re-write the Boot File
Details:
1. use a CD or network boot mode to enter rescue mode and press Enter. press default. if network boot is used, select the URL mode and enter the appropriate path. if the disk is closed, select Local cdrom, then select continue.
2. first, you need to restore the/etc/fstab file in the/etc/Directory. The/etc/directory belongs to the and partition, so you must first find the and partition, the video/dev/sda2 I am working on is partitioned. create a directory and mount/dev/sda2 to this directory.
3. go to the directory where the file is located and restore fstab. bak to fstab. if the file is lost or incorrect, you need to write the file content and enter exit to restart.
4. enter rescue mode again to restore the kernel file.
5. recover the boot program. all files in/boot are recovered. manually create the/boot/grub. conf file.
Then write the content.
6. restore files such as/etc/inittab/etc/rc. d/sysinit.
Then restart the computer.
Connection: http://v.qq.com/boke/page/w/ I /g/w0101c0e5ig.html