You are not logged in.
Hello,
After a power failure my Arch box has no network connection available. An 'ip addr' command showed me the outrageous error message :
bash: ip: command not found
How could this ever happen ? How do I recover from such an error ?
Last edited by singleton (2014-12-19 17:34:58)
Offline
That is indeed odd. What were you doing when the power failed - were you by chance in mid-update?
Some diagnostics:
echo $PATH
ls -l /usr/bin/ip
pacman -Qi iproute2
Also, it is unlikely that something that could cause this wouldn't also cause other issues. So I'd first (even before the above diagnostics) run a pacman -Syu, then a pacman -Qk.
EDIT: sorry, the pacman -Syu suggestion is a bit silly: you can't do that until the network is back up - sorry about that one.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I wasn't doing any system maintenance when the power failed, just some regular browsing.
Here's the output of each command :
pacman -Qk
https://bpaste.net/show/e06fb962c42c
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
ls -l /usr/bin/ip
ls: cannot access /usr/bin/ip: No such file or directory
pacman -Qi iproute2
error: package 'iproute2' was not found
I 'm suspecting I will need to use a fresh installation CD to get over this. Any guidance will be greatly appreciated though!
Offline
OK, the recovery was pretty straightforward, everything went fine.
I booted with a fresh CD, mounted the root partition, chroot-ed to my root partition and installed iproute2. After a reboot my box is working decently again.
Thanks trilby for your answer!
Offline
That was going to be my suggestion for a solution if the check looked ok - as it (mostly) does [1]. Figuring out an isolated incident in hindsight is virtually impossible - but it seems the iproute2 package was removed. I actually suspect the power outage might just be a coincidence that revealed the problem by requring a reboot. Perhaps you removed iproute2 by accident at some point.
[1] Note the check output looks "mostly" ok - a better way of using it is `pacman -Qk | grep -v "0 missing files"`. This would reveal one thing worth checking in your system:
polkit: 155 total files, 1 missing file
If you know what file is missing and you intentionally removed it, this is fine - and it is almost certainly not related to the ip issue.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline