help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update-grub fails saying it cannot find a device for /


From: Stefan Blachmann
Subject: Re: update-grub fails saying it cannot find a device for /
Date: Sun, 14 Nov 2021 22:45:59 +0100

Here is it:

541 33 0:50 / /home rw,relatime shared:309 - zfs rpool/home rw,xattr,posixacl
557 33 0:52 / /opt rw,relatime shared:317 - zfs rpool/opt rw,xattr,posixacl
572 33 0:53 / /root rw,relatime shared:325 - zfs rpool/home/root
rw,xattr,posixacl
587 33 0:54 / /tmp rw,relatime shared:333 - zfs rpool/tmp rw,xattr,posixacl
595 33 0:55 / /srv rw,relatime shared:341 - zfs rpool/srv rw,xattr,posixacl
617 33 0:59 / /var/log rw,relatime shared:349 - zfs rpool/var/log
rw,xattr,posixacl
632 33 0:61 / /var/mail rw,relatime shared:357 - zfs rpool/var/mail
rw,xattr,posixacl
635 33 0:60 / /var/snap rw,relatime shared:365 - zfs rpool/var/snap
rw,xattr,posixacl
638 33 0:56 / /var/cache rw,relatime shared:373 - zfs rpool/var/cache
rw,xattr,posixacl
677 33 0:58 / /var/games rw,relatime shared:381 - zfs rpool/var/games
rw,xattr,posixacl
692 33 0:62 / /var/lib/AccountsService rw,relatime shared:389 - zfs
rpool/var/lib/AccountsService rw,xattr,posixacl
707 33 0:57 / /usr/local rw,relatime shared:397 - zfs rpool/usr/local
rw,xattr,posixacl
722 33 0:65 / /var/www rw,relatime shared:405 - zfs rpool/var/www
rw,xattr,posixacl
737 33 0:63 / /var/spool rw,relatime shared:413 - zfs rpool/var/spool
rw,xattr,posixacl
752 33 0:64 / /var/lib/nfs rw,relatime shared:421 - zfs
rpool/var/lib/nfs rw,xattr,posixacl
767 33 0:66 / /var/tmp rw,relatime shared:429 - zfs rpool/var/tmp
rw,xattr,posixacl
782 33 0:67 / /boot rw,nodev,relatime shared:437 - zfs
bpool/BOOT/debian rw,xattr,posixacl
797 33 0:68 / /run rw,relatime shared:445 - tmpfs tmpfs rw
812 33 0:5 / /dev rw,nosuid,relatime shared:6 - devtmpfs udev
rw,size=65896464k,nr_inodes=16474116,mode=755
813 812 0:22 / /dev/pts rw,nosuid,noexec,relatime shared:7 - devpts
devpts rw,gid=5,mode=620,ptmxmode=000
814 812 0:29 / /dev/shm rw,nosuid,nodev shared:8 - tmpfs tmpfs rw
815 812 0:19 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:21 -
mqueue mqueue rw
816 812 0:35 / /dev/hugepages rw,relatime shared:23 - hugetlbfs
hugetlbfs rw,pagesize=2M
887 33 0:21 / /proc rw,nosuid,nodev,noexec,relatime shared:19 - proc proc rw
888 887 0:34 / /proc/sys/fs/binfmt_misc rw,relatime shared:20 - autofs
systemd-1 rw,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19632
917 33 0:20 / /sys rw,nosuid,nodev,noexec,relatime shared:14 - sysfs sysfs rw
918 917 0:6 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime
shared:15 - securityfs securityfs rw
919 917 0:31 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime
shared:16 - cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot
920 917 0:32 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime
shared:17 - pstore pstore rw
921 917 0:33 / /sys/fs/bpf rw,nosuid,nodev,noexec,relatime shared:18 -
bpf none rw,mode=700
922 917 0:7 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime
shared:22 - debugfs debugfs rw
923 917 0:11 / /sys/kernel/tracing rw,nosuid,nodev,noexec,relatime
shared:24 - tracefs tracefs rw
924 917 0:36 / /sys/kernel/config rw,nosuid,nodev,noexec,relatime
shared:25 - configfs configfs rw
925 917 0:37 / /sys/fs/fuse/connections
rw,nosuid,nodev,noexec,relatime shared:26 - fusectl fusectl rw
1052 812 0:5 / /dev rw,nosuid,relatime shared:6 - devtmpfs udev
rw,size=65896464k,nr_inodes=16474116,mode=755
1053 1052 0:22 / /dev/pts rw,nosuid,noexec,relatime shared:7 - devpts
devpts rw,gid=5,mode=620,ptmxmode=000
1054 1052 0:29 / /dev/shm rw,nosuid,nodev shared:8 - tmpfs tmpfs rw
1055 1052 0:19 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:21
- mqueue mqueue rw
1056 1052 0:35 / /dev/hugepages rw,relatime shared:23 - hugetlbfs
hugetlbfs rw,pagesize=2M
1192 887 0:21 / /proc rw,nosuid,nodev,noexec,relatime shared:19 - proc proc rw
1193 1192 0:34 / /proc/sys/fs/binfmt_misc rw,relatime shared:20 -
autofs systemd-1
rw,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19632
1246 917 0:20 / /sys rw,nosuid,nodev,noexec,relatime shared:14 - sysfs sysfs rw
1247 1246 0:6 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime
shared:15 - securityfs securityfs rw
1248 1246 0:31 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime
shared:16 - cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot
1249 1246 0:32 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime
shared:17 - pstore pstore rw
1250 1246 0:33 / /sys/fs/bpf rw,nosuid,nodev,noexec,relatime shared:18
- bpf none rw,mode=700
1251 1246 0:7 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime
shared:22 - debugfs debugfs rw
1252 1246 0:11 / /sys/kernel/tracing rw,nosuid,nodev,noexec,relatime
shared:24 - tracefs tracefs rw
1253 1246 0:36 / /sys/kernel/config rw,nosuid,nodev,noexec,relatime
shared:25 - configfs configfs rw
1254 1246 0:37 / /sys/fs/fuse/connections
rw,nosuid,nodev,noexec,relatime shared:26 - fusectl fusectl rw
1516 797 0:23 / /run rw,nosuid,nodev,noexec,relatime shared:9 - tmpfs
tmpfs rw,size=13184552k,mode=755
1517 1516 11:0 / /run/live/medium ro,noatime shared:10 - iso9660
/dev/sr0 ro,nojoliet,check=s,map=n,blocksize=2048
1518 1516 7:0 / /run/live/rootfs/filesystem.squashfs ro,noatime
shared:11 - squashfs /dev/loop0 ro
1519 1516 0:25 / /run/live/overlay rw,noatime shared:12 - tmpfs tmpfs
rw,size=65922756k,mode=755
1520 1516 0:30 / /run/lock rw,nosuid,nodev,noexec,relatime shared:13 -
tmpfs tmpfs rw,size=5120k
1521 1516 0:43 / /run/user/1000 rw,nosuid,nodev,relatime shared:267 -
tmpfs tmpfs rw,size=13184548k,nr_inodes=3296137,mode=700,uid=1000,gid=1000
1621 33 0:26 /mnt/sharedwithchroot / rw,noatime shared:1 - overlay
overlay 
rw,lowerdir=/run/live/rootfs/filesystem.squashfs/,upperdir=/run/live/overlay/rw,workdir=/run/live/overlay/work


On 11/14/21, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
> On 14.11.2021 19:52, Stefan Blachmann wrote:
>> No idea why grub-probe fails finding the / disk.
>>
>> To make the update-grub script work, could it be a workaround to
>> replace grub-probe with a dummy script that just echoes "hd0,gpt4" or
>> such?
>>
>
> No.
>
>> How does look a correct output when grub-probe does not fail?
>>
>
> It depends on command options.
>
>>
>> On 11/14/21, Stefan Blachmann <sblachmann@gmail.com> wrote:
>>> Thank you for the quick reply, Andrei!
>>>
>>> I have mounted not only /dev, but also /sys, /proc and /run into the
>>> chroot, too. Didn't mention that to keep mail short.
>>>
>>> Meanwhile I found a possible hint:
>>> As there was no device.map file, I ran grub-mkdevicemap.
>>> This did no change again, update-grub still fails.
>>>
>>> Then, after a lot of searching the web, I found the second answer on
>>> this page might be a hint:
>>> https://serverfault.com/questions/401351/update-grub2-without-hardware-access-e-g-in-a-chroot
>>>
>>> It basically says that I should use disk UUIDs instead of disk ids.
>
> This is red herring.
>
> Show output of
>
> cat /proc/self/mountinfo
>
> In chroot.
>
>>> Now the problem is that grub-mkdevicemap does not make a device.map
>>> using UUIDs, it uses the IDs under /dev/disk/by-id.
>>>
>>> And I cannot add links to UUIDs as the answer on that page recommends.
>>> Because for reasons I do not understand, in /dev/disk/by-uuid I can
>>> see only the UUIDs of the *mounted* file systems (eg the live CD, and
>>> the ZFS boot and root filesystems), but of the drives themselves. I
>>> can not see UUIDs.
>>>
>>> When I manually change the /dev/disk/by-id/ device.map file entries to
>>> /dev/sda, sdb etc, there is no change in behaviour, update-grub still
>>> fails the same way.
>>>
>>> This is on Debian bullseye, which I assume uses GRUB 2.
>>>
>>> Any idea what could be done to make update-grub succeed?
>>>
>>>
>>>
>>> On 11/14/21, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>>>> On 14.11.2021 16:31, Stefan Blachmann wrote:
>>>>> When I enter
>>>>> # update-grub
>>>>> I get an error message:
>>>>> /usr/sbin/grub-probe: error: cannot find a device for / (is /dev
>>>>> mounted?).
>>>>>
>>>>> /dev has been mounted before entering the chroot /mnt environment
>>>>> using
>>>>> # mount --rbind /dev /mnt/dev
>>>>>
>>>>
>>>> In chroot you need at least /sys and /proc in addition to /dev, /run
>>>> may
>>>> also be needed.
>>>>
>>>>> If I enter
>>>>> # grub-probe
>>>>> it answers:
>>>>> No path or device is specified.
>>>>>
>>>>> If I enter
>>>>> # grub-probe /boot
>>>>> it answers:
>>>>> zfs
>>>>>
>>>>> So, what do I need to do to make update-grub work?
>>>>>
>>>>
>>>>
>>>>
>>>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]