You are not logged in.

#1 2022-10-15 14:14:57

A-Fellow-Human
Member
Registered: 2022-10-15
Posts: 37

Can't seem to update Linux properly

Whenever I try to install Linux, the following happens:

warning: linux-6.0.1.arch2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-6.0.1.arch2-1

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

:: Proceed with installation? [Y/n] y
(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%
:: Processing package changes...
(1/1) reinstalling linux                                                                                                                                                  [#########################################################################################################] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating module dependencies...
(3/4) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/efi/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/efi/initramfs-linux.img
==> Starting build: 5.19.13-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [resume]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
==> ERROR: module not found: `usbhid'
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> ERROR: module not found: `vfat'
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating xz-compressed initcpio image: /boot/efi/initramfs-linux.img
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/efi/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/efi/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.19.13-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [resume]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
==> ERROR: module not found: `usbhid'
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> ERROR: module not found: `vfat'
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating xz-compressed initcpio image: /boot/efi/initramfs-linux-fallback.img
==> WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctly
(4/4) Refreshing PackageKit...

Even though linux-headers is up to date.
How can I properly update?

Offline

#2 2022-10-15 15:07:01

astralc
Member
Registered: 2022-09-17
Posts: 127

Re: Can't seem to update Linux properly

it try to build initcpio for other kernel. (this will cause the error you see)
can you give output of "uname -r" and "pacman -Q linux"
(also linux-headers is not needed for mkinitcpio)
what happen if you run "mkinitcpio -p linux"? same error?

do you have the same issue with linux-lts?

Offline

#3 2022-10-15 15:19:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Can't seem to update Linux properly

It's building a initrd for /boot/efi/vmlinuz-linux, which is not where the package is putting the kernel. Looks like you've done some customization to move it, but missed changing the hook that actually installs it.

Offline

#4 2022-10-15 15:56:33

A-Fellow-Human
Member
Registered: 2022-10-15
Posts: 37

Re: Can't seem to update Linux properly

Thanks Scimmia! I was able to fix it with "sudo mv /boot/vmlinuz-linux /boot/efi/vmlinuz-linux".

Offline

#5 2022-10-15 15:57:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Can't seem to update Linux properly

That fixes it once and once only. You need to actually fix your system configuration. If you need help, start by telling us what you've already done and what you're trying to accomplish.

Offline

#6 2022-10-15 16:03:56

A-Fellow-Human
Member
Registered: 2022-10-15
Posts: 37

Re: Can't seem to update Linux properly

Right yeah. So I've changed the stuff in "/etc/mkinitpcio.d/linux.preset" to

# mkinitcpio preset file for the 'linux' package on archiso

PRESETS=('default' 'fallback')

ALL_kver='/boot/efi/vmlinuz-linux'
ALL_config='/etc/mkinitcpio.conf'

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/efi/initramfs-linux.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/efi/initramfs-linux-fallback.img"
fallback_options="-S autodetect"

(and similarly for zen and lts)

Because my boot drive mounts at /etc/fstab, but for some reason vmlinuz-linux is being saved at /boot instead.

Last edited by A-Fellow-Human (2022-10-15 16:04:32)

Offline

#7 2022-10-15 17:46:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Can't seem to update Linux properly

You missed the part where I asked what you're trying to accomplish. WHY do you need the kernel/initramfs in /boot/efi/?

Offline

#8 2022-10-15 18:11:12

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Can't seem to update Linux properly

Why are you mounting your boot drive at /etc/fstab? What's the output of

lsblk

?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2022-10-16 03:31:23

A-Fellow-Human
Member
Registered: 2022-10-15
Posts: 37

Re: Can't seem to update Linux properly

When I updated from 5.19.12 to 5.19.13, I had issues where systemd was trying to read vmlinuz-linux e.t.c. from /boot/efi when it was being saved at /boot, so I changed the location of the kernel install.
The output of lsblk is

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    1  14.3G  0 disk 
├─sda1        8:1    1   2.1G  0 part 
└─sda2        8:2    1    80M  0 part 
nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0   499M  0 part 
├─nvme0n1p2 259:2    0    99M  0 part 
├─nvme0n1p3 259:3    0    16M  0 part 
├─nvme0n1p4 259:4    0   345G  0 part 
├─nvme0n1p5 259:5    0   585G  0 part /
└─nvme0n1p6 259:6    0  1000M  0 part /boot/efi

Offline

#10 2022-10-16 05:07:30

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Can't seem to update Linux properly

I recommend fixing where systemd looks for things rather than moving them. When you say systemd looked in /boot/efi/ what do you mean exactly? Are you using systemd-boot?

Otherwise, you need to make sure the kernel is installed in /boot/efi/ when your kernel package is updated.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2022-10-16 10:41:13

A-Fellow-Human
Member
Registered: 2022-10-15
Posts: 37

Re: Can't seem to update Linux properly

Yeah I meant systemd-boot.

Offline

#12 2022-10-16 10:55:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Can't seem to update Linux properly

Except you didn't change the location of the kernel install.

OK, so you need the kernel/initramfs on the ESP. Why not just mount that to /boot, then, instead of /boot/efi/?

Offline

Board footer

Powered by FluxBB