Article Title: linux emergency mode. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Improper modification of/etc/fstab,/etc/rc. d/rc. sysinit and other system startup files
Linux cannot be accessed, and a rescue disk can be easily repaired. This method is suitable
Repair the system when the rescue disk does not exist.
[Color = "#000000"] Select linux [color = "#007700"] From the grub menu. [color = "# 0000bb"] by e [color = "#007700"], [color = "# 0000bb"] e [color = "#007700"], enter edit mode,
Kernel [color = "#007700"] ([color = "# niubb"] hd0 [color = "#007700"], [color = "# BB"] 0 [color = "#007700"]) /[color = "# 0000bb"] vmlinuz root [color = "#007700"] =/[color = "# 0000bb"] dev [color = "#007700"]/[ color = "# BB"] hda2 [color = "#007700"] ...... add at the end of this line
Init [color = "#007700"] =/[color = "# niubb"] bin [color = "#007700"]/[color = "# niubb"] bash [color = "#007700"], [color = "# 0000bb"] After modification, press enter [color = "#007700"], B boot
The modified boot information is similar to the following:
Kernel (hd0, 0)/vmlinuz root =/dev/hda2 init =/bin/bash
In this way, the boot system can get a bash shell
The system is read [color = "#007700"]-[color = "# 0000bb"] only [color = "#007700"]. First, use fsck to check the system.
Fsck [color = "#007700"]-[color = "# BB"] a [color = "#007700"]/[color = "# BB"] dev [color = "#007700"]/hdaX process the root partition X is the root Partition Number, such as hda2
Fsck [color = "#007700"]-[color = "# BB"] R [color = "#007700"]-[color = "# BB"] A [color = "#007700"]-a processes other partitions
If the system is restarted normally, the file system is uninstalled normally,
You can directly mount the system to read [color = "#007700"]-write without using the fsck check.
[Color = "#000000"] mount [color = "#007700"]/[color = "# BB"] proc
[Color = "#000000"] mount [color = "#007700"]/-[color = "# niubb"] o remount [color = "#007700"], rw
[Color = "# BB"]
Swapon [color = "#007700"]-a opens all swap partitions
Source [color = "#007700"]/[color = "# 0000bb"] etc [color = "#007700"]/profile
After the system is repaired, Remount the system to ro to restart the system safely.
Mount [color = "#007700"]/-[color = "# niubb"] o remount [color = "#007700"], ro