Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] New installation - not booting
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
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Tue Dec 05, 2023 8:43 pm    Post subject: [SOLVED] New installation - not booting Reply with quote

After partitioning, and installing the system can not find kernel

Here are some entries:
Code:
Partition:
Device            Start        End    Sectors   Size Type
/dev/nvme0n1p1     2048    2099199    2097152     1G EFI System
/dev/nvme0n1p2  2099200   10487807    8388608     4G Linux swap
/dev/nvme0n1p3 10487808 1953523711 1943035904 926.5G Linux filesystem

Code:
cat /etc/fstab
/dev/nvme0n1p1 /efi      vfat  noauto,noatime  1 2
/dev/nvme0n1p2 none swap sw 0 0
/dev/nvme0n1p3  / ext4 noatime 0 1


Where the kernel files should be copied? /boot or /efi directory
- System.map-6.1.57-gentoo
- config-6.1.57-gentoo
- vmlinuz-6.1.57-gentoo

If /efi is a boot partition I assume the kernel files should be there as well; but somehow it doesn't work.

According to Gentoo manual: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Code:
grub-mkconfig -o /boot/grub/grub.cfg

In my case I translate it to:
Code:
grub-mkconfig -o /efi/grub/grub.cfg

but it doesn't generate any entry in grub.conf like:
Quote:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-6.1.57-gentoo
Found initrd image: /boot/initramfs-genkernel-amd64-6.1.57-gentoo
done

all get is:
Code:
grub-mkconfig -o /efi/grub/grub.cfg
Generating grub configuration file ...
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done


Last edited by Joseph_sys on Tue Dec 05, 2023 10:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Tue Dec 05, 2023 9:28 pm    Post subject: Reply with quote

Kernel and initramfs should be in /boot unless you use efistub.
But on second thought lets check further.
What
Code:

grub-install .................

invocation did you use?
Quote:

If /efi is a boot partition I assume the kernel files should be there as well; but somehow it doesn't work.


/efi is an ESP partition.
_________________
:)
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Tue Dec 05, 2023 9:33 pm    Post subject: Reply with quote

grub-mkconfig will look in /boot and / for kernels and initramfs as default locations.

You may create your own hand-written config to place them elsewhere.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4167
Location: Bavaria

PostPosted: Tue Dec 05, 2023 9:48 pm    Post subject: Reply with quote

Joseph_sys,

you are probably familiar with linux and are used to /boot being an extra partition. This is not true anymore. Please read this first:
https://forums.gentoo.org/viewtopic-t-1165115.html

Now our AMD64 Handbook explains all correct:

There is a "mkdir /efi"

This is the mountpoinnt for your ESP (efi system partition).

A "make install" (or genkernel) installs the kernel into /boot.

/boot is NOW an ordinary directory of your root directory. Yes, your kernel resides NOW on your root partition.

You must mount your ESP to /efi

Now your grub-install --target=x86_64-efi --efi-directory=/efi installs the first part of grub (=grubx64.efi) INTO:
\efi\gentoo\grubx64.efi

If you have mounted your ESP to /efi you will see it as:

/efi/efi/gentoo/grubx64.efi

(Maybe your efi is in capital EFI; but that doesn't matter because we have FAT)

Now you need:

grub-mkconfig -o /boot/grub/grub.cfg

because the second part of grub (with its config file) resides in /boot/grub

There is a checklist for an UEFI boot also here:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot
(read only this chapter; not the next chapter, because it is a guide for installing
a stub kernel.)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Tue Dec 05, 2023 10:15 pm    Post subject: Reply with quote

Thank to all.
I solve it. My problem was I used standard kernel configuration that came with the emerge.
That config didn't have NVM support. Enabling it solve booting problem :-)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4167
Location: Bavaria

PostPosted: Tue Dec 05, 2023 10:40 pm    Post subject: Reply with quote

Joseph_sys wrote:
Thank to all.

You are very Welcome ! :D

Joseph_sys wrote:
That config didn't have NVM support. Enabling it solve booting problem :-)

... what a coincidence ... we had the same problem today in the mailing list ... :lol:

Yes, I hate our default configuration too ... maybe you are interested in:

https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.6

;-)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
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