Page 1 of 1

no sudo?

Posted: Mon Sep 04, 2017 2:56 am
by Hercules
Hi all,

Might be a noob question but.... I previously was able to use sudo to be able to edit files via ssh but no more!

I just get "-ash: sudo: not found"

It might also be related to why I can't assign static IPs anymore they just vanish.

What am I doing wrong?

Gargoyle version 1.9.2 | OpenWrt Chaos Calmer branch
Gargoyle revision ecc1da74| OpenWrt commit 03d52cf
Built February 10, 2017 | Target ar71xx/usb

Re: no sudo?

Posted: Mon Sep 04, 2017 3:15 am
by Lantis
There is no sudo as it is not required. The entire router runs as root (minus a few processes).
If you aren't able to add static assignments, that's a different issue that we can investigate.

Re: no sudo?

Posted: Mon Sep 04, 2017 5:03 am
by Hercules
OK but I cant save anything to anywhere. I use vi as my editor and if I try and save i get the message "Read-only file system"

Just then I had a thought that perhaps I am out of space so I tried to delete a large file but I received the message
rm: can't remove 'block.hosts': Read-only file system
There is how much space is left just in case that is the issue:

Code: Select all

root@Gargoyle:/etc# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                     768       704        64  92% /
/dev/root                 6144      6144         0 100% /rom
tmpfs                    63040       108     62932   0% /tmp
/dev/mtdblock3             768       704        64  92% /overlay
overlayfs:/overlay         768       704        64  92% /
tmpfs                      512         0       512   0% /dev

Re: no sudo?

Posted: Mon Sep 04, 2017 5:18 am
by Lantis
You're out of space. When the router runs out of space (or gets very close to it) it switches to read-only mode.

You'll need to failsafe reset or re-flash at this point.

Re: no sudo?

Posted: Mon Sep 04, 2017 5:24 am
by Hercules
I know how to reflash. What is a failsafe reset?

Re: no sudo?

Posted: Mon Sep 04, 2017 5:27 am
by Lantis
https://www.youtube.com/watch?v=_NqHpRHl8gQ

https://wiki.openwrt.org/doc/howto/generic.failsafe

Boots your router into a recovery mode which bypasses any bad configuration. From there you can "firstboot -y" to reset your router to it's initial state post-flash.

Re: no sudo?

Posted: Mon Sep 04, 2017 6:29 am
by Hercules
OK looks like a reflash!