I wanted to have a backup system for my raspberrys using Raspbian: simple, versioned and automatic like Time Machine on my mac, so I installed Borg Backup and started saving the full system on an external Hard Drive. After installing a new software, one of my pi wasn't able to reboot, so I knew it was time to test my backups...
I booted the pi with another system, and restored with Borg the content of the pi when it was running...
It didn't work, now, I have a screen with
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to try again booting into default mode. Cannot open access to console, the root account is locked. See sulogin(8) man page for more details. Press Enter to continue.
I red that there’s a way to boot in console mode, so I connected the usb card (the pi’s boot volume) on my mac, and added « init=/bin/sh » at the end of the file cmdline.txt
I rebooted with the usb-card, now I had the message
/bin/sh: 0: can’t access tty: job control turned off
If I type journalctl -xb, I have
No journal files were found. Failed to get boot id: No such file or directory
I saw that the problem « emergency mode » has often a cause in fstab, so I tried cat /etc/fstab
proc /proc proc defaults 0 0 PARTUUID=00066d95-06 /boot vfat defaults 0 2 PARTUUID=00066d95-07 / ext4 defaults, noatime 0 1 # a swapfile bla bla bla
I have no idea if that’s a good fstab file or not