View previous topic :: View next topic |
Author |
Message |
jody l33t
Joined: 16 Oct 2007 Posts: 676 Location: Switzerland
|
Posted: Wed Mar 13, 2024 8:46 am Post subject: booting aborts when grub should kick in |
|
|
After an emerge of @world i changed some options in /etc/default/grub: Code: | GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true |
Then i did sudo grub-mkconfig -o /boot/grub/grub.cfg, followed by a restart.
After the ASUS Bios splash screen, I caught a short flash of something that might be the grub menu, but in this instant the computer restarted. This time after the splash screen, I ended up inside the BIOS settings.
I suspected i must have somehow messed up the grub configuration so i booted with a LiveCD USB stick, mounted the root partition and the boot partition, as well as /proc/, /sys, /dev, and /run (as specified in the gentoo handbook). Then chrooted to the mounted root, undid my changes to /etc/default/grub and ran
sudo grub-mkconfig -o /boot/grub/grub.cfg
again. But after rebooting i got showed the same behaviour: booting up until shortly before grub should kick in, then sudden restart, and finally ending up in the BIOS settings.
How should i proceed to get my system running again?
(i would prefer a solution which doesn't include a complete a complete & fresh installation of gentoo, because i got a lot of data on my root partition) |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3830
|
Posted: Wed Mar 13, 2024 9:30 am Post subject: |
|
|
Context please.
Did you upgraded grub, rebuild grub only, emerge only other packages?
Upgrade requires more that an grub-mkconfig
MBR, UEFI?
Never had problem because of Code: | GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true | Maybe I've been lucky...
NeddySeagoon would say gentoo mostly never requires reinstall instead of fixes, I guess.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
jody l33t
Joined: 16 Oct 2007 Posts: 676 Location: Switzerland
|
Posted: Wed Mar 13, 2024 10:23 am Post subject: |
|
|
I did not explicitly upgrade grub, i only ran emerge --update--newuse --deep @world.
I don't know if this pulled in a new version of grub, but it cerainly uipdated some other packages.
I have UEFI.
It is, however possible that i didn't have /boot mounted when i first ran the grub-mkconfig.
But the second time (when booted from USB) i had /boot mounted. |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3830
|
Posted: Wed Mar 13, 2024 10:32 am Post subject: |
|
|
should list about grub rebuilds.
Not having efi partition mounted should output complains.
Very uncomfy about that one: grub install from install/liveCD may no be so straight forward.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
jody l33t
Joined: 16 Oct 2007 Posts: 676 Location: Switzerland
|
Posted: Wed Mar 20, 2024 9:55 am Post subject: |
|
|
Hi Pietinger
Thank you for your reply.
I guess my system is even more messed up than i thought.
Code: | # grub-install --target=x86_64_efi --efi-directory=/boot /dev/sda
Installing for x86-64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory. |
(Probably unrelated, but my setup is such that i have an EFI subdirectory directory on /dev/sda1, and i simply do a mount /dev/sda1 /boot (this used to work until now))
But i also tried Code: | mount /dev/sda1 /boot/efi |
but this, too, doesn't work: Code: |
grub-install --target=x86_64_efi --efi-directory=/boot/efi /dev/sda
Installing for x86-64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory. |
I must admit the underlying problem is probably that i do not fully grasp the relationship between efi/uefi and /boot... |
|
Back to top |
|
|
jody l33t
Joined: 16 Oct 2007 Posts: 676 Location: Switzerland
|
Posted: Wed Mar 20, 2024 10:44 am Post subject: |
|
|
I just found out that the /sys directory on my disk does not contain a firmware/efi subdirectory -
there are only the acpi, di and memmap subdirectories.
This is obviously the reason for the error message cited in my previous mail.
The gentoo-install usb stick i used to boot the system also doesn't contain the /sys/firmware/efi subdirectory.
(i created the stick with rufus from install-amd64-minimal-20240317T170433Z.iso (in dd mode, not iso)).
Also, i saw on the gentoo download page that for arm they have an image for "Minimal Installation CD" marked with "EFI", whereas the one for amd does not.
Is there some other image i should use to boot my machine to get the efi subdirectory?
Or is there some way i can download that subdirectory? |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1674 Location: South America
|
Posted: Wed Mar 20, 2024 12:38 pm Post subject: |
|
|
jody wrote: | I just found out that the /sys directory on my disk does not contain a firmware/efi subdirectory - [...]
Is there some other image i should use to boot my machine to get the efi subdirectory?
Or is there some way i can download that subdirectory? |
It appears automatically if the computer really boots in UEFI mode... Which hints at yours not doing so... _________________
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
jody l33t
Joined: 16 Oct 2007 Posts: 676 Location: Switzerland
|
Posted: Mon Mar 25, 2024 1:30 pm Post subject: |
|
|
In my BIOS the CSM was indeed enabled.
After disabling it, the boot process worked fine.
Thank You! |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
|