Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] cannot find a device for /boot/grub
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
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Tue Feb 13, 2024 3:41 pm    Post subject: [SOLVED] cannot find a device for /boot/grub Reply with quote

On a systemd efi based system I get this error when trying to install grub:

Code:

(chroot) livecd /usr/src/linux # grub-install --efi-directory=/efi
Installing for x86_64-efi platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).


What is the problem here? /dev is mounted:

Code:

(chroot) livecd /usr/src/linux # df -l
Filesystem     1K-blocks  Used Available Use% Mounted on
cgroup_root        10240     0     10240   0% /sys/fs/cgroup
udev               10240     0     10240   0% /dev
tmpfs            8147792     0   8147792   0% /dev/shm
none             8147792   956   8146836   1% /run
/dev/nvme0n1p1   1046512 15736   1030776   2% /efi


Should /dev/nvme0n1p1 also be mounted on /boot as well as /efi?


Last edited by pgu on Wed Feb 14, 2024 4:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4236
Location: Bavaria

PostPosted: Tue Feb 13, 2024 7:25 pm    Post subject: Re: cannot find a device for /boot/grub Reply with quote

pgu wrote:
Should /dev/nvme0n1p1 also be mounted on /boot as well as /efi?

No. (You can mount a partition only to ONE mountpoint; mounting the ESP (efi system partition) to /efi is correct)

Is your root partition a BTRFS ?

If yes, please read: https://forums.gentoo.org/viewtopic-p-8765295.html

If yes AND you use kernel 6.7.x please read: https://forums.gentoo.org/viewtopic-p-8812148.html

If no, please give us the output of "parted -l" OR "fdisk -l" AND "lsblk" AND "blkid"
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Wed Feb 14, 2024 9:01 am    Post subject: Re: cannot find a device for /boot/grub Reply with quote

pietinger wrote:

Is your root partition a BTRFS ?


Thank you for the links, but my root partition is xfs.

pietinger wrote:

If no, please give us the output of "parted -l" OR "fdisk -l" AND "lsblk" AND "blkid"


Code:

Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: KBG30ZMV256G TOSHIBA                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: CA2F887D-B3CA-4FB0-9EB0-A6F37E55DBC9

Device            Start       End   Sectors   Size Type
/dev/nvme0n1p1     2048   2099199   2097152     1G EFI System
/dev/nvme0n1p2  2099200  69208063  67108864    32G Linux swap
/dev/nvme0n1p3 69208064 500117503 430909440 205.5G Linux filesystem


Full output at: http://codepad.org/0js2T3gp

Code:

(chroot) livecd /usr/src/linux # blkid
/dev/nvme0n1p3: LABEL="rootfs" UUID="9e32abcd-2332-4d3d-b017-55f77a4fb024" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="a33d366f-cdcd-f04e-91d5-b178ad659a0e"
/dev/nvme0n1p1: UUID="35D1-0EEF" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="f4a71f30-ea66-1a4d-ad9b-8f8b31713cc2"
/dev/nvme0n1p2: UUID="59144b48-776e-4c42-82a3-80acbd79efe6" TYPE="swap" PARTUUID="cf6bac77-526c-064b-9e67-80cd42d366a0"
/dev/sdb2: SEC_TYPE="msdos" UUID="2BC0-F849" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI boot partition" PARTUUID="c3151cc8-c1e4-4638-b7f1-47bb4bde0530"
/dev/sdb3: BLOCK_SIZE="2048" LABEL="ISOIMAGE" TYPE="hfsplus" PARTLABEL="HFSPLUS" PARTUUID="c3151cc8-c1e4-4638-b7f0-47bb4bde0530"
/dev/loop0: TYPE="squashfs"
/dev/sdb4: PARTLABEL="Gap1" PARTUUID="c3151cc8-c1e4-4638-b7f7-47bb4bde0530"
/dev/sdb1: PARTLABEL="Gap0" PARTUUID="c3151cc8-c1e4-4638-b7f2-47bb4bde0530"
/dev/sda1: PARTUUID="cbd8e717-4194-7d4d-89ab-2867944220cf"


BTW There is nothing preventing you from mounting the same partition on multiple mount points. I just asked since the error message was indicating that it's trying to figure out where /boot/grub is, whereas I would expect /efi/grub would be a better check.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Wed Feb 14, 2024 10:03 am    Post subject: Reply with quote

I will try to re-install using openrc rather than systemd...
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Wed Feb 14, 2024 4:14 pm    Post subject: Reply with quote

Code:

(chroot) livecd /etc/init.d # grub-install --efi-directory=/efi
Installing for x86_64-efi platform.
Installation finished. No error reported.


That worked at least...
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