Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fail to run grub-install
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
NismoC32
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 222

PostPosted: Wed Nov 20, 2024 1:49 pm    Post subject: Fail to run grub-install Reply with quote

I'm installing Gentoo ~amd64 (systemd) on a new computer and have come to where installing the grub bootloader.
I'm using the Gentoo LiveGUI install media.

When I enter grub-install I get this error message:
Quote:
Installing for x86_64-efi platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).


lsblk:
Code:
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0   3.3G  1 loop
sda           8:0    0   1.8T  0 disk
├─sda1        8:1    0   363G  0 part
│ └─ventoy  253:0    0   3.4G  1 dm   
├─sda2        8:2    0    32M  0 part
├─sda3        8:3    0   972G  0 part
└─sda4        8:4    0   528G  0 part
sr0          11:0    1  1024M  0 rom 
nvme0n1     259:0    0   1.8T  0 disk
├─nvme0n1p1 259:5    0   100M  0 part /boot/efi
├─nvme0n1p2 259:6    0 593.4G  0 part
├─nvme0n1p3 259:7    0   293G  0 part /var
└─nvme0n1p4 259:8    0 976.6G  0 part /home

The install drive is nvme0n1

I have tried both rbinding the folders before chroot manually and usingthe arch-chroot /mnt/gentoo
I have set the following USE flag for GRUB:
Quote:
[ebuild R ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo USE="device-mapper fonts nls sdl themes truetype -doc -efiemu -libzfs -mount -secureboot (-test) -verify-sig" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -pc -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 0 Ki

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


I don't understand why grub-install don't work the /boot/grub (empty) folder is there and has root rwx access.
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 513

PostPosted: Wed Nov 20, 2024 4:19 pm    Post subject: Reply with quote

Grub does not find the place where /boot/grub should be. Normally /boot is part of / or on its own /boot-partition.


According to
Quote:
Code:
├─nvme0n1p1 259:5    0   100M  0 part /boot/efi
├─nvme0n1p2 259:6    0 593.4G  0 part
├─nvme0n1p3 259:7    0   293G  0 part /var
└─nvme0n1p4 259:8    0 976.6G  0 part /home


you have /boot/efi, /var and /home, but I do not see your system partition.

I assume /dev/nvme0n1p2 should be used for your system?
Back to top
View user's profile Send private message
NismoC32
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 222

PostPosted: Wed Nov 20, 2024 4:46 pm    Post subject: Reply with quote

Jea something seems to have gone wrong when the root partition was mounted nvme0n1p2 :( .
I exited out of the chroot and rebooted the machine and when I mounted the root partition again it was empty

Well, have to start from the beginning again.

Thankfully I copied the etc folder to my rescue drive first.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5234
Location: Bavaria

PostPosted: Wed Nov 20, 2024 6:20 pm    Post subject: Re: Fail to run grub-install Reply with quote

NismoC32 wrote:
Code:
[ebuild   R    ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo  USE="device-mapper fonts nls sdl themes truetype -doc -efiemu -libzfs -mount -secureboot (-test) -verify-sig" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -pc -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 0 Ki

When you try again, make sure that you have in your make.conf a correct setting - I am missing the second " here:
Code:
GRUB_PLATFORMS="efi-64

should be:
Code:
GRUB_PLATFORMS="efi-64"



Edit: Please forget this post ... maybe I wasn't really awake yet. :lol:

:oops:

.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger


Last edited by pietinger on Wed Nov 20, 2024 10:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2520

PostPosted: Wed Nov 20, 2024 8:00 pm    Post subject: Re: Fail to run grub-install Reply with quote

pietinger wrote:
NismoC32 wrote:
Code:
[ebuild   R    ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo  USE="device-mapper fonts nls sdl themes truetype -doc -efiemu -libzfs -mount -secureboot (-test) -verify-sig" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -pc -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 0 Ki

When you try again, make sure that you have in your make.conf a correct setting - I am missing the second " here:
Code:
GRUB_PLATFORMS="efi-64

should be:
Code:
GRUB_PLATFORMS="efi-64"


That's not necessarily a problem, I don't have anything grub related in make.conf and it still works perfectly fine.

What I have though is:

Quote:
[ebuild R ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo USE="device-mapper fonts mount nls sdl themes truetype -doc -efiemu -libzfs -secureboot (-test) -verify-sig" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 0 KiB


Best Regards,
Georgi
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