View previous topic :: View next topic |
Author |
Message |
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2712 Location: Edmonton, AB
|
Posted: Tue Dec 05, 2023 8:43 pm Post subject: [SOLVED] New installation - not booting |
|
|
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 |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Tue Dec 05, 2023 9:28 pm Post subject: |
|
|
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 |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1663
|
Posted: Tue Dec 05, 2023 9:33 pm Post subject: |
|
|
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4167 Location: Bavaria
|
Posted: Tue Dec 05, 2023 9:48 pm Post subject: |
|
|
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 |
|
|
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2712 Location: Edmonton, AB
|
Posted: Tue Dec 05, 2023 10:15 pm Post subject: |
|
|
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4167 Location: Bavaria
|
|
Back to top |
|
|
|