You are not logged in.

#1 2024-02-10 16:57:16

jcr
Member
Registered: 2022-12-21
Posts: 19

System is broken and I cannot reinstall anything, even from ISO

Hi,

My system kind of broke itself after I let my hard drive get full.
I used an arch iso to make some cleaning into the system, deleting also some btrfs snapshots so I would be sure to get free space.
I then tried to reinstall some things so everything would be fine.
I tried reinstalling the kernel while chroot, but got this error while mkinitcpio was running :

fatal library error, lookup yourself

I can install re-install other things fine from inside the chroot.

Since some things seemed really broken, I tried to install it from outside the install.

If i try to install anything from the ISO with

pacman --root myinstall -Syu linux

I get the following errors :

join: /dev/fd/63: No such file or directory
comm: /dev/fd/62: No such file or directory
Error, do this: mount -t proc proc /proc
parallel: Error: Shell '/usr/bin/zsh' not found
tee: /tmp/tmp.JUniCuVyTL/9434: No such file or directory
comm: /dev/fd/62: No such file or directory
tee: /tmp/tmp.JUniCuVyTL/1329: No such file or directory
comm: /dev/fd/62: No such file or directory

I decided I wanted to reinstall everything from the start. From the ISO i tried :

pastrap myinstall base base-devel

But still get the error :

parallel: Error: Shell '/usr/bin/zsh' not found

I tried googling all errors along the way but nothing close to my problem appeared.
I'm at a loss. What is happening ? What can I try ?

EDIT :
I can still kind of boot into the original system directly. My WM (qtile wayland) does start. But things crash after a few seconds. I can launch a terminal but not even get a prompt.

Last edited by jcr (2024-02-10 17:08:02)

Offline

#2 2024-02-10 17:07:31

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

What is "myinstall"?
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

Also that looks more like a botched chroot or using sysroot?
Don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

And you'll likely also have to issue --cachedir

Offline

#3 2024-02-10 17:09:39

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Yes sorry. Myinstall is the folder in /mnt where I mounted my installation.

Where should I ussue --cachedir ?

Offline

#4 2024-02-10 17:12:56

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

The folder in "/mnt"?
And along "--root /mnt --cachedir /mnt/var/cache/pacman/pkg"

This however doesn't explain anything about the bogus /proc situation.
Do NOT chroot into the system for this!

Offline

#5 2024-02-10 17:20:35

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Yeah sorry I'm not being clear at all. I'm a bit stressed out.

I create a folder in /mnt from the ISO, called myinstall, where I mounted my actual installation (I don't know why, I have the habit of creating a folder instead of mount directly to /mnt.
Issuing the command with --cached-dir added, I get the same error that I had while chrooted into the system :

join: /dev/fd/63: No such file or directory
comm: /dev/fd/62: No such file or directory
Error, do this: mount -t proc proc /proc
parallel: Error: Shell '/usr/bin/zsh' not found
tee: /tmp/tmp.JUniCuVyTL/9434: No such file or directory
comm: /dev/fd/62: No such file or directory
tee: /tmp/tmp.JUniCuVyTL/1329: No such file or directory
comm: /dev/fd/62: No such file or directory

Offline

#6 2024-02-10 17:31:47

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Sorry, it seems I made a mistake (I ran your command without changing the mount point).

If i issue :

pacman --root myinstall --cachedir /mnt/myinstall/var/cache/pacman/pkg -Syu linux

I get

:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)

Edit :
I rebooted from the ISO and remounted my install. I retried issueing the command and I now get this :

:: Synchronizing package databases...
 core downloading...
 extra downloading...
warning: linux-6.7.4.arch1-1 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-6.7.4.arch1-1

Total Installed Size:  130.75 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
reinstalling linux...
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating module dependencies...
(3/4) Updating linux initcpios...
/usr/share/libalpm/scripts/mkinitcpio: line 23: /dev/fd/63: No such file or directory
error: command failed to execute correctly
(4/4) Checking which packages need to be rebuilt
join: /dev/fd/63: No such file or directory
comm: /dev/fd/62: No such file or directory
Error, do this: mount -t proc proc /proc
lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
tee: /tmp/tmp.x2ttB1r8O0/31865: No such file or directory
comm: /dev/fd/62: No such file or directory
tee: /tmp/tmp.x2ttB1r8O0/19463: No such file or directory
comm: /dev/fd/62: No such file or directory

Last edited by jcr (2024-02-10 17:49:11)

Offline

#7 2024-02-10 17:59:17

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Ok I have some new information.

If I do

ls /mnt/myinstall/dev

(when my installation is mounted at /mnt/myinstall), the output is

null

This doesn't seem good...

Offline

#8 2024-02-10 18:06:24

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

--root /mnt/myinstall - you're using devpts and sysfs and procfs from the iso anyway as long as you don't try to chroot into the system.

