Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub-probe: error: cannot find a device for / (is /dev mount
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
st834
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2022
Posts: 96

PostPosted: Sat Dec 17, 2022 9:55 am    Post subject: grub-probe: error: cannot find a device for / (is /dev mount Reply with quote

Hello

I addressed here about compiling a kernel without genkernel, and I am grateful to everyone for help and advice which unfortunately I cannot check because of a problem with the boot loader:

Code:
grub-probe: error: cannot find a device for / (is /dev mounted?)


I installed the bootloader as it says in the manual

Code:
grub-install --target=x86_64-efi --efi-directory=/boot --removable


and when running the command
Code:
grub-mkconfig -o /boot/grub/grub.cfg


I get message from head of the post.

I googled the internet, but I could not find any solution that would work for me.

I have never encountered this error before.

The only difference I made was on the btrfs volume I created a flat hierarchy with the root and home subvolumes. My fstab file :

Code:
/dev/nvmeon1p1 /boot vfat defaults 0 2
/dev/nvme0n1p2 / btrfs subvol=root 0 0
/dev/nvme0n1p2 /home btrfs subvol=home 0 0




Thanks for your answers !
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3918

PostPosted: Sat Dec 17, 2022 10:50 am    Post subject: Reply with quote

Hi
You have to chroot into your system the proper way to run grub-mkconfig.
Please follow
Code:

root #mount --types proc /proc /mnt/gentoo/proc
root #mount --rbind /sys /mnt/gentoo/sys
root #mount --make-rslave /mnt/gentoo/sys
root #mount --rbind /dev /mnt/gentoo/dev
root #mount --make-rslave /mnt/gentoo/dev
root #mount --bind /run /mnt/gentoo/run
root #mount --make-slave /mnt/gentoo/run


from
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Chrooting
_________________
:)
Back to top
View user's profile Send private message
st834
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2022
Posts: 96

PostPosted: Wed Dec 21, 2022 10:29 am    Post subject: Reply with quote

Thank you very much for your answer,

I mounted these systems but when I created the btrfs subvolume I mounted the root volume but I didn't mount the subvolume (for root and home filesystems) and this caused the error

Thanks !
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