0

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

FredericP
  • 153
  • 1
  • 2
  • 10
  • You appear to be using NOOBS (which puts Raspbian in different partitions). The root shell recovery method (putting init=/bin/sh in cmdline.txt) only works for Raspbian - it may work if you edit cmdline.txt in partition 6. It is unclear what to do if the problem is in the NOOBS system. Who knows what Bord Backup may have done on a different system. – Milliways Sep 05 '19 at 23:47
  • Yes, I forgot to mention that I installed the system with Noobs, sorry. I think the root shell recovery method worked (I modified in the partition that appeared on my mac, it was the vfat-one I suppose, so the 6), and the result was different: not trying to launch the graphical system... But I don't know what to try now... – FredericP Sep 06 '19 at 11:34
  • NOOBS has its own FAT boot partition in addition to the Raspbian boot partition. Most of us don't use NOOBS, because of the problems it creates. It is possible to convert to a normal Raspbian, but without knowing what Borg Backup actually does you are unlikely to get a solution on this site. – Milliways Sep 06 '19 at 12:16
  • I didn't know that Noobs was creating problems... I think that I will now restart from scratch, install Raspbian without Noobs, save the Pi... then try to restore it to verify that my backup is working, and useable (I know, I should have done this before...) – FredericP Sep 07 '19 at 16:11

0 Answers0