2

I'm logged in via ssh(which I thought should not even be in recovery mode?) since my raspberry pi doesn't have monitor or keyboard. I've been having to remount the root directory as rw and there are lots of admin commands that are acting weird.
I could technically connect my pi to hardware and see what happens during Grub but I was just wondering if it's possible to do it just via terminal.

shriek
  • 175
  • I don't think Ubuntu boots into Recovery automatically. Unless you specifically booted it into Recovery, I doubt you're in it. – TheWanderer May 29 '16 at 16:07
  • That was my initial thought too but lot of strange things is happening in my pi so I was wondering if I could check it just to confirm. – shriek May 29 '16 at 16:11

1 Answers1

4

Is there a way to tell if Ubuntu is running in recovery mode via terminal?

From the webpage How to check a current runlevel of your Linux system:

Debian distribution has it runlevel 2-5 dedicated to full multi-user with graphical managers and console login whereas Redhat/Fedora has two separate runlevels for each mode. To check the runlevel of you system you can use runlevel command with no arguments:

runlevel

This answer says that the default runlevel in Ubuntu is 2, but for me it is 5. Anyway, recovery mode is a different number.

I've been having to remount the root directory as rw

Probably your system remounted it to ro because there were I/O errors on the device. You should schedule a fsck and maybe consider buying a new SD card.

  • Okay, I see that my runlevel is 5 as well. And this answer helped me a bit understanding the runlevel of recovery mode. And you maybe right on the corrupt SD card. – shriek May 29 '16 at 16:29
  • @shriek Great. Please consider upvoting and accepting the answer if it satisfies you. – Andrea Lazzarotto May 29 '16 at 16:34
  • Ahh sorry. Was trying to go look for another SD card. Regarding the fsck that didn't seem to help either. – shriek May 29 '16 at 16:48