You are not logged in.

#1 2020-04-27 12:32:14

muhlemmer
Member
Registered: 2020-04-27
Posts: 5

[SOLVED] No kernel image is /boot after installing linux package

Following the official guide, I've installed the "linux" package. However, there is not any vmlinuz image in /boot. https://wiki.archlinux.org/index.php/Kernel also mentions that the kernel should be installed under /boot. I've done:

pacstrap /mnt base linux linux-firmware

I've added some additional packages, like vim, dracut (personal preference), rEFInd and many more.

From the chroot environment I've also tried to re-install the "linux" package:

pacman -R linux
pacman -S linux

Still no kernel image under /boot

Boot is on a separate partition, but correctly mounted under /mnt/boot and available under /boot in the chroot. For instance, refind-install did not give any errors and files are there.

I've looked into the package files at https://www.archlinux.org/packages/core/x86_64/linux/ and none are listed for /boot. Currently trying to install version 5.6.7-arch1-1. Strange thing is, I've installed Arch two weeks ago on another laptop without issues. That was with linux 5.5. I don't have that laptop available anymore.

Last edited by muhlemmer (2020-04-27 16:20:44)

Offline

#2 2020-04-27 12:39:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [SOLVED] No kernel image is /boot after installing linux package

You'll have to do that manually for dracut since at least november: https://www.archlinux.org/news/new-kern … pio-hooks/

Offline

#3 2020-04-27 12:42:37

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] No kernel image is /boot after installing linux package

Mkinitcpio is responsible for putting the files in the boot folders, dracut can do that job also but needs some manual configuration .

Have you seen https://wiki.archlinux.org/index.php/Dr … el_upgrade ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2020-04-27 13:02:53

muhlemmer
Member
Registered: 2020-04-27
Posts: 5

Re: [SOLVED] No kernel image is /boot after installing linux package

V1del wrote:

You'll have to do that manually for dracut since at least november: https://www.archlinux.org/news/new-kern … pio-hooks/

As a curiosity, I  installed mkinicpio and it doesn't write a kernel image:

pacman -S mkinitcpio
mkinitcpio -k 5.6.7-arch-101 -g /boot/initramfs.img

IMHO a kernel installation that depends on initramfs implementation seems a bit weird and counter-intuitive. Especially if there is no mention in the docs. If I have some time, I will try to update the kernel wiki page with a note about this. However, even with mkinitcpio it does not work as the news article says... So what is the correct way and how could the documentation be improved?

Offline

#5 2020-04-27 13:07:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [SOLVED] No kernel image is /boot after installing linux package

It doesn't depend on initramfs implementation, the kernel image is located in /usr/lib/modules/$(uname -r)/vmlinuz , by current defaults mkinitcpio will copy that and generate an initramfs based on the pkgbase file at the same location (with relevant preset adjustments and file names suffixed with the pkgbase) and as linked you can setup dracut scripts to the same effect.

Maybe you should elaborate on what you are doing, that command as you posted it cannot possibly have worked (are you using a custom kernel?) and even if it had it would've printed out an error message

Last edited by V1del (2020-04-27 13:13:49)

Offline

#6 2020-04-27 13:09:04

muhlemmer
Member
Registered: 2020-04-27
Posts: 5

Re: [SOLVED] No kernel image is /boot after installing linux package

Lone_Wolf wrote:

Mkinitcpio is responsible for putting the files in the boot folders, dracut can do that job also but needs some manual configuration .

Have you seen https://wiki.archlinux.org/index.php/Dr … el_upgrade ?

Yes, I've seen the chapter, but it was on my TODO after booting the system. Excuse for my ignorance, but since it caries "update" in the title I didn't consider the need to read it for my new installation.

I will just copy the vmlinuz file, no problems. I was using Gentoo with Dracut before and was very happy how it worked. From that perspective I'm used to (compiling) and copying kernel images all over the place. It was just a bit of a surprise. I believe I did use mkinitcpio on the other laptop, but its still strange it doesn't work now. (See my other reply)

Offline

#7 2020-04-27 13:17:05

muhlemmer
Member
Registered: 2020-04-27
Posts: 5

Re: [SOLVED] No kernel image is /boot after installing linux package

V1del wrote:

It doesn't depend on initramfs implementation, the kernel image is located in /usr/lib/modules/$(uname -r)/vmlinuz

Maybe you should elaborate on what you are doing, that command as you posted it cannot possibly have worked (are you using a custom kernel?) and even if it had it would've printed out an error message

I'm currently running from the installation media. No customs except for dracut. I specify the kernel version, because my installation media still has 5.5.13 kernel from when I made it a few weeks ago. It seems that mkinitcpio defaults to the running kernel, not the one installed and it errors if I don't specify -k 5.6.7.arch1-1.

mkinitcpio --help
...
-k --kernel Use specified kernel verion (default: 5.5.13-arch2-1)
....

I don't need mkinitcpio, as I'm going to use dracut. I was just checking the statement in the news article regarding mkinitcpio taking care of the kernel copy. Which, apparently it doesn't.

Offline

#8 2020-04-27 15:17:30

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [SOLVED] No kernel image is /boot after installing linux package

muhlemmer wrote:

Following the official guide, I've installed the "linux" package. However, there is not any vmlinuz image in /boot.

I've just tried installing the linux package in a fresh Arch container and vmlinuz-linux is copied to /boot correctly. The mkinitcpio package supplies /usr/share/libalpm/hooks/90-mkinitcpio-install.hook to accomplish that task.

You should probably provide a complete list of the exact commands that you used so that we can either spot your error or reproduce the problem.

EDIT: removed redundant advice.

Last edited by Head_on_a_Stick (2020-04-27 15:18:31)

Offline

#9 2020-04-27 15:20:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] No kernel image is /boot after installing linux package

Head_on_a_Stick wrote:

... The mkinitcpio package supplies /usr/share/libalpm/hooks/90-mkinitcpio-install.hook to accomplish that task.

That is if mkinitcpio is installed at the same time to or prior to the kernel installation.  But the OP is/was using dracut.

The dracut package does not include the relevant hooks to generate the initramfs on kernel install/upgrade.  There is a dracut-hook package in the AUR for this purpose.

Last edited by Trilby (2020-04-27 15:22:06)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2020-04-27 16:19:17

muhlemmer
Member
Registered: 2020-04-27
Posts: 5

Re: [SOLVED] No kernel image is /boot after installing linux package

Meanwhile I've settled for a manual copy into boot and have since then left the installer environment and booted the target system. The mkinitcpio was just an intermediate experiment and I've removed the tool.

Head_on_a_stick wrote:

You should probably provide a complete list of the exact commands that you used so that we can either spot your error or reproduce the problem.

I poked it a bit too much to give a list of exact commands. However, I think I get the issue and it is a complete misunderstanding on my side:

Trilby wrote:

That is if mkinitcpio is installed at the same time to or prior to the kernel installation.  But the OP is/was using dracut.

So hopefully I understand correct now: the mkinitcpio provides a hook script but does not run it by itself on invocation. Instead, it is run by pacman upon installation of "linux" package. Hence, me installing it after linux did not have any effect on copying the kernel.

Once I have a more functional system I will look into the dracut hook scripts. Thanks for your replies!

Offline

#11 2020-04-27 16:21:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] No kernel image is /boot after installing linux package

muhlemmer wrote:

the mkinitcpio provides a hook script but does not run it by itself on invocation. Instead, it is run by pacman upon installation of "linux" package. Hence, me installing it after linux did not have any effect on copying the kernel.

Correct.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB