Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Infinite reboot after "Welcome to GRUB!"

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

Infinite reboot after "Welcome to GRUB!"

  • Quote

Post by sicr0 » Tue Jan 16, 2024 7:12 pm

Hi,

I was unable to use my laptop for a month. When I got it back I was updating the system and kernel.
After the update I checked and saw that Portage installed the packages dracut and installkernel, and since I wasn't using them I used the USE flags to remove them.

After rebooting the system, I see on the screen the message "Welcome to GRUB!" and it reboots again in an infinite loop.

I got into the system with a Live USB and installed those two packages again and did all the Kernel update process again, but it didn't work.

Could somebody help me get my system up again? Which log or config files should I look for so that I can share them?
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Jan 16, 2024 9:02 pm

I guess your kernel panics and therefore you have an immediately reboot. To solve this we would need to know:

a) How have you made your kernel: Have you done a manually kernel configuration (with or without an initramfs?), or with genkernel, or using a dist-kernel ?

I guess also that your new installkernel has build an initramfs - we maybe must delete. b) Here we must know if you mount your ESP to /efi or to /boot ?

So:

1. Please boot with a GentooCD and CHROOT into your system.
2. Depending where your /boot is, you maybe have to mount it before and c) give us the output of a "ls -R /boot"
3. Give us all information: a) b) c).

I guess you must do a "grub-mkconfig" again and maybe BEFORE you must delete an initramfs-file. Maybe set also a USE="-dracut ..." in your make.conf. But please wait for a definitive answer.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Tue Jan 16, 2024 9:32 pm

Thanks for the help pietinger,

a)

I was using a custom kernel without initramfs. When I unmerged installkernel and dracut I removed the initramfs file that was in the /boot directory (maybe I was too bold)

b)

If I recall correctly I used to do grub-install --efi-directory=/boot, but now that I checked, I don't have a efi directory neither in /boot nor in /efi.

I tried to run grub-install --efi-directory=/boot command and I got:

Code: Select all

Installing for x86-64-efi platform.
grub-install: error: /boot doesn't look like an EFI partition
c)

Running ls -R /boot shows:

Code: Select all

/boot:
config-5.15.26-gentoo      config-6.7.0-gentoo.old      initramfs-6.7.0-gentoo.img.old  System.map-5.15.26-gentoo.old  System.map.old  vmlinuz-5.15.26-gentoo      vmlinuz-6.7.0-gentoo.old
config-5.15.26-gentoo.old  grub                        System.map                      System.map-6.7.0-gentoo        System.old      vmlinuz-5.15.26-gentoo.old  vmlinuz.old
config-6.7.0-gentoo        initramfs-6.7.0-gentoo.img  System.map-5.15.26-gentoo       System.map-6.7.0-gentoo.old    vmlinuz         vmlinuz-6.7.0-gentoo

/boot/grub:
grub.cfg
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Jan 16, 2024 9:52 pm

I guess you have installed your system when our AMD64 handbook was already updated and said your must mount your ESP to /efi.
(see more: viewtopic-t-1165115-highlight-.html)
Now, I see in your /boot a file named initramfs-* ... delete all of them. THEN:
After you have chrooted into your system, check if you have mounted your ESP to /efi (If not, do it). Do again a " grub-install --efi-directory=/efi" and THEN a "grub-mkconfig ..."
Check after this in /boot/grub/grub.cfg IF your kernel will be loaded with "root=PARTUUID=..." or with "root=UUID=..."
Maybe read: https://wiki.gentoo.org/wiki/User:Pieti ... %3DUUID%3D
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Jan 16, 2024 9:56 pm

P.S.: I have also a manually configured kernel and dont need dracut, so I have USE="-dracut .." and emerged installkernel without this ... but actually I dont need that, because I dont do a "make install", because I have: https://wiki.gentoo.org/wiki/User:Pieti ... l_via_UEFI :lol:
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Tue Jan 16, 2024 10:02 pm

