[Solved] Vero 4k+ recovery console?

So… I made a sloppy mistake and locked myself out of sudo on my Vero 4k+. (For the record, I used visudo to comment out the ‘nopasswd’ entry without first adding my user to the ‘sudo’ group, so instead of sudo access requiring my password, I now have no sudo access, and root login is still disabled as per the default.) I’m hoping I can fix this without resorting to anything as drastic as a factory reset or full reinstall.

On a typical Debian amd64 install on a PC, I would have an obvious path to a root shell from the GRUB menu, and from there I could reverse the change easily. Obviously the boot process is a bit different on an embedded device, so:

  1. Is there a built-in way to get into a root recovery shell from which I can edit a file on the root filesystem? If so, how do I get into it? Tap on some key during boot?
  2. If not, would I be able to boot an arm64 Debian installation USB stick via the toothpick trick and use the Debian recovery mode from there? I expect I can figure out which emmc partition holds the root fs and mount it manually if need be.

You can hold CTRL when you see the blue OSMC splash screen.

You can also hold shift but this would drop you to initramfs before the root partition is mounted.

Excellent! Thanks for the prompt reply; I’ll try that this evening.

1 Like

Update:
Success! For reference, In this situation you need shift, not CTRL. CTRL takes you to a text consolole without starting Kodi, yes, but you still need to log in on that console, so it got me no farther ahead with this particular problem.

Hitting shift to get a root shell in the initramfs worked, though, and from there it was just a matter of mkdir /mnt/root; mount /dev/mapper/vero--nand-root /mnt/root; visudo -f /mnt/root/etc/sudoers.d/ to revert my change. As soon as I logged out of the recovery console, the system proceeded with normal boot.

3 Likes

I’m glad this is resolved for you now.

Does this still work? I messed up something in a systemd startup service and my vero now hangs during startup. I tried both shift and CTL by neither did anything.

You should be able to still get to the recovery console but getting to initramfs seems to be problematic after kernel 4.x (race condition).

Hmmm, it doesn’t seem to be working. Do I need to use the pin-hole-press to put the device into a recovery mode before I can press the space for the recovery console?