Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem to install at 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
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Mon Sep 30, 2024 6:46 pm    Post subject: problem to install at boot Reply with quote

hello
actually i have gentoo openrc + xfce + grub
i want to delete grub to boot with efi stub
i have read the documentation to install efi stub, but it don t work
i don t have solution
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Mon Sep 30, 2024 9:19 pm    Post subject: Reply with quote

Which kernel do you use ? Our distribution kernel or a manually configured one ? The last question is important to see if you use an initramfs or not.

There is an automated way via installkernel or you can do everything yourself.

You could read this before answering the questions:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI

(there is also another forums post, where a user with a distribution kernel (= WITH initramfs) wanted to boot the kernel directly via UEFI:
https://forums.gentoo.org/viewtopic-p-8805827.html#8805827 )
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Tue Oct 01, 2024 6:38 pm    Post subject: Reply with quote

hello pietinger
how are you ?
yes i compile myself
in my /boot i have this :
Code:
amd-uc.img                  initramfs-6.6.52-gentoo-pablo.img
config-6.6.52-gentoo-pablo  System.map-6.6.52-gentoo-pablo
EFI                         vmlinuz-6.6.52-gentoo-pablo
grub


[Moderator edit: added [code] tags to preserve output layout. -- pietinger]
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 407
Location: Nijmegen

PostPosted: Tue Oct 01, 2024 6:39 pm    Post subject: Reply with quote

Please share the output of

Code:
emerge -pv sys-kernel/installkernel

_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Tue Oct 01, 2024 7:07 pm    Post subject: Reply with quote

hello,
this is the output :

Code:
gentoo ~ # emerge -pv sys-kernel/installkernel

 * IMPORTANT: config file '/etc/portage/package.use/package.use' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.05 s (backtrack: 0/20).

[ebuild   R    ] sys-kernel/installkernel-48-r1::gentoo  USE="grub -dracut (-efistub) -refind -systemd -systemd-boot (-ugrd) -uki -ukify" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


[Administrator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 407
Location: Nijmegen

PostPosted: Tue Oct 01, 2024 7:14 pm    Post subject: Reply with quote

The efistub flag is not enabled, this is why it does not work.

This is an experimental feature, and the flag is stabled masked, to enable it you'd have to accept testing keywords for installkernel, uefi-mkconfig and dependencies.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400


Last edited by Nowa on Tue Oct 01, 2024 7:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Tue Oct 01, 2024 7:27 pm    Post subject: Reply with quote

so, if i put these 2 flags, efistub and ugrd, i reboot thte computer and it work ?
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 407
Location: Nijmegen

PostPosted: Tue Oct 01, 2024 7:31 pm    Post subject: Reply with quote

pabloblo wrote:
so, if i put these 2 flags, efistub and ugrd, i reboot thte computer and it work ?


No, you use package.accept_keywords to accept testing keywords for installkernel and uefi-mkconfig, then enable the efistub flag, then re-install installkernel, then re-install the kernel. And then it *may* work, efistub booting is not guaranteed to work on every motherboard, many have quirks that make this impossible. There is no harm in trying though, this is all documented on the bootloader page of the handbook.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Tue Oct 01, 2024 7:42 pm    Post subject: Reply with quote

ah ok!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Tue Oct 01, 2024 7:49 pm    Post subject: Reply with quote

AndrewAmmerlaan wrote:
No, you use package.accept_keywords to accept testing keywords for installkernel and uefi-mkconfig,[...]

you will need more for package.accept_keywords:
Code:
sys-boot/uefi-mkconfig
sys-kernel/installkernel
sys-kernel/ugrd
dev-python/zenlib
dev-python/pycpio

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Tue Oct 01, 2024 7:51 pm    Post subject: Reply with quote

P.S.: Dont use parameter -D when you emerge "installkernel"->

Code:
 ~ # ACCEPT_KEYWORDS="~amd64" USE="efistub ugrd" emerge -pv installkernel

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.97 s (backtrack: 0/20).

[ebuild  N     ] dev-python/zenlib-2.2.4::gentoo  PYTHON_TARGETS="python3_12 -python3_11" 18 KiB
[ebuild  N     ] sys-boot/uefi-mkconfig-2.3::gentoo  11 KiB
[ebuild  N     ] dev-python/pycpio-1.3.2::gentoo  USE="-test" PYTHON_TARGETS="python3_12 -python3_11" 22 KiB
[ebuild  N     ] sys-kernel/ugrd-1.22.0::gentoo  USE="-test" PYTHON_TARGETS="python3_12 -python3_11" 65 KiB
[ebuild  N     ] sys-kernel/installkernel-48-r1::gentoo  USE="efistub ugrd -dracut -grub -refind -systemd -systemd-boot -uki -ukify" 25 KiB

Total: 5 packages (5 new), Size of downloads: 139 KiB



 ~ # ACCEPT_KEYWORDS="~amd64" USE="efistub ugrd" emerge -pvD installkernel

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 3.48 s (backtrack: 0/20).

[ebuild   R    ] dev-lang/python-exec-2.4.10:2::gentoo  USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_10) (python3_11) (python3_12) (python3_13%*)" 83 KiB
[ebuild  N     ] sys-boot/uefi-mkconfig-2.3::gentoo  11 KiB
[ebuild  NS    ] dev-lang/python-3.13.0_rc2_p2:3.13::gentoo [3.12.6_p2:3.12::gentoo] USE="debug* ensurepip gdbm (gil%*) ncurses readline sqlite ssl -bluetooth -build -examples (-jit) -libedit -pgo -test -tk -valgrind -verify-sig" LLVM_SLOT="18%*" 20.570 KiB
[ebuild  N     ] dev-python/zenlib-2.2.4::gentoo  PYTHON_TARGETS="python3_12 -python3_11" 18 KiB
[ebuild  N     ] dev-python/pycpio-1.3.2::gentoo  USE="-test" PYTHON_TARGETS="python3_12 -python3_11" 22 KiB
[ebuild  N     ] sys-kernel/ugrd-1.22.0::gentoo  USE="-test" PYTHON_TARGETS="python3_12 -python3_11" 65 KiB
[ebuild  N     ] sys-kernel/installkernel-48-r1::gentoo  USE="efistub ugrd -dracut -grub -refind -systemd -systemd-boot -uki -ukify" 25 KiB

Total: 7 packages (5 new, 1 in new slot, 1 reinstall), Size of downloads: 20.791 KiB

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Tue Oct 01, 2024 8:29 pm    Post subject: Reply with quote

ok thank you
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Tue Oct 01, 2024 10:36 pm    Post subject: Reply with quote

* Updating UEFI configuration...
* Running uefi-mkconfig...
* No uefi-mkconfig configuration file found!
* uefi-mkconfig failed

i don t know which file he need
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Tue Oct 01, 2024 11:14 pm    Post subject: Reply with quote

pabloblo wrote:
I don t know which file he need

Here you will need another expert ... I never did the automatic way ... always the manual way ... because I want to know what's going on. 8)

Your output from /boot is a little bit weird (please use code-tags for this) ... Do you have your ESP mounted to /efi OR to /boot/EFI ? Please show us a "ls -l" from your ESP (depending where it is).

Do you have the package "efibootmgr" ? If no, please emerge it, and then give us the output of:
Code:
# efibootmgr

You said you compile your kernel yourself: How made you the initramfs ? With dracut ?

I could take a look to your kernel .config if you want (please use wgetpaste for this).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 407
Location: Nijmegen

PostPosted: Wed Oct 02, 2024 5:16 am    Post subject: Reply with quote

pabloblo wrote:
* Updating UEFI configuration...
* Running uefi-mkconfig...
* No uefi-mkconfig configuration file found!
* uefi-mkconfig failed

i don t know which file he need


/etc/kernel/uefi-mkconfig

It should contain the kernel cmdline, it may be empty.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Wed Oct 02, 2024 6:17 pm    Post subject: Reply with quote

the computer is dead, kernel panic
maybe i have do mistake for the configuration
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Wed Oct 02, 2024 9:10 pm    Post subject: Reply with quote

pabloblo wrote:
the computer is dead, kernel panic [...]

IF ... if you have booted now WITHOUT grub ... THEN ... this is a good sign: UEFI has started your kernel.

Now we have to find out why you have a kernel panic. The most common reason is:

1. Kernel has not gotten the information where its root partition is ("root=..." as kernel command line parameter); please read: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Commandline_Parameter

OR

2. Kernel cannot access root partition. This should not be possible when using an initramfs.

NOW: Boot with our GentooBootCD and chroot into your system and give us the output of "efibootmgr" and your kernel .config.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Thu Oct 03, 2024 8:06 pm    Post subject: Reply with quote

oh thx!! i will try it
i don t understand because i have initramfs
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Thu Oct 03, 2024 8:53 pm    Post subject: Reply with quote

ok, the problem is,
unable to mount root fs on unknown block
but i have put uuid in the kernel and compile it; but it don t work
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22586

PostPosted: Thu Oct 03, 2024 9:29 pm    Post subject: Reply with quote

Per Guidelines item #4, please give us output we can use. What is the output of blkid? Exactly how did you instruct the initramfs to mount root?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Thu Oct 03, 2024 11:11 pm    Post subject: Reply with quote

pabloblo,

I have asked you to give me the output of “efibootmgr”. And I asked you if - and if so, how - you use an initramfs. You said you make your own kernel. But there are several ways to do this. We need the information what you have done ... and how.

The more precise your information about the situation is, the sooner and faster we can help you. An example:

The kernel panic "unable to mount root fs on unknown block" has usually some numbers in parentheses; e.g. (0,0) or (1,3) These numbers tell us something.

I have found the cause of every boot problem so far. If you want quick help, please just do now exactly what I ask for:

1. Boot into your system using grub
2. Give us all 3 files mentioned here:
https://wiki.gentoo.org/wiki/User:Pietinger/Overview_of_System_Information
(note the reference to wgetpaste for your "dmesg"-output)
3. Give us also your current kernel .config. If you have more then one used kernel, we need the kernel .config of the kernel you want to boot directly via UEFI (also with wgetpaste)
4. Do these queries (and paste it into your post):
- efibootmgr
- blkid
- lsblk
- fdisk -l
- cat /etc/fstab
- cat /boot/grub/grub.cfg (also with wgetpaste)
- ls -l /boot
- ls -l /boot/EFI -OR- ls -l /boot/efi -OR- ls -l /efi (depending where you mount your ESP)
5. Boot again into your kernel directly (via UEFI) and tell us the numbers you will see in the kernel panic message.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5041
Location: Bavaria

PostPosted: Thu Oct 03, 2024 11:22 pm    Post subject: Reply with quote

P.S.: Use code-tags

If you dont know, then edit your 2nd (or 3rd) post of this thread and look at the beginning and the end of the code-section. It starts with [code]
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pabloblo
n00b
n00b


Joined: 24 Jan 2024
Posts: 71

PostPosted: Thu Oct 10, 2024 8:55 pm    Post subject: Reply with quote

hello, I managed to recover the computer as it was before, so with grub, it works but the goal is to have a computer with efistub, can someone tell me the steps to follow, the tutorial does not work not
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20476

PostPosted: Thu Oct 10, 2024 9:06 pm    Post subject: Reply with quote

Step 1: Provide the information previously requested by both pietinger and Hu.
_________________
Quis separabit? Quo animo?
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