Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to install gentoo-kernel-bin to /boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 193

PostPosted: Thu Feb 27, 2025 4:19 am    Post subject: how to install gentoo-kernel-bin to /boot Reply with quote

I have been trying to install the bin kernel on my new gentoo install but I cant figure out where it is getting installed. It looks like its not being placed in /boot
I am not using a separate /boot partition and i mounted my efi
This is my fstab:
Code:
UUID=FA26-3B1F                            /boot/efi      vfat    fmask=0137,dmask=0027 0 2
UUID=857d36cd-ab31-4349-a875-9ba45c15e276 /              btrfs   subvol=/@gentoo,noatime,compress=zstd 0 0
UUID=41c9da3b-d044-434b-b853-c18170bd4040 swap           swap    defaults   0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

Code:
# eselect kernel list
Available kernel symlink targets:
  [1]   linux-6.12.16-gentoo-dist *
(chroot) tux / # eselect kernel set 1

Code:
# installkernel
layout=uki set via config
INITRD_GENERATOR (dracut) set via config.
UKI_GENERATOR (dracut) set via config.
Loaded config.
MACHINE_ID=292fed8dc0094343a8bd9e6c3d5cb98c set via /etc/machine-id.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
Directory "/boot" is not the root of the file system.
Couldn't find an XBOOTLDR partition.
Failed to check file system type of "/efi": No such file or directory
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
Using EFI System Partition at /boot/efi as $BOOT_ROOT.
Using entry token: 292fed8dc0094343a8bd9e6c3d5cb98c
Kernel image not installed to '/usr/lib/modules/6.12.16-1-lts/vmlinuz', requiring manual kernel image path specification.

Code:
ls /boot/efi/EFI/Linux/
292fed8dc0094343a8bd9e6c3d5cb98c-6.12.16-gentoo-dist.efi

It looks like it thinks that /boot/efi is the /boot directory and it is complaining that my efi partition is not a FAT EFI partition. Not sure what it complains about as in my efi partition is working properly for another distro.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1831
Location: South America

PostPosted: Thu Feb 27, 2025 1:09 pm    Post subject: Re: how to install gentoo-kernel-bin to /boot Reply with quote

InvisibleRasta wrote:
I have been trying to install the bin kernel on my new gentoo install but I cant figure out where it is getting installed.

[...]

Code:
ls /boot/efi/EFI/Linux/
292fed8dc0094343a8bd9e6c3d5cb98c-6.12.16-gentoo-dist.efi

It is being installed where your configuration is telling installkernel to install it. layout=uki combined with your partition setup, combined with using systemd's kernel-install, means that the kernel (or actually a UKI) goes in the \EFI\Linux directory of the EFI System Partition (ESP). You have the ESP mounted at /boot/efi, so full pathname as seen by your booted operating system is /boot/efi/EFI/Linux.

You must have had the systemd and uki USE flags set when package sys-kernel/installkernel was installed. If this result is not what you wanted, you need to adjust your configuration or USE flags. Are you actually building a Unified Kernel Image (UKI)?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 193

PostPosted: Thu Feb 27, 2025 2:18 pm    Post subject: Reply with quote

I was actually just trying to install the precompiled kernel. So I did remove the uki flag and rebuilt installkernel but still its installing the kernel in /boot/efi/EFI/Linux/292fed8dc0094343a8bd9e6c3d5cb98c-6.12.16-gentoo-dist.efi
It is actuall ynot even generating an initrd.I jsut want it to install intraframs and kernel in /boot
Code:

layout=grub set via config
INITRD_GENERATOR (dracut) set via config.
UKI_GENERATOR (none) set via config.
Loaded config.
MACHINE_ID=292fed8dc0094343a8bd9e6c3d5cb98c set via /etc/machine-id.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
Directory "/boot" is not the root of the file system.
Couldn't find an XBOOTLDR partition.
Failed to check file system type of "/efi": No such file or directory
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
Using EFI System Partition at /boot/efi as $BOOT_ROOT.
Using entry token: 292fed8dc0094343a8bd9e6c3d5cb98c
Kernel image not installed to '/usr/lib/modules/6.12.16-1-lts/vmlinuz', requiring manual kernel image path specification.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2034

PostPosted: Thu Feb 27, 2025 2:27 pm    Post subject: Reply with quote

InvisibleRasta wrote:
I was actually just trying to install the precompiled kernel. So I did remove the uki flag and rebuilt installkernel but still its installing the kernel in /boot/efi/EFI/Linux/292fed8dc0094343a8bd9e6c3d5cb98c-6.12.16-gentoo-dist.efi
It is actuall ynot even generating an initrd.I jsut want it to install intraframs and kernel in /boot

Also remove the systemd USE from it as well. That is what is creating the specified path.
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 193

PostPosted: Thu Feb 27, 2025 2:32 pm    Post subject: Reply with quote

ok i did what you suggested. Still not sure on how to install the precompiled kernel and initrd to /boot tho. I been going trought the wiki but i do not quite understand
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1831
Location: South America

PostPosted: Thu Feb 27, 2025 2:34 pm    Post subject: Reply with quote

Are you using systemd? Are you wanting to boot with GRUB?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 193

PostPosted: Thu Feb 27, 2025 2:35 pm    Post subject: Reply with quote

yes I want to use grub and i am using systemd
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1831
Location: South America

PostPosted: Thu Feb 27, 2025 2:42 pm    Post subject: Reply with quote

Then, in a file in /etc/portage/package.use:

Code:
sys-kernel/installkernel dracut -systemd

if prefer to run grub-mkconfig yourself, or:

Code:
sys-kernel/installkernel dracut grub -systemd

if you want to have grub-mkconfig run automatically every time you install a new kernel.

And, in either case:

Code:
# emerge --oneshot sys-kernel/installkernel

afterwads.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 193

PostPosted: Thu Feb 27, 2025 2:50 pm    Post subject: Reply with quote

solved with what you suggested. thank you
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 552

PostPosted: Thu Feb 27, 2025 3:26 pm    Post subject: Reply with quote

You probably want to clean up your ESP by deleting the unwanted files.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum