You are not logged in.

#1 2024-12-21 10:49:59

Banzayka
Member
Registered: 2024-12-21
Posts: 12

[Solved] Can not boot to Arch Linux after attempt to update

Hi,

I had a working Arch Linux system till the moment I run "Pacman -Syu". In the middle of update process system hung up and I had to reboot.

Now I can't boot back, since file "/vmlinuz-Linux not found".

I read several forums and generally understood that I need to 1) pacman -Syu linux and 2) mkinitcpio -P to get the missing file.

Output of fdisk -l is as follows: /dev/nvme0n1p1 - EFI system; /dev/nvme0n1p2 - Microsoft reserved; /dev/nvme0n1p3 - Microsoft basic data; /dev/nvme0n1p4 - Windows recovery environment; /dev/nvme0n1p5 - Microsoft basic data; /dev/nvme0n1p6 - Windows recovery environment

/dev/nvme0n1p7 - Linux filesystem (150G - this is my system); /dev/nvme0n1p8 - Linux filesystem (355G - this is my /home); /dev/nvme0n1p9 - Linux swap

Tried to replicate described steps, e.g.:

    - booted from live usb

    - mount /dev/nvme0n1p7 /mnt and /dev/nvme0n1p1 to /mnt/boot

    - but still can not run "arch-chroot /mnt" - "failed to run command /usr/bin/bash - no such file or directory"

Your advices will be of great help!

Many thanks in advance

Last edited by Banzayka (2025-01-11 17:39:15)

Offline

#2 2024-12-21 10:55:01

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

So what is on /dev/nvme0n1p7 then?

ls /mnt

Are you using subvolumes or LVM?

EDIT: you don't need to run mkinitcpio, reinstalling the kernel image(s) will do that automatically.

Last edited by Head_on_a_Stick (2024-12-21 10:56:01)


Para todos todo, para nosotros nada

Offline

#3 2024-12-21 12:36:57

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

Head_on_a_Stick wrote:

So what is on /dev/nvme0n1p7 then?

ls /mnt

Are you using subvolumes or LVM?

EDIT: you don't need to run mkinitcpio, reinstalling the kernel image(s) will do that automatically.

Output is as follows:
bin -> usr/bin; boot; efi; etc; home; lib -> usr/lib; lib64 -> usr/lib; lost+found; media; mnt; opt; proc; root; run; sbin -> usr/bin; srv; sys; tmp; usr; var; zoneinfo -> usr/share/zoneinfo

No, I don't use subvolumes or LVM

Offline

#4 2024-12-21 12:50:32

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

So is /mnt/usr/bin/bash there?

You could try using pacstrap to reinstall stuff from the ISO image but if bash is missing it might be best to just restore the system from your backup.


Para todos todo, para nosotros nada

Offline

#5 2024-12-21 14:22:46

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

Head_on_a_Stick wrote:

So is /mnt/usr/bin/bash there?

You could try using pacstrap to reinstall stuff from the ISO image but if bash is missing it might be best to just restore the system from your backup.

Yes, all executables are there, including /mnt/usr/bin/bash and zsh as well.
I really do not understand why chroot/arch-chroot can not find it, while root partition is for sure mounted

Offline

#6 2024-12-21 15:00:51

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

Try fsck on the root partition & ESP. The FAT filesystem on the ESP breaks very easily so you will probably have to fix that anyway.

What do the `file` & `stat` commands say about /mnt/usr/bin/bash? Is it a 64-bit executable?


Para todos todo, para nosotros nada

Offline

#7 2024-12-21 19:29:08

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

Same as https://bbs.archlinux.org/viewtopic.php … 3#p2215793 - use the install iso pacman - bash might fail to execute for some broken library etc.

Offline

#8 2024-12-23 06:18:09

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:

Same as https://bbs.archlinux.org/viewtopic.php … 3#p2215793 - use the install iso pacman - bash might fail to execute for some broken library etc.

Thank you for help!
1) Tried to run this command from the advised link

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu $(pacman --root=/mnt -Qqn)

Pacman reported a lot of errors for various packages "...signature ... is unknown trust, ... file is corrupted, do you want to delete it?
2) To fix signatures issues run

pacman -Sy archlinux-keyring && pacman -Syu

3) After command #1 re-run got error - "Partitoin / too full: 201047 blocks needed, 59661 blocks free"
4) Command

df -h

shows low usage for everything except for:
/dev/loop0 - 100% mounted on /run/archiso/airootfs
/dev/nvme0n1p7 - 38% mounted on /mnt
5) in desperation run both

pacman -Sc

and

pacman -Scc

with no result

To sum up, I neither can chroot to the old system nor do anything with live environment.
Is there still any chance to save this system or my only variant is to do fresh install? By my own stupidy I didn't do any backups

Offline

#9 2024-12-23 09:08:35

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

To fix signatures issues run

You're using an older iso? (You'll have to do this after a reboot, since you're updating the keyring on the volatile install is filesystem)

After command #1 re-run got error - "Partitoin / too full: 201047 blocks needed, 59661 blocks free"

Do NOT! run "pacman -Syu" on the isntall iso (that's the full root partition)
Updating the keyring will do, then proceed w/

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu $(pacman --root=/mnt -Qqn)

to re-install packages on the installed system.

Is there still any chance to save this system or my only variant is to do fresh install?

Yes, don't panic or flail - if there're other issues you cannot solve, just ask.

Maybe it helps to understand that we'll use the pacman from the installation iso to fix the installed system.

Offline

#10 2024-12-23 11:49:35

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:

to re-install packages on the installed system.

So, I (1) rebooted, (2) updated keyrings & (3) run

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu $(pacman --root=/mnt -Qqn)

Installation stopped at some point with message "Errors occurred, no packages were upgraded", problem is that I cant see these errors, since there is no possibility to scroll messages in window. None of the variants of buttons combination I managed to find in the web works (ctrl+shift+arrow keys, just shift or ctrl with arrow keys, pg up/down, etc), mouse wheel does not work either.

The last thing I can see  - pacman spams that a lof of svg images related to adwaita-icon-theme exists in filesystem, but hardly ever this can be a reason for upgrade process interruption?

Offline

#11 2024-12-23 12:55:16

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

Add this onto the end of the command string:

> command.log 2>&1

^ that should send the output to a command.log file in the current working directory.

Last edited by Head_on_a_Stick (2024-12-23 12:55:43)


Para todos todo, para nosotros nada

Offline

#12 2024-12-23 13:14:06

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

From the errors, run

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --dbonly -Syu $(pacman --root=/mnt -Qqn)

first to fix the databases (nb. "--dbonly") then

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu $(pacman --root=/mnt -Qqn)

to actually re-install the packages.

If you still run into errors, we'll however have to see them.

Offline

#13 2024-12-23 14:26:55

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:

From the errors, run

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --dbonly -Syu $(pacman --root=/mnt -Qqn)

first to fix the databases (nb. "--dbonly")

Failed already here:
"ldconfig: file /usr/lib/libgcc_s.so.1 is empty, not checked"                   [this message is for approx. 40-50 libs]

"::Running post-transaction hooks...
(1/19) Updating the MIME type database...
call to execv failed (Exec format error)                                                 [this line and the next one is valid for all 19 cases]
error: command failed to execute correctly"

Cases:
(2/19) Rebuilding certificate stores; (3/19) Install DKMS modules; (4/19) Restarting cronie for libc upgrade; (5/19) Updating linux initcpios; (6/19) Updating the appstream cache; (7/19) Restarting accounts-daemon; (8/19) Reloading system bus configuration; (9/19) Warn about old perl modules; (10/19) Updating fontconfig cache; etc

Last edited by Banzayka (2024-12-23 14:28:00)

Offline

#14 2024-12-23 15:12:24

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

"ldconfig: file /usr/lib/libgcc_s.so.1 is empty, not checked"                   [this message is for approx. 40-50 libs]

That's irrelvant, ignore ldconfig and alpm hook errors on the first pass (the installation is still drasically broken) and plow through.
The -dbonly pass is *only* to prevent "file already exists" errors (well, and sanitize your pacman database…)

Offline

#15 2024-12-24 04:22:12

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:

That's irrelvant, ignore ldconfig and alpm hook errors on the first pass (the installation is still drasically broken) and plow through.

On the second pass smth really changed, at least a lot of packages have been re-installed.

From what I can see:
1) some commands failed to execute correctly due to /proc and /sys not being mounted
2) failed to write database /usr/lib/udev/hwdb.bin
3) cannot stat /dev/stdin - no such file of directory, error - unable to write to pipe (broken pipe)

Sounds already like a relief, afraid now even to breathe on pc. Can you pls. kindly advise correct list of futher actions?

Offline

#16 2024-12-24 09:41:05

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

From what I can see:

Sounds like the ALPM hooks, try to chroot [edit: arch-chroot] into the system, make sure the boot partition is correctly mounted and run "pacman -Syu linux" (to re-install the kernel, trigger the mkinitcpio hooks etc, there should™ be no errors - the "maybe you lack some fringe firmware for hardware nobody uses" warnings aside)

Last edited by seth (2024-12-24 09:41:23)

Offline

#17 2024-12-25 18:44:23

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:

try to chroot [edit: arch-chroot] into the system, make sure the boot partition is correctly mounted

Finally I managed to arch-chroot smile

1) Just to ensure that I got idea correctly - if my setup does not assume separate boot partition, which I assume generally is ok (as per the wiki), does it mean that there is no need to do anything in addition, e.g. /mnt is mounted to root, folder /mnt/boot already exists?

seth wrote:

run "pacman -Syu linux"

2) got an error - failed to commit transaction (conflicting files)
poppler: /usr/include/poppler/StructTreeRoot.h already exists in filesystem

Tried to read & understand what wiki says:

pacman -Qo /usr/include/poppler/StructTreeRoot.h 
error: No package owns /usr/include/poppler/StructTreeRoot.h

pacman -S --overwrite glob poppler
error: failed to prepare transaction (could not satisfy dependencies)
installing poppler(24.12.0-1) breaks dependency 'poppler=24.11.0' required by poppler-glib
installing poppler(24.12.0-1) breaks dependency 'poppler=24.11.0' required by poppler-qt5
installing poppler(24.12.0-1) breaks dependency 'poppler=24.11.0' required by poppler-qt6

