You are not logged in.

#1 2023-08-07 20:15:16

owen2
Member
Registered: 2023-08-07
Posts: 2

[SOLVED]pacman installs kernel to /boot/, mkinitcpio generates to /efi

Everytime I update my kernel boot breaks. I configured a lot of my booting stuff before I was diagnosed with adhd and don't really know exactly what I did.

fstab mounts my vfat partition to /efi/. Mkinitcpio seems to try to generate an initramfs there (I say this bc when the partition is unmounted in emergency mode mkinitcpio says it fails to write to /efi/).

But, the kernel in /efi/ is an older version and the one in /boot/ seems to be up to date at 6.4.8-arch1-1.

When I have to fix the boot I manage to get in a emergency shell and then regenerate the initramfs in /boot/ on my root partition for the current version.

Anyways, I'm super confused. I don't really care if they end up in /boot/ or /efi/, but it seems like it should be /efi/ since that is the vfat partition. I don't know.

Let me know if any other information needs to be provided, thanks!


SOLUTION:

edited /etc/mkinitcpio.d/linux.preset to generate images to /boot/

Last edited by owen2 (2023-08-22 17:37:59)

Offline

#2 2023-08-07 22:08:06

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,557
Website

Re: [SOLVED]pacman installs kernel to /boot/, mkinitcpio generates to /efi

Pacman doesn't actually "install" the kernel images to /boot any more (hasn't since 2019) If you don't want to simply mount your $ESP to /boot, then I believe you can modify /etc/mkinitcpio.d/${kernelname}.preset to tell the mkinitcpio hook to use an alternative location to install the image. Never needed to use it myself, I just mount $ESP to /boot.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2023-08-14 22:15:00

owen2
Member
Registered: 2023-08-07
Posts: 2

Re: [SOLVED]pacman installs kernel to /boot/, mkinitcpio generates to /efi

I would love if someone could confirm if what I think is correct is correct.

say my ESP is /efi. it is /dev/nvme0n1p1 and is vfat formatted. This is where my bootloader (*.efi) files go and their associated modules and stuff. It would be GRUB's root.

My other partition, the ext4 /dev/nvme0n1p2 would be my root partition, defined in GRUB by the line that specifies my kernel. This is where my kernel and initramfs images live. My bootloader would then read these files and boot the kernel. Eventually /efi is mounted, but no longer used in the boot process?

I definitely caused some mayhem and confusion in these directories. If anyone has advice on starting over on this whole kernel/initramfs/bootloader stuff lmk

Also thank you WorMzy for the advice above, that was useful, although I've realized my confusion is a little deeper

Last edited by owen2 (2023-08-14 22:16:57)

Offline

#4 2023-08-14 22:25:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,237

Re: [SOLVED]pacman installs kernel to /boot/, mkinitcpio generates to /efi

What you think is generally correct yes. If mkinitcpio can't generate to /efi then this will be configuration you've adjusted relevantly somewhere at some point.

Offline

Board footer

Powered by FluxBB