Notes on CentOS rescue model experiment

Time:2019-10-24

Experimental notes on centos rescue model

1, first in the BIOS boot options to set the DVD drive boot or USB boot is also possible

2. Select “Rescue installed system” from the option that appears after the CD startup and press enter to confirm.

wKioL1UBsb6AJ00eAAJSzIB-XtA322.jpg

3, language selection, here we can choose the default, because it is not graphical, so there is no way to support Chinese, keyboard also choose the default and press enter, the details are as follows:

wKioL1UBsfqj1ap1AAHN1icCg50392.jpg

wKiom1UBsNnzTakJAAGWGcv2MtY574.jpg

4. In SetupNetworking, we can confirm whether to enable the network according to our own needs. Here, I choose not to enable it, as shown in the figure:

wKioL1UBslehnyuuAAIKXU4N_-c596.jpg

5, Continue is to make the virtual system (i.e., Rescue environment) find already installed Linux system and to mount to/MNT/sysimage for both reading and writing, this is the most commonly used one way, the Read – Only mounted in a read-only way, without any modification, when using the Continue and the Read – Only when we use the Skip unable to mount the partition way, to find a partition, no system to help, not suitable for beginners, the Advanced is used to store the relevant configuration, as shown in figure:

wKioL1UBsoyyIXNoAALQ_o2MoPw439.jpg

6. The hint in the figure below is that the Linux system is already in the/MNT /sysimage directory. If we want to obtain the root environment, we need to execute “chroot/ MNT /sysimage”.

wKiom1UBsa3iXdfWAAF0o54W8bg422.jpg

Press enter twice in succession to enter the following mode:

wKioL1UBsuyy0B3xAAD4AF2hPaY037.jpg

The three models mean:

Shell: directly into the command line, you can edit the file, change the user password, and so on

Fakd: diagnostic mode

Reboot: Reboot

7. Select shell and enter the root environment, as shown below

wKiom1UBsgHAtTV7AAD0bFcdONA437.jpg

8. If you enter the root environment and cannot operate files in the Linux system on the hard disk, you should enter the chroot/ MNT /sysimage command before you can operate files on the hard disk, as shown in the figure below:

wKioL1UBs0_yvGQUAABGCLgAylc978.jpg

Enter chroot/MNT /sysimage and press enter to see that bash-4.1 will change to sh-4.1, and you are ready to work on the files on your hard disk.

Reboot is not supported under sh-4.1. You must exit from bash-4.1 before you can use reboot to restart the system. After reboot, select the option of “Bootfrom local drive” to boot into the system normally. Xiaobai experimental notes, there are mistakes also ask god to correct.