I was trying to fix the kernel panic-not syncing, in this case the number is (179,6) using this guide Kernel panic-not syncing: VFS: unable to mount root fs on unknown- block(179,6) running Raspbian on top of NOOBS But when I was using the recovery mode replies me: "-sh: sudo: not found". How can I fix this? I have some important configurations in this SD
When using "Recovery Mode" the normal Pi startup process is interrupted very early to allow you to gain access to the command line as the superuser (
root). At this point in startup the Pi is still running a in-memory filesystem with a limited set of commands.
The result of all this is commands such as
sudo are not available (it's on the SD card but the whole SD card is not mounted yet) but, because you're logged in as the superuser, you don't need to elevate your privileges to do anything (as @Jaromanda-X has already commented). It's worth pointing out as well that, because you're logged in as the superuser, you don't need to elevate your privileges and can do anything --- be extra cautious before hitting the "Enter" key!
Other things to remember when in "Recovery Mode" are...
- The file system is in memory, not on the SD card. To change the second partition of the SD card you first need to mount it. For example you might want to change
/etc/fstab, to do this you'd first mount your SD card (
mount /dev/mmcblk0p2 /mnt) and edit the file under the mount point (
- Environment variables and short-cuts might not be what you expect because you're not logged in as
pi. For example, something like
cd ~/somedir/might not do what you expect because
/home/pi/as you might be used to (or, more importantly as assumed in some tutorial you might be following).
- The shell is a lightweight one provided by BusyBox so some scripts or one-liners that use "bash-isms" might not work as expected.