pacman -Rns poppler-glib
error: failed to prepare transaction (could not satisfy dependencies)
removing poppler-glib breaks dependency 'poppler-glib' required by localsearch
removing poppler-glib breaks dependency 'poppler-glib' required by sane
removing poppler-glib breaks dependency 'libpoppler-glib.so=8-64' required by sane

pacman -Rns poppler-gt5
error: failed to prepare transaction (could not satisfy dependencies)
removing poppler-qt5 breaks dependency 'poppler-qt5' required by kfilemetadata5

pacman -Rns poppler-gt6
error: failed to prepare transaction (could not satisfy dependencies)
removing poppler-qt6 breaks dependency 'poppler-qt6' required by kfilemetadata
removing poppler-qt6 breaks dependency 'poppler-qt6' required by cantor
removing poppler-qt6 breaks dependency 'poppler-qt6' required by okular

How to solve conflict if neither update nor remove works, what is incorrect in my actions?

Offline

#18 2024-12-27 00:16:01

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

◉ pacman -F StructTreeRoot.h # you might have to -Fy first, but it's not relevant atm anyway and will only tell you that this is from poppler
◉ sudo pacman -S --dbonly poppler; sudo pacman -S poppler
◉ sudo pacman -Syu linux

Last edited by seth (2024-12-27 00:16:15)

Offline

#19 2024-12-28 18:46:19

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:
 pacman -F StructTreeRoot.h 

extra/poppler 24.12.0-1 [installed: 24.12.0-2]
usr/include/poppler/StructTreeRoot.h

seth wrote:
 sudo pacman -S --dbonly poppler;

error: failed to prepare transaction (could not satisfy dependencies)
installing poppler(24.12.0-1) breaks dependency 'poppler=24.11.0' required by poppler-glib
installing poppler(24.12.0-1) breaks dependency 'poppler=24.11.0' required by poppler-qt5
installing poppler(24.12.0-1) breaks dependency 'poppler=24.11.0' required by poppler-qt6

seth wrote:
 sudo pacman -S poppler; 

exactly the same error as previous one

seth wrote:
 sudo pacman -Syu linux 

failed to commit transaction (conflicting files)
poppler: /usr/include/poppler/StructTreeRoot.h exists in filesystem

Offline

#20 2024-12-28 19:37:22

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

Don't run partial updates, but you can

sudo pacman -Sdd --dbonly poppler

to sanitize the database and then

pacman -Syu poppler linux

Offline

#21 2024-12-29 17:20:11

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:
pacman -Syu poppler linux

At least early initcpio image generation was succesfull.

Starting build: '6.6.68-1-lts'
WARNING: Possibly missing firmware for module: 'xhci_pci'

ERROR: module not found: 'nvidia'

WARNING: Errors were encountered during the vuild. Image may not be complete.
error: command failed to execute correctly

warn about old perl modules 
error: No package owns /usr/lib/per15/5.38

Will full system upgrade help to fix the remaining issues or I should do smth else instead?

Offline

#22 2024-12-29 20:19:41

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

pacman -Qs nvidia

Will full system upgrade help to fix

pacman -Syu poppler linux

*did* a full update (and explicitly re-install poppler and linux, but appanrently you're - also? - using linux-lts)

Offline

#23 2024-12-30 08:53:27

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:
pacman -Qs nvidia
local/egl-gbm 1.1.2-1 The GBM EGL external platform library
local/egl-wayland 4:1.1.17-1 EGLStream-based Wayland external platform
local/egl-x11 1.0.0-1 NVIDIA XLib and XCB EGL Platform Library
local/envycontrol 3.5.1-1 CLI tool for Nvidia Optimus graphics mode switching on Linux
local/libvdpau 1.5-3 Nvidia VDPAU library
local/nvidia 565.77-9 NVIDIA kernel modules
local/nvidia-utils 565.77-2 NVIDIA drivers utilities
local/supergfxctl 5.1.1-2 A utility for Linux graphics switching on Intel /AMD iGPU +nVidia dGPU laptops
local/vulkan-nouveau 1:24.3.2-1 Open-source Vulkan driver for Nvidia GPUs  
seth wrote:

*did* a full update (and explicitly re-install poppler and linux, but appanrently you're - also? - using linux-lts)

I think there always were 2 kernels - one actual and one lts, at least that is what I observed on the system

Last edited by Banzayka (2024-12-30 08:55:58)

Offline

#24 2024-12-30 09:00:39

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

Re: [Solved] Can not boot to Arch Linux after attempt to update

For the lts kernel you'd also want nvidia-lts

Offline

#25 2025-01-11 17:38:07

Banzayka
Member
Registered: 2024-12-21
Posts: 12

Re: [Solved] Can not boot to Arch Linux after attempt to update

seth wrote:

For the lts kernel you'd also want nvidia-lts

Apologies for the belated reply. Many thanks for your kind help, greatly appreciated. System now works and I'm supper happy!

Offline

Board footer

Powered by FluxBB