check if you have mounted your ESP to /efi (If not, do it)
I don't have a /efi directory, sorry for the ignorance, how exactly should I do it? By following your article https://wiki.gentoo.org/wiki/User:Pieti ... l_via_UEFI or should I do it in another way?

Right now the nvme0n1p1 partition is mounted on /boot (it says so in the /etc/fstab file).
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Jan 16, 2024 10:06 pm

What is the output of (after chrooting *)
1. efibootmgr
2. parted -l
3. mount
?

*) This is chrooting into your gentoo system when using OLD mountpoint /boot for ESP:

Code: Select all

# mount /dev/sdXY /mnt/gentoo
# cd /mnt/gentoo
# mount -t proc /proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
# mount --bind /run /mnt/gentoo/run
# chroot /mnt/gentoo /bin/bash
# . /etc/profile
# mount /dev/sdXZ /boot
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Tue Jan 16, 2024 10:47 pm

1.

Code: Select all

BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0000,0003,0004,0001
Boot0000* gentoo        HD(1,GPT,5a906977-4e5f-ad45-a299-28e9638b4ca0, 0x800, 0x80000)/File(\EFI\gentoo grubx64.efi)0400000049535048
Boot0001  Network Boot: IPV6
PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0, 0x4)/USB (4,0)/MAC (3c18a0c44ebd,0)/IPv6 ([::]:<->[::]:,0,0)4eac0881119f594d850ee21a522c59b21b30000049535048
Boot0003 Kingston DataTraveler 3.0 08606E6B6446E311272660A3 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0, 0x4)/USB (5,0)4eac0881119f594d850ee21a522c59b20918000049535048
Boot0004 Network Boot: IPV4 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0, 0x4)/USB (4,0)/MAC (3c18a0c44ebd, 0)/IPv4 (0.0.0.00.0.0.0,0,0)4eac0881119f594d850ee21a522c59b21b28000049535048
2.

Code: Select all

bash: parted: command not found
3.

Code: Select all

/dev/nume0n1p3 on type ext4 (ru,relatine)
/proc on /proc type proc (ru,relatine)
sysfs on /sys type sysfs (ru,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (ru,nosuid, nodev, noexec, relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (ru,nosu id, nodev, noexec, relatime)
cgroup root on /sys/fs/cgroup type tmpfs (ru,nosuid,nodev, noexec, relatine,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openre type cgroup (ru,nosuid, nodev, noexec, relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh, name=openrc)
none on /sys/fs/cgroup/unified type cgroup2 (ru,nosuid, nodev, noexec, relatime, nsdelegate)
udev on /dev type devtmpfs (ru,nosuid,relatine,size=10240k, nr_inodes=1965545,mode=755)
deupts on /dev/pts type deupts (ru,relatine,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (ru,nosuid,nodev)
mqueue on /dev/nqueue type mqueue (ru,nosuid,nodev,noexec,relatime)
none on /run type tmpfs (ru,nosuid,nodev,relatime,mode=755)
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Tue Jan 16, 2024 11:34 pm

I installed parted and the output is:

Code: Select all

Model: Kingston DataTraveles 3.0 (scsi)
Disk /dev/sda: 15.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 2      98.3kB  11.1MB  11.0MB  primary  fat16        esp


Model: WDC PC SN530 SDBPNPZ-512G-1006 (nvme)
Disk: /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  269MB   268MB   fat32                 boot,esp
 2      269MB   4564MB  4295MB  linux-swap(v1)        swap
 3      4564MB  512GB   508GB   ext4
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Jan 16, 2024 11:46 pm

As far as I can see, you are using /boot as your ESP mount point ... so, you must do a "mount /dev/nvme0n1p1 /boot" and THEN I would like to see the content of it ("ls -R /boot")

You should also get no error NOW if you do a "grub-install --efi-directory=/boot", or do you ?

Check if your kernels are in /boot ! If not: Go into /usr/src/linux and do there a "make install". Check /boot again. If this works, please dont forget to do a "grub-mkconfig ... " AND then check /boot/grub/grub.cfg (already told you in above post)

After this, do an "umount /boot" and delete all the stuff you have NOW in /boot ... it will only confuse you ... and a mount point should always be empty.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Tue Jan 16, 2024 11:59 pm

First of all:
I'm an idiot.

Yea, when I entered the system through the Live USB, I wasn't mounting my laptop's /boot, so no change was getting applied, and that's why there was a kernel version so old (5.15.26).

Thank you very much pietinger.

Nonetheless, moving forward I would want to get rid of Dracut and installkernel like you did, so:

1) To accomplish that, I should follow these instructions, right?
Now, I see in your /boot a file named initramfs-* ... delete all of them. THEN:
After you have chrooted into your system, check if you have mounted your ESP to /efi (If not, do it). Do again a " grub-install --efi-directory=/efi" and THEN a "grub-mkconfig ..."
2) Your article (https://wiki.gentoo.org/wiki/User:Pieti ... l_via_UEFI) would remove the need for GRUB? It seemed interesting
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Jan 17, 2024 1:50 am

sicr0 wrote:First of all:
I'm an idiot.
Dont worry ... sometimes I am too ... :lol:
sicr0 wrote:Thank you very much pietinger.
You are very Welcome ! :D
sicr0 wrote:1) To accomplish that, I should follow these instructions, right?
Yes. Disable USE-flag "dracut" (I did it in my make.conf with USE="-dracut ...") and do a re-emerge of "installkernel" with "emerge -1v installkernel". 8)
sicr0 wrote:2) Your article (https://wiki.gentoo.org/wiki/User:Pieti ... l_via_UEFI) would remove the need for GRUB? It seemed interesting
You can try it always because it cannot damage your existent installation. You can always remove the UEFI settings with "efibootmgr -b X -B X" (X = number of entry; do an "efibootmgr" before). See more: https://wiki.gentoo.org/wiki/Efibootmgr ... boot_entry

You can change also the boot order with "efibootmgr" or even in your UEFI BIOS itself. ;-)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Wed Jan 17, 2024 3:06 am

