You are not logged in.

#51 2023-12-07 20:43:43

seth
Member
Registered: 2012-09-03
Posts: 51,889

Re: [Solved] Error preparing initrd: Not Found after today update

The file being removed during the kernel update by the mkinicpio alpm hook does not explain the presence of an empty file at all.

so my guess is that it was some misconfiguration in some script which caused the presets not to be installed after being removed

And that affected exclsuively you and the massive other filesystem corruption documented in this thread is just coincidence.
Sure.

Online

#52 2023-12-08 00:10:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,614

Re: [Solved] Error preparing initrd: Not Found after today update

korimitsu wrote:

]
What I've seen is that before installing the new kernels, the previous ones are uninstalled (which nobody mentioned in this thread), removing alongside linux.preset and linux-lts.preset. Then it installs the new versions of the kernels with the new presets.
During this upgrade no issue happened, so my guess is that it was some misconfiguration in some script which caused the presets not to be installed after being removed.

No, that is not at all what happens. The preset files are never, ever removed by pacman on upgrade. An upgrade operation is separate and distinct from a remove operation.

Offline

#53 2023-12-09 18:25:03

korimitsu
Member
Registered: 2016-08-14
Posts: 123

Re: [Solved] Error preparing initrd: Not Found after today update

Scimmia wrote:

No, that is not at all what happens. The preset files are never, ever removed by pacman on upgrade. An upgrade operation is separate and distinct from a remove operation.

How's that they are removed and reinstalled when upgrading kernel? Can you explain that?

Offline

#54 2023-12-09 20:30:56

seth
Member
Registered: 2012-09-03
Posts: 51,889

Re: [Solved] Error preparing initrd: Not Found after today update

k: The sun btw. rises in the west, just so you know.
s: The sun exclusively rises in the east.
k: How's that the sun rises in the west? Can you explain that?
roll

I'll once again point out that even if files got removed and re-added that still doesn't explain why
1. you end up with an *empy* file in place
2. there were massive filesystem corruptions, way beyond the mkinitcpio presets.

Post you entire pacman log,

pacman -Qikk mkinitcpio
ls -lR /usr/share/libalpm/

and on a limb, do you maybe use https://aur.archlinux.org/packages/linux-keep-modules
(Though still would not explain the wider filesystem corruption…)

Online

#55 2023-12-09 22:23:15

korimitsu
Member
Registered: 2016-08-14
Posts: 123

Re: [Solved] Error preparing initrd: Not Found after today update

I confirm that pacman (directly or indirectly) removes the file:

Watch the file in one terminal:

$ sudo sysdig -p'%proc.pid,%proc.name' '(evt.type=unlinkat and (evt.arg.name=test or evt.arg.name=/etc/mkinitcpio.d/linux.preset)) or (evt.type=unlink and evt.arg.path=/etc/mkinitcpio.d/linux.preset)'
1994,rm

Open another terminal:

# pacman -S linux
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-6.6.4.arch1-1

Total Download Size:   128.68 MiB
Total Installed Size:  128.77 MiB
Net Upgrade Size:       -0.05 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 linux-6.6.4.arch1-1-x86_64               128.7 MiB  5.62 MiB/s 00:23 [#######################################] 100%
(1/1) checking keys in keyring                                        [#######################################] 100%
(1/1) checking package integrity                                      [#######################################] 100%
(1/1) loading package files                                           [#######################################] 100%
(1/1) checking for file conflicts                                     [#######################################] 100%
(1/1) checking available disk space                                   [#######################################] 100%
:: Running pre-transaction hooks...
(1/1) Removing linux initcpios...
:: Processing package changes...
(1/1) upgrading linux                                                 [#######################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/*-ucode.img
==> Starting build: '6.6.4-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/*-ucode.img
==> Starting build: '6.6.4-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keymap]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qla1280'
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
==> Image generation successful

It does not happen if I reinstall the kernel with the same version.

Offline

#56 2023-12-09 22:25:43

korimitsu
Member
Registered: 2016-08-14
Posts: 123

Re: [Solved] Error preparing initrd: Not Found after today update

No package acknowledges to have provided the file:

# pacman -Qo /etc/mkinitcpio.d/linux.preset 
error: No package owns /etc/mkinitcpio.d/linux.preset

Seems that this issue happened before:
[SOLVED] initcpio not being generated after kernel upgrade with pacman

Last edited by korimitsu (2023-12-09 22:27:05)

Offline

#57 2023-12-10 02:43:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,614

Re: [Solved] Error preparing initrd: Not Found after today update

Except, YET AGAIN, that has nothing to do with upgrades.

Go read the mkinitcpio alpm script that's responsible for that file. It does nothing at all to the presets on upgrade since the preset already exists. NOTHING.

Just because pacman removes and installs as part of the upgrade transaction, that means nothing at all for this.

Last edited by Scimmia (2023-12-10 03:37:56)

Offline

#58 2023-12-10 09:14:32

seth
Member
Registered: 2012-09-03
Posts: 51,889

Re: [Solved] Error preparing initrd: Not Found after today update

seth wrote:

Post you entire pacman log, [and]

pacman -Qikk mkinitcpio
ls -lR /usr/share/libalpm/

https://gitlab.archlinux.org/archlinux/ … type=heads
https://gitlab.archlinux.org/archlinux/ … type=heads
https://gitlab.archlinux.org/archlinux/ … =heads#L69
https://gitlab.archlinux.org/archlinux/ … =heads#L23

The thread you linked was down to a castrated system and the mkinitcpio script relying on the presence of some base[ic] tools.
This is only relevant if either
- you figured "i don't know how to sed, I'm not gonna lern sed, I need no stinking sed on my system"
- the tools used by the script were compromised DUE TO THE MASSIVE FILESYSTEM CORRUPTION BEYOND THE PRESET THAT YOU KEEP IGNORING

Online

#59 2023-12-10 18:26:23

korimitsu
Member
Registered: 2016-08-14
Posts: 123

Re: [Solved] Error preparing initrd: Not Found after today update

Offline

#60 2023-12-10 18:57:04

seth
Member
Registered: 2012-09-03
Posts: 51,889

Re: [Solved] Error preparing initrd: Not Found after today update

The commit got merged in 6.5-rc1 so all stable kernels that have
91562895f803 ("ext4: properly sync file size update after O_SYNC direct
IO") before 6.5 are corrupting data

The issue was caused exactly by the kernel upgrade. There's something wrong with the Arch kernel:

linux 6.6.1.arch1-1

and your most recent kernel is

linux-6.6.4.arch1-1-x86_64

and the thread started w/

linux-6.5.8.arch1-1 …  linux-lts-6.1.59-1

The only way this could possibly have been relevant is if you had been using the LTS kernel, but you also suggested to have re-installed all packages in the meantime.

=== Edit: apparently only 6.1.64 and 6.1.65 have been affected by the bug, so no - not relevant.

And you're so far the only reporter of anything like this.
And you're currently insisting on the preset being actively removed, what's not supposed to happen.

How about you post the pacman log and the mkinictpio integrity check.
The next thing I could suggest is to "set -x" the mkinitcpio alpm script to trace its execution and see whether it actually removes anything at any point.

Last edited by seth (2023-12-10 21:04:43)

Online

Board footer

Powered by FluxBB