↓ This was no good. ** Create and enable systemd (service) for restart Yoshi! ** **
Something like the following ...
Reboot ↓ Reboot systemd (service) will be executed ↓ Reboot ↓ Reboot systemd (service) will be executed ↓ ...... It has become an infinite loop of restarting ... (´ ・ ω ・ `)
** The service that was activated as soon as it started started running ** was out of my mind.
Linux has a ** single-user mode **. Since it starts with the minimum configuration, you can recover when it is (no ∀`) like this time.
It feels like a feature similar to ** BIOS ** or ** Windows Safe Mode **.
However, single-user mode cannot be over the network. I have to walk tech-tech with my feet to the front of the machine and operate it directly ...
First, press `` `e``` when the screen below appears. Then, the screen looks like this.
rd after rhgb quiet.Enter break.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/706116/460bdbf4-bd55-7ba5-f451-5241f1596ad8.png) Then you can start single user mode with Ctl + x! # Remount sysroot to work with files The purpose of this time is ** to fix the wrong shell script file **, so you need to bring the file ready for operation. Then remount sysroot. The following command. #### **`python`** ```sh mount -o remount,rw /sysroot chroot /sysroot
The following is the state where I remounted and tried to
At this point, it is almost the same as ** Starting CentOS8 and opening the terminal **, so you can modify the file with vi or something.
After modifying the file, I did `` `exit``` twice and CentOS8 started up safely. (Twice exit from remounted sysroot and exit from single user mode)
This time it was my physical server so I managed to do it, but what if something similar happens on AWS?
When migrating to the cloud, let's check if there is a single-user mode recovery method ...
CentOS Linux release 8.3.2011