I followed your instructions and was able to remove Dracut without problems.

To check if I understood correctly: if I want to remove installkernel, I won't be able to run make install successfully and I would have no other option than to use efibootmgr like you do in your guide, right?
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Jan 17, 2024 3:11 am

sicr0 wrote:To check if I understood correctly: if I want to remove installkernel, I won't be able to run make install successfully and I would have no other option than to use efibootmgr like you do in your guide, right?
YES ! ... but there is no need to deinstall it (maybe sometime you will use a "make install" again for grub ...) ... in it "naked" version it does nothing else than copying kernel (and map and config) to /boot.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sicr0
Apprentice
Apprentice
Posts: 194
Joined: Wed Mar 23, 2022 12:09 pm

  • Quote

Post by sicr0 » Wed Jan 17, 2024 4:03 am

Thanks pietinger

I'll try tinkering a little then ;D
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Jan 17, 2024 9:20 am

P.S.: I have seen you are using 6.7.0 ... maybe read this thread where a problem with grub is described:
viewtopic-t-1166750-highlight-.html

Edit 2023-01-18: Please disregard this thread - only users who have BTRFS as root file system are affected.

(Maybe also interesting for you: https://wiki.gentoo.org/wiki/User:Pieti ... ersion_6.7 )[/code]
Last edited by pietinger on Thu Jan 18, 2024 6:07 am, edited 1 time in total.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
sMueggli
l33t
l33t
Posts: 627
Joined: Sat Sep 03, 2022 9:22 am

  • Quote

Post by sMueggli » Wed Jan 17, 2024 10:22 am

Probably it is enough to chroot into the (correctly mounted) system and recreate the grub.cfg.
Top
hedmo
Veteran
Veteran
User avatar
Posts: 1338
Joined: Sat Aug 29, 2009 1:15 pm
Location: sweden

  • Quote

Post by hedmo » Mon Jan 22, 2024 8:21 pm

i would bet my money you have updated to latest grub . you need to :

Code: Select all

grub-install /dev/xxxx
as the new grub needs this.

regards
Top
Post Reply

18 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic