You are not logged in.
Pages: 1
I managed to mangle /bin and completely wiped it from the system.
Is this recoverable at this point?
This is a remote system that I can no longer SSH into and it no longer boots, but I can boot into a recovery console and manipulate the files in /dev/sda1 where Arch is installed.
Is there some way I can fix this without having to completely reinstall?
Offline
/bin is a symlink. If you really mangled /bin and not /usr/bin then just recreate the symlink.
ln -s usr/bin (mount folder)/binIDK what a recovery console is. Perhaps you mean that you can boot into the CD/USB version of Arch. If /usr/bin is toast then you can't chroot but that's OK. See pacman --root for making the pacman on CD update your broken folders.
See how to reinstall all packages in the system?
A semi competent assistant on site can get your system booted to the CD/USB and enable ssh so you can get in to do the repair.
Last edited by severach (2015-12-07 06:19:18)
Offline
This is an OVH dedicated server running Arch, they have some sort of recovery console you can SSH into. It's some sort of very basic Linux, not Arch so I assume I can't run Pacman.
I tried symlinking like you suggested and it didn't help fix anything. Unfortunately I can't see the error messages either since it's a remote server.
Offline
Without better info on what's destroyed I can take another stab.
Sounds like the recovery console has some Internet access. Install the core system onto any computer in the junk box. tar up the /usr/bin folder, ftp, and untar on the broken server. Once you've cobbled up enough to boot or chroot then pacman can fix the rest--assuming you haven't destroyed /etc or /var.
Seems to me the entire Arch OS could be installed this way.
Offline
What did you do to mangle /bin?
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
And how did you initially install arch? You should be able to take a few bits from that initial procedure to get to a point where you can use pacman --root.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
This is an OVH dedicated server running Arch, they have some sort of recovery console you can SSH into. It's some sort of very basic Linux, not Arch so I assume I can't run Pacman.
You mean the recovery console is not Arch but it lets you mount your Arch file-systems? Can you do that and chroot in?
Offline
Thanks for the advice everyone.
I've managed to fix things to the point that I can chroot into the Arch system.
Before I destroy things even worse, what pacman commands should I issue in an attempt to fix this mess?
Offline
If you could chroot in, then /usr/bin/bash must be there - and I suspect the /bin symlink is likely in place (as I *think* the chroot process calls /bin/bash - but I could be wrong on this part).
Look around (with ls -l), see what's there and report back.
Also the following should be very useful:
pacman -Qk | grep -v ' 0 missing'If that returns nothing, you should be in good shape - but I'd do a pacman -Syu too. If on the otherhand the -Qk lists some packages missing files, you will most likely need to reinstall those packages - but first, just list the output here.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for the quick response!
I actually reinstalled all packages with pacman (pacman -Qenq | pacman -S -) and lo and behold, the system boots again as normal.
Thanks for the help everyone.
Last edited by stabwound (2015-12-07 16:50:55)
Offline
# pacman -Qenq | wc -l
274
# pacman -Qnq | wc -l
1112I think pacman -e might be a mistake. For my system pacman will only reinstall the 274 explicitly installed packages. Files for the remaining 800+ packages may remain missing.
The drawback is that after reinstalling, all 1112 packages will be marked as explicit. Maybe someone else will come up with a clever command line to prevent this.
Offline
The drawback is that after reinstalling, all 1112 packages will be marked as explicit. Maybe someone else will come up with a clever command line to prevent this.
Pacman doesn't change the install reason on a reinstall.
Offline
Pages: 1