Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't boot into system after changing motherboard
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Retic_e30
n00b
n00b


Joined: 19 Jan 2024
Posts: 3

PostPosted: Fri Jan 19, 2024 7:22 pm    Post subject: Can't boot into system after changing motherboard Reply with quote

Hello, recently I updated my motherboard to asus B550-PLUS and cpu to ryzen 5 5500.
I can't boot into my previously installed system. Even grub menu doesn't appear. In bios boot setting, bios doesn't seem to recognize the previous system as UEFI despite it most definately being UEFI before.
I've read on other forums about problem similar to mine and they got it fixed by running grub-install.
I tried to chroot to my install with gentoo livecd.
While live cd was booted in UEFI ( /sys/firmware/efi was present and tuxes on upper part of screen), I mounted my root partition to /mnt/gentoo and /mnt/gentoo/sys was completely empty.
After trying to chroot, mount boot partition to /boot and running grub-install --efi-directory=/efi I get:
Code:
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

I have have also tried a bunch of other things but none of them solved anything and now I'm here.
I wouldn't want to reinstall whole system from scratch like an idiot, but I'm really running out of ideas.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1919

PostPosted: Fri Jan 19, 2024 7:34 pm    Post subject: Reply with quote

Retic_e30 wrote:
I tried to chroot to my install with gentoo livecd.
While live cd was booted in UEFI ( /sys/firmware/efi was present and tuxes on upper part of screen), I mounted my root partition to /mnt/gentoo and /mnt/gentoo/sys was completely empty.
After trying to chroot, mount boot partition to /boot and running grub-install --efi-directory=/efi I get:
Code:
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

This sounds like the chroot was not done properly so that grub-install could detect the EFI booting. i386-pc is traditional BIOS booting.
Don't forget to mount sysfs to /mnt/gentoo/sys, and rbind proc to /mnt/gentoo/proc before entering chroot.
Back to top
View user's profile Send private message
Retic_e30
n00b
n00b


Joined: 19 Jan 2024
Posts: 3

PostPosted: Fri Jan 19, 2024 7:54 pm    Post subject: Reply with quote

grknight wrote:
Retic_e30 wrote:
I tried to chroot to my install with gentoo livecd.
While live cd was booted in UEFI ( /sys/firmware/efi was present and tuxes on upper part of screen), I mounted my root partition to /mnt/gentoo and /mnt/gentoo/sys was completely empty.
After trying to chroot, mount boot partition to /boot and running grub-install --efi-directory=/efi I get:
Code:
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

This sounds like the chroot was not done properly so that grub-install could detect the EFI booting. i386-pc is traditional BIOS booting.
Don't forget to mount sysfs to /mnt/gentoo/sys, and rbind proc to /mnt/gentoo/proc before entering chroot.


I'm going to sound like an absolute noob but could you write these commands just so I won't make a mistake?
I've been dealing with this since yesterday and I'm really now doubting myself in everything.
/dev/sda1 is boot
/dev/sda1 is swap
/dev/sda3 is root
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1919

PostPosted: Fri Jan 19, 2024 8:00 pm    Post subject: Reply with quote

Retic_e30 wrote:
grknight wrote:
Retic_e30 wrote:
I tried to chroot to my install with gentoo livecd.
While live cd was booted in UEFI ( /sys/firmware/efi was present and tuxes on upper part of screen), I mounted my root partition to /mnt/gentoo and /mnt/gentoo/sys was completely empty.
After trying to chroot, mount boot partition to /boot and running grub-install --efi-directory=/efi I get:
Code:
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

This sounds like the chroot was not done properly so that grub-install could detect the EFI booting. i386-pc is traditional BIOS booting.
Don't forget to mount sysfs to /mnt/gentoo/sys, and rbind proc to /mnt/gentoo/proc before entering chroot.


I'm going to sound like an absolute noob but could you write these commands just so I won't make a mistake?
I've been dealing with this since yesterday and I'm really now doubting myself in everything.
/dev/sda1 is boot
/dev/sda1 is swap
/dev/sda3 is root

Copied from The Handbook
Code:
mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
mount --bind /run /mnt/gentoo/run
mount --make-slave /mnt/gentoo/run

This is in addition to the actual mounts for the root and boot.
Back to top
View user's profile Send private message
Retic_e30
n00b
n00b


Joined: 19 Jan 2024
Posts: 3

PostPosted: Fri Jan 19, 2024 8:31 pm    Post subject: Reply with quote

Thank you very much, I knew from the very beginning that it was something silly but I just wasn't able to figure out what it was.
After chrooting correctly I ran
Code:

grub-install --target=x86_64-efi --efi-directory=/boot

efibootmgr

I don't know if both of these were necesarry but it did solve my issue, once again thank you very much.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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