Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(Solved) Grub mkconfig problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
NismoC32
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 198

PostPosted: Tue Jan 01, 2019 10:52 pm    Post subject: (Solved) Grub mkconfig problems Reply with quote

I get this error message when trying to update my grub-cfg:

Code:
Home-PC ~ # grub-mkconfig -o /boot/grub/grub.cfg
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
Home-PC ~ #


my df shows this:
Code:
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      btrfs     224G   79G  144G  36% /
devtmpfs       devtmpfs   10M     0   10M   0% /dev
tmpfs          tmpfs     3.2G  532K  3.2G   1% /run
cgroup_root    tmpfs      10M     0   10M   0% /sys/fs/cgroup
none           tmpfs      16G   76M   16G   1% /dev/shm
/dev/sda1      btrfs     477G  450G   27G  95% /mnt/LocalData
tmpfs          tmpfs      10G  124K   10G   1% /var/tmp/portage
tmpfs          tmpfs     2.0G   32K  2.0G   1% /tmp
none           tmpfs      16G   52K   16G   1% /run/user/1000


Why /dev/root for / ?
It's supposed to be /dev/(device id) in my case nvme0n1p1


Any idea what have happened here, are these two problems related ?

This is a snippet from my my grub.cfg
Code:
## BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6a843272-9004-4d42-938b-63edc1c9a074' {
        load_video
        set gfxpayload=2560x1440x24,2560x1440,1280x1024,1024x768
        insmod gzio
        insmod part_gpt
        insmod btrfs
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  6a843272-9004-4d42-938b-63edc1c9a074
        else
          search --no-floppy --fs-uuid --set=root 6a843272-9004-4d42-938b-63edc1c9a074
        fi
        echo    'Loading Linux 4.19.12-gentoo ...'
        linux   /boot/vmlinuz-4.19.12-gentoo root=/dev/nvme0n1p1 ro quiet
}


fdisk -l
Code:
Home-PC ~ # fdisk -l
Disk /dev/nvme0n1: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Disk model: Force MP500                             
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: 9BD9419E-7690-4DD6-9BC4-35594CA9C102

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048 468656127 468654080 223.5G Linux filesystem
/dev/nvme0n1p2 468656128 468860927    204800   100M EFI System


Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: Samsung SSD 840
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: 5463926F-DD5E-4280-8A74-D11EEBC1D56F


Let me know if you need more info on config files.


Last edited by NismoC32 on Thu Jan 03, 2019 6:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
thatotherguy007
n00b
n00b


Joined: 22 May 2007
Posts: 7

PostPosted: Wed Jan 02, 2019 5:18 pm    Post subject: Reply with quote

The /dev/root device should be a symlink to the real root block device. Check
Code:
ls -l /dev/root
to make sure that this was handled by openrc correctly.

Quote:
Why /dev/root for / ?


I've never figured out why that was chosen, but it is for automatic "it just works" behavior on a variety of setups. What that solves, I have no clue.

What is in your /etc/fstab?
Back to top
View user's profile Send private message
NismoC32
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 198

PostPosted: Wed Jan 02, 2019 5:24 pm    Post subject: Reply with quote

Actually there is no /dev/root
Checking out the /dev folder i can see that both block and disk folder are missing too.

Are there something missing in my kernel maybe ?

This is my fstab:
Code:
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
LABEL=Gentoo            /                       btrfs           defaults,discard,compress=lzo   1 1
LABEL=efi               /boot/efi               vfat            noauto,noatime          0 0
LABEL=Local-Data        /mnt/LocalData          btrfs           defaults,discard                0 2

tmpfs                   /var/tmp/portage        tmpfs           size=10G,mode=0777      0 0
tmpfs                   /tmp                    tmpfs           size=2G,mode=0777       0 0

proc                    /proc                   proc            defaults                0 0
none                    /dev/shm                tmpfs           defaults                0 0
#efivarfs               /sys/firmware/efi/efivars       efivarfs        defaults        0 0
Back to top
View user's profile Send private message
thatotherguy007
n00b
n00b


Joined: 22 May 2007
Posts: 7

PostPosted: Wed Jan 02, 2019 8:23 pm    Post subject: Reply with quote

Assuming you run OpenRC, does
Code:
rc-update
list these services
Code:
                devfs |                                 sysinit   
                 mtab | boot                                   
                sysfs |                                 sysinit     
                 udev |                                 sysinit
         udev-trigger |                                 sysinit

?

I'm thinking udev-trigger didn't start, or something in your intramfs is choking on "LABEL=Gentoo".

Temporary fix:
Code:
ln -s /dev/nvme0n1p1 /dev/root
Back to top
View user's profile Send private message
NismoC32
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 198

PostPosted: Thu Jan 03, 2019 4:47 am    Post subject: Reply with quote

All the services in your list above exists in my list too.

Temporally fix did work, so I manages to run grub-mkconfig.
and I don't use initramfs

But the problem remains

Some of the symptoms I have noticed on my system is:
Very long boot time (Have to press enter after a while to get the sddm)
Udisks reporting for the sensor app have disappeared (No drive temp.)
PartitionManager using a long time to scan drives, but does not give any error messages
NetworkManager does not work, have to manually set up networking, routing and populating reslov.conf
NIC names has gone back to eth0, eth1 from ens6p or something like that.

Unfortunately I don't get any screen output in fb mode during boot so I can't see whats going on during boot.
Never figured out why this is when using Nvidia binaryes (Works fine if I switch to nouvea)

I have cloned the OS to a new disk to see if my SSD was somehow damaged but the problem remained the same.
I can't find any interesting in the logs ether.
Back to top
View user's profile Send private message
thatotherguy007
n00b
n00b


Joined: 22 May 2007
Posts: 7

PostPosted: Thu Jan 03, 2019 3:17 pm    Post subject: Reply with quote

Quote:
and I don't use initramfs


So what is putting "/dev/root" in your mtab!? You might want to check that
Code:

btrfs filesystem label
cat /etc/fstab
cat /boot/grub/grub.cfg | grep linux | grep root

have the same reference for your root file system (case sensitive).

These all sound like an issue with udev:

Quote:

Very long boot time (Have to press enter after a while to get the sddm)
Udisks reporting for the sensor app have disappeared (No drive temp.)
PartitionManager using a long time to scan drives, but does not give any error messages
NetworkManager does not work, have to manually set up networking, routing and populating reslov.conf
NIC names has gone back to eth0, eth1 from ens6p or something like that.


Especially the last one, since it should be only udev in control of card renaming. I would reinstall everything udev related, paying close attention to any "CONFIG_<kernel option here> not set" errors. If you don't use sys-apps/systemd, you may also consider switching to the sys-fs/eudev implementation from sys-fs/udev (strongly hooked into systemd) if that's the one you have installed.

Quote:
I don't get any screen output in fb mode during boot


It's not ideal, but if you turn off all kernel framebuffer stuff, you should get a text-only console on almost all x86 systems. (It looks terrible, but it works.) Or, the in-kernel vesa driver might work.
Back to top
View user's profile Send private message
NismoC32
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 198

PostPosted: Thu Jan 03, 2019 6:16 pm    Post subject: Reply with quote

I switched from udev to eudev and everything is working again :D

Looks like the latest udev is no longer working for OpenRC anymore.

Now to figure out the darn fb and nvidia-binary problem.
Had this problem for several years now but that is for a new thread/topic

Thanks for all the help man much appreciated.
Back to top
View user's profile Send private message
thatotherguy007
n00b
n00b


Joined: 22 May 2007
Posts: 7

PostPosted: Thu Jan 03, 2019 9:25 pm    Post subject: Reply with quote

Best of luck with your frame buffer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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