/dev/fd/63 is a pipe and tghe problem you have is w/ the mkinicpio hook.
Install the kernel, arch-chroot into the system and run mkoinitcpio manually, resp. at this point you might actuallly be able to run pacman from the chroot or use --sysroot

Offline

#9 2024-02-10 18:10:10

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

mkinitcpio from inside chroot give :

==> ERROR: '/lib/modules/6.7.2-arch1-2' is not a valid kernel module directory

EDIT : Indeed, the directory does not even exist. In /lib/modules there is only

6.6.16-1-lts 6.7.4-arch1-1

Last edited by jcr (2024-02-10 18:17:55)

Offline

#10 2024-02-10 20:24:18

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

6.7.2-arch1-2 is going to be the version of the install iso, select the relevant version(s) w/ "-k", https://man.archlinux.org/man/core/mkin … tcpio.8.en

Offline

#11 2024-02-10 22:39:26

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Ok, so I did just that, and mkinitcpio succeeded. However, rebooting brought me back to square one. The system still doesn't work, and rebooting into the arch iso behaves exactly the same as before.

Offline

#12 2024-02-10 22:40:51

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

pacman --root /mnt/myinstall -Qikk > /tmp/howbadisit.txt
cat /tmp/howbadisit.txt | curl -F 'file=@-' 0x0.st

Offline

#13 2024-02-10 23:31:16

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

There was an error, output was empty so nothing was written in the file.
With stderr redirected:
http://0x0.st/HdSu.txt

EDIT : my bad, wrote -root instead of --root.
http://0x0.st/HdSS.txt

Last edited by jcr (2024-02-10 23:35:14)

Offline

#14 2024-02-10 23:35:00

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

error: failed to initialize alpm library:
(root: oot, dbpath: oot/var/lib/pacman/)
could not find or read directory

"oot"?

Offline

#15 2024-02-10 23:36:09

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Sorry, I edited the previous message but you answered before that. Link with the right command : http://0x0.st/HdSS.txt

Offline

#16 2024-02-11 00:03:45

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

Me sorry, too for fumbling an "i" in there, but there's nothing overly suspicious.

Maybe elaborate on

The system still doesn't work

This here:

My WM (qtile wayland) does start. But things crash after a few seconds. I can launch a terminal but not even get a prompt.

?
Some broken ~/.zshrc or ~/.*profile ?
Can you change your default shell to bash?
Or log in as root on the console and "sudo -u jcr bash"? "sudo -u jcr zsh"?

Offline

#17 2024-02-11 00:10:33

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

I don't usually use zsh, but bash. I don't understand where the zsh not found message came from earlier.
I can't even login on the console. Well, I do, but I then get a blinking cursor and nothing else. This is the same as when I run a terminal in qtile (blinking cursor with nothing happening).
If I launch something else in qtile, like firefox, it crashes in a few seconds.

Edit : I have to go to sleep. Thanks for your help until now. I'll get back to it tomorrow morning.

Last edited by jcr (2024-02-11 00:16:45)

Offline

#18 2024-02-11 08:22:36

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

Inspect your bashrc/profle
Can you login (on the console) as root or a new user?

firefox, it crashes in a few seconds

https://wiki.archlinux.org/title/Core_d … _core_dump

Offline

#19 2024-02-11 08:33:21

jcr
Member
Registered: 2022-12-21
Posts: 19

Re: System is broken and I cannot reinstall anything, even from ISO

Update : I tried again this morning.

Booted into the ISO, chrooted properly, reinstalled the kernel which worked without error.

After that I rebooted and logged in directly to a tty.
It hanged for a few long seconds, raised me an error (which I forgot to write down...) with in relation to pyenv (https://archlinux.org/packages/extra/any/pyenv/), but let me access a tty where everything worked.
Went back to my display manager, logged into qtile. Everything worked fine.

I rebooted, did the same thing, everything worked, without even getting the pyenv error.

I still have no idea what happened. I can't even tell if I just didn't wait long enough yesterday when I booted into the system. What I'm pretty sure of is that at least half the problems I had yesterday with trying to reinstall things was me issuing wrong commands / missing some steps before chrooting. I guess I was tired and needed my system to work, so I panicked, and tried things out way to quickly, which might have made the problem worse. I'm mad at me right now - I should know better.
I consider this fixed for now. I will investigate today to see if I can understand better, and will add a reply here if I find something interesting. If not, I'll just mark the thread as solved by the end of the day and consider this was just me piling up mistakes on top of over mistakes, trying to fix something that wasn't really broken in the first place.

My sincerest apologies to seth, reading the thread this morning made me realize how hard I was to work with yesterday, and how you never lost patience. You're a blessing for this community.

Offline

#20 2024-02-11 09:15:44

seth
Member
Registered: 2012-09-03
Posts: 48,821

Re: System is broken and I cannot reinstall anything, even from ISO

Check your shell configs, wrt. "pyenv", do you use ibus?

Offline

Board footer

Powered by FluxBB