You are not logged in.

#1 2024-12-16 01:33:12

badelf
Member
Registered: 2021-05-07
Posts: 8

pacstrap mkinitcpio failure

I did an update and if failed miserably because the separate boot partition (from original Windows install) was too small. I used a live Ubuntu stick to expand the boot partition and it looks okay. But that's not my problem.

The problem is I can't boot because I don't have a valid initramfs - I even tried the fallback and that won't boot.

I thought I could fix it by using a live Arch stick and re-installing the basics... I followed the installation wiki
1. connected wifi
2. set system time
3. mounted the root partition at /mnt and the /boot partition at /mnt/boot
4. run pacstrap -K /mnt base linux linux-firmware (probably only had to run linux.
5. starts normally - even says re-installing etc.

The it fails on mkinitcpio!
error /usr/share/libalpm/scripts/mkinitcpio
line 74
/dev/fd/63 has too many levels of symbolic links

I looked at the scrip and line 74 is  the read_preset() { definition line

How can the installation work if the script throws an error?

PART TWO - I thought I could run mkinitcpio manually but that failed with a different error
rebooted the arch thumb drive, then did the same first 3 steps above, then
arch-chroot into /mnt
mkinitcpio -P
and : ERROR proc must be mounted
?? I thought arch-chroot did that ??

Any ideas how I can to this short of wiping the partitions clean and starting fresh?

Bad Elf

Offline

#2 2024-12-16 10:54:42

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,738
Website

Re: pacstrap mkinitcpio failure

badelf wrote:

rebooted the arch thumb drive, then did the same first 3 steps above, then
arch-chroot into /mnt
mkinitcpio -P
and : ERROR proc must be mounted
?? I thought arch-chroot did that ??

Please provide the full, actual commands used rather than vague descriptions. Thanks.

Did you check the content of /proc/self/mounts after using arch-chroot? That will show if /proc/ is mounted correctly in the chroot.


Para todos todo, para nosotros nada

Offline

#3 2024-12-16 16:23:51

badelf
Member
Registered: 2021-05-07
Posts: 8

Re: pacstrap mkinitcpio failure

Head_on_a_Stick wrote:

Please provide the full, actual commands used rather than vague descriptions. Thanks.

Did you check the content of /proc/self/mounts after using arch-chroot? That will show if /proc/ is mounted correctly in the chroot.

1. iwctl - used this to scan and connect wifi. all good
2. timedatectl - clock sync'd time set to UTC (same as hardware clock)
3. mount /dev/nvmxxp6 /mnt
4. mount /dev/nvmxxp1 /mnt/boot
5. arch-chroot /mnt
6. cat /proc/self/mounts
result
Too many levels of symbolic links

!!

I don't know what to try next. Plain chroot doesn't work because there's no zsh (presumably in my /mnt)

Offline

#4 2024-12-16 16:48:36

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: pacstrap mkinitcpio failure

Plain chroot doesn't work because there's no zsh (presumably in my /mnt)

chroot /mnt /bin/bash -i

But before you do any of that (any chroot):

stat /mnt/proc
ls -l /mnt/proc

Offline

#5 2024-12-16 18:15:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,738
Website

Re: pacstrap mkinitcpio failure

Does this work:

arch-chroot /mnt /bin/su -

Para todos todo, para nosotros nada

Offline

#6 2024-12-16 23:31:20

badelf
Member
Registered: 2021-05-07
Posts: 8

Re: pacstrap mkinitcpio failure

seth wrote:

Plain chroot doesn't work because there's no zsh (presumably in my /mnt)

chroot /mnt /bin/bash -i

But before you do any of that (any chroot):

stat /mnt/proc
ls -l /mnt/proc

both of these say that /mnt/proc is a link to /proc
and there is nothing in /mnt/proc.

and chroot, mkinitcpio -P still says ERROR /proc must be mounted

Offline

#7 2024-12-16 23:33:27

badelf
Member
Registered: 2021-05-07
Posts: 8

Re: pacstrap mkinitcpio failure

Head_on_a_Stick wrote:

Does this work:

arch-chroot /mnt /bin/su -

No, works about the same with same errors

Offline

#8 2024-12-16 23:53:06

badelf
Member
Registered: 2021-05-07
Posts: 8

Re: pacstrap mkinitcpio failure

This seems hopeless. I'm going to wipe the system partition and the boot info,  and try it like a fresh install. I just hate the idea but I've already spent as much time as trying to rebuild my laptop.

Offline

#9 2024-12-17 03:31:16

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: pacstrap mkinitcpio failure

/mnt/proc ie the target /proc is supposed to be a directory but ends up being a self referencing symlinnk, probably result of a previous botched chroot attempt.

Offline

#10 2024-12-20 15:03:05

badelf
Member
Registered: 2021-05-07
Posts: 8

Re: pacstrap mkinitcpio failure

seth wrote:

/mnt/proc ie the target /proc is supposed to be a directory but ends up being a self referencing symlinnk, probably result of a previous botched chroot attempt.

I can't say why. I already lost 3 days doing basically the same thing over and over again with slight variations (and expecting different results?).
A fresh install fixed.
Now it's the painful process of finding all the stuff I forgot to re-install.
Thanks everyone for trying to help!! ?

Offline

#11 2024-12-20 15:06:31

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: pacstrap mkinitcpio failure

You would only have had to replace the bogus /mnt/proc symlink w/ a proper directory???
Next time maybe ask, I thought the explanation in #9 was obvious - sorry.

Offline

#12 2024-12-21 00:08:41

badelf
Member
Registered: 2021-05-07
Posts: 8

Re: pacstrap mkinitcpio failure

seth wrote:

You would only have had to replace the bogus /mnt/proc symlink w/ a proper directory???
Next time maybe ask, I thought the explanation in #9 was obvious - sorry.

I understood what you said, but it doesn't answer the question "How would I 'unbotch' an arch-chroot from a freshly booted thumb drive? There's a bug, or an incompatibility between versions, somewhere that I couldn't even begin to track down. This laptop is my daily driver, and I already wasted 3 days on this. Thanks for trying, though.

Offline

#13 2024-12-21 08:59:41

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: pacstrap mkinitcpio failure

"How would I 'unbotch' an arch-chroot from a freshly booted thumb drive?"

seth wrote:

You would only have had to replace the bogus /mnt/proc symlink w/ a proper directory

Offline

Board footer

Powered by FluxBB