You are not logged in.

#1 2023-08-01 13:35:11

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

accidentally deleted /usr/bin can't chroot back

my typos finally caught up with me what was meant to be a forward slash turned to a space and now I am stuck on live enviroment with no idea what to do

mount /dev/nvme0n1p3.    (ext4)
arch-chroot /mnt

failed to run command "/bin/bash" no such file or directory

bash really doesn't exist on the system anymore
any help is appreciated smile

Offline

#2 2023-08-01 13:48:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,120

Re: accidentally deleted /usr/bin can't chroot back

Offline

#3 2023-08-01 14:20:05

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: accidentally deleted /usr/bin can't chroot back

pacman -Syu --sysroot /mnt
error failed retrieving file 'core.db' from (mirror)
warning: too many errors from (mirror) skipping

does that for all mirrors
I do have internet connection
what am I doing wrong?

Last edited by shaked (2023-08-01 14:20:24)

Offline

#4 2023-08-01 14:23:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,120

Re: accidentally deleted /usr/bin can't chroot back

what am I doing wrong?

You're not posting the actual output…

Also the command there will NOT re-install all packages… bbs botched the link a bit but that's not an excuse to do random stuff.

Offline

#5 2023-08-01 14:41:16

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: accidentally deleted /usr/bin can't chroot back

I am unable to post actual output because I don't have an available computer to ssh into the live install I am writing this on my phone

with these flags and arguments it seems to go Much further but alas still fails

> pacman -S --sysroot /mnt $(pacman -Qnq)

warning: (packages) is up to date -- reinstalling
..
..
..
..


resolving dependencies...
:: iptables and iptables-nft are in conflict. remove iptables-nft? [y/N] y
:: gnu-netcat and openbsd-netcat are in conflict remove openbsd-netcat? [y/N] y

Packages (398) "lists all system packages"
total download size: 124.58mb
total install size: 1629.91mb
net upgrade size: 327.06mb

proceed with installation? [Y/n] y
error: could not open file:  /etc/mtab: no such file or directory
error: could not determine filesystem mount points
error: failed to commit transaction (unexpected error)
Errors occurred no packages were upgraded.

Last edited by shaked (2023-08-01 14:42:46)

Offline

#6 2023-08-01 14:47:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,120

Re: accidentally deleted /usr/bin can't chroot back

"foobar 2>&1 | tee /tmp/whatamidoing.txt", then see the 1st link below.

Did you

The wiki wrote:

See Chroot#Using chroot on how to mount the necessary filesystems required by --sysroot.

(pacman --sysroot might still fail because of the lost /bin on the chroot in which case you'll have to use --root)

Sanity check (just occurred to me that you've probably not checked that)

stat /mnt/usr/bin/bash

Offline

#7 2023-08-01 14:58:15

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: accidentally deleted /usr/bin can't chroot back

Have you tried just doing another pacstrap  to install the core system again?

Offline

#8 2023-08-01 15:08:33

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,557
Website

Re: accidentally deleted /usr/bin can't chroot back

Mod note: merging two active duplicate topics.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB