Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot find a device for / (is /dev mounted?)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Thu Jan 04, 2024 1:26 pm    Post subject: cannot find a device for / (is /dev mounted?) Reply with quote

A few days ago i wanted to update my kernel as usual, but
Code:
grub-mkconfig -o /boot/grub/grub.cfg
would give the following error message:
Code:
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).

The output of mount:
Code:
/dev/nvme1n1p3 on / type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=10240k,nr_inodes=4062572,mode=755)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=6500896k,nr_inodes=819200,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/nvme1n1p4 on /usr/src type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/nvme0n1p3 on /mnt/lfs type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/nvme1n1p4 on /mnt/lfs/usr/src type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3250444k,nr_inodes=812611,mode=700,uid=1000,gid=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)


I tried reinstalling grub but the error would still pop up.
My temporary workaround is to boot into a livecd and update my grub config from the chroot, but that is very annoying.
Is anybody else facing this problem?

EDIT1
I forgot to mention, when running
Code:
grub-probe --verbose --target=device /

the first line states:
Code:
grub-probe: info: cannot open `/boot/grub/device.map': No such file or directory.

Hope that helps
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3918

PostPosted: Thu Jan 04, 2024 3:11 pm    Post subject: Reply with quote

Are you trying to update grub from within a chroot?
Is selinux running in permissive mode?
If you make changes to an selinux system from a chroot then you need to relabel the filesystem in the next boot.
How many btrfs pools do you have?
_________________
:)
Back to top
View user's profile Send private message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Thu Jan 04, 2024 5:12 pm    Post subject: Reply with quote

1. When i update grub from chroot it works perfectly fine and i can boot into the new kernel.
The error occures when i am not in a chroot.
2. I have selinux not enabled. (my profile is: default/linux/amd64/17.1 (stable))
3. I am not sure about this one. As far as i understand btrfs pools are kind of like a RAID and i definitely dont have a RAID system.

This is my fstab file for reference:
Code:
# nvme1n1
UUID=5AC2-A72B      /efi   vfat   defaults,noauto   0 2
UUID=7edcde9e-0ebb-499f-b97f-f7a50f837d68   none   swap   sw      0 0
PARTUUID=66274bc5-b7a3-5b4b-9dfd-ea6593a8fd76   /   btrfs   defaults,noatime   0 1
UUID=d5dfeece-b501-4677-9c81-84a9451bb286   /usr/src/ btrfs defaults,noatime   0 3

# nvme0n1
UUID=9eef6288-fec8-4bd5-bc01-d79a3faddb4f   /mnt/lfs/ btrfs   defaults,noatime   0 4

# netfs
//server1/share1   /mnt/samba/user   cifs   credentials=/home/user/.smb.cred   0 0
//server1/share2   /mnt/samba/familie   cifs   credentials=/home/user/.smb.cred   0 0

# other
/usr/src   /mnt/lfs/usr/src   none    bind    0 0


Thank you for lokking into this
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3918

PostPosted: Thu Jan 04, 2024 9:22 pm    Post subject: Reply with quote

It seems to me you have not installed grub.
Something like
Code:

grub-install --target=x86_64-efi --efi-directory=/efi
then update grub with
grub-mkconfig -o................

_________________
:)
Back to top
View user's profile Send private message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Fri Jan 05, 2024 10:42 pm    Post subject: Reply with quote

I couldn’t reinstall grub due to the same error as when trying to update grub.
In my desperate tries to fix this problem I unmerged grub and wasn’t able to merge it ever since.
Instead i got a few new error messages, that all look like this:
Code:
build-grub-module-verifier: error: {disk,usb,uhci,ehci,ohci,iorw,acpi,lsacpi}: unsupported relocation 0xa

I am sorry for making this so complicated :cry:
But I think this is related as I was able to merge grub before.
Back to top
View user's profile Send private message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Sun Jan 07, 2024 6:44 am    Post subject: Reply with quote

Ok i wondered why i couldn’t merge grub so i created a new partition and made a new minimal, side by side gentoo install.
Then i fixed all filesystems and UUID’s and (both) fstab files.
And in my new install (where I was able to merge grub) i edited /boot/grub/grub.cfg by hand and added a second entry which boots into my old install.

This setup is actually pretty neat, but I wish I could manage grub from my main install.


Last edited by fabolous_gen2 on Wed Jan 10, 2024 5:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 729
Location: Sota algun pi o alzina...

PostPosted: Wed Jan 10, 2024 4:43 pm    Post subject: Reply with quote

i am suffering that problem from 2 days ago, and i can't undestand what are happening.

are you using kernel 6.7.0?

like fabolous_gen2 now [grub-mkconfig -o /boot/grub/grub.cfg gets all time the /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?) message.

but if i launch inside chroot all it's ok.


:o



fstab
Code:
## nvme0n1
PARTUUID=2946aa6d-2613-8c43-a4f2-6cc38508ffd9      /boot              vfat       noatime                                                   0       2
PARTUUID=0fee0b28-d2ea-9f41-b536-75d37a289423      /                  btrfs      noatime,compress-force=zstd:1,space_cache=v2            0   0

_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470


Last edited by papu on Wed Jan 10, 2024 7:43 pm; edited 2 times in total
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 729
Location: Sota algun pi o alzina...

PostPosted: Wed Jan 10, 2024 7:41 pm    Post subject: Reply with quote

with kernel < 6.7.0 grub works fine again!

may be a problem with 6.7.0?
see screen shots below

https://i.imgur.com/LqVuAQ3.png 6.7.0 don't works

https://i.imgur.com/EaRB8EM.png 6.6.9 works
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 232
Location: Gentoo forums

PostPosted: Wed Jan 10, 2024 7:56 pm    Post subject: Reply with quote

papu,

Is this with sys-boot/grub 2.12? There were a couple of threads these last few days from users having issues with this specific -testing- version.
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 729
Location: Sota algun pi o alzina...

PostPosted: Wed Jan 10, 2024 10:18 pm    Post subject: Reply with quote

eeckwrk99 wrote:
papu,

Is this with sys-boot/grub 2.12? There were a couple of threads these last few days from users having issues with this specific -testing- version.


yes i use it, but i changed to stable with 6.7.0 and grub-mkconfig show up the same message.

i wasn't until i downgrade from 6.7.0 that error vanishes


p.d: nor problmes with 6.6.8-lqx1, 6.6.10-gentoo , 6.6.11-gentoo...
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470
Back to top
View user's profile Send private message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Thu Jan 11, 2024 7:07 pm    Post subject: Reply with quote

i can confirm the same behavior as @papu
only kernel versions >=6.7.0 produce this error

Is this because of nvme or btrfs?
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 729
Location: Sota algun pi o alzina...

PostPosted: Thu Jan 11, 2024 7:30 pm    Post subject: Reply with quote

fabolous_gen2 wrote:
i can confirm the same behavior as @papu
only kernel versions >=6.7.0 produce this error

Is this because of nvme or btrfs?


hey i am testing and discover that if you use initrd with 6.7.0, grub-mkconfig works again.
can you confirm that fabolous_gen2?
https://i.imgur.com/Vv0M7WT.png

i never use inird in my gentoo kernels.

then, whats the point of that? some option that we both have has changed inside of 6.7.0 or something is wrong inside .config, we have to discover that stuff, i think so it's due a btrfs or nvme update( well i don't know :wink: )
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470
Back to top
View user's profile Send private message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Tue Jan 16, 2024 6:50 pm    Post subject: Reply with quote

Sorry for late response. I have as good as no time at the moment but i see if i can spare some over this week.
Back to top
View user's profile Send private message
cc68
n00b
n00b


Joined: 21 Jul 2008
Posts: 6

PostPosted: Wed Jan 17, 2024 8:34 am    Post subject: Reply with quote

I have excactly the same problem with Kernel 6.7.0, also no initrd

Seems to be a general problem. One system is with efi boot other with MBR/GPT, issue is with both.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Wed Jan 17, 2024 1:32 pm    Post subject: Reply with quote

Could any of the affected people also post the output of grub-probe --verbose --target=device / when booting with a 6.7 kernel and when booting with a 'good' kernel? If the kernel is to blame, I expect the "error: cannot find a device for / (is /dev mounted?)" message in the first case, and a normal output in the latter. The error mensaje about device.map that the OP posted seems strange to me in this context.

The code that seems to fail is function grub_guess_root_devices() in grub-core/osdep/unix/getroot.c. Called from probe() here:

util/grub-probe.c
Code:

static void
probe (const char *path, char **device_names, char delim)
{
  char **drives_names = NULL;
  char **curdev, **curdrive;
  char *grub_path = NULL;
  int ndev = 0;

  if (path != NULL)
    {
      grub_path = grub_canonicalize_file_name (path);
      if (! grub_path)
   grub_util_error (_("failed to get canonical path of `%s'"), path);
      device_names = grub_guess_root_devices (grub_path);
      free (grub_path);
    }

  if (! device_names)
    grub_util_error (_("cannot find a device for %s (is /dev mounted?)"), path);
  // ...
}

_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
cc68
n00b
n00b


Joined: 21 Jul 2008
Posts: 6

PostPosted: Wed Jan 17, 2024 3:23 pm    Post subject: Reply with quote

on a system with kernel 6.5.0
Code:

grub-probe --verbose --target=device /
grub-probe: Info: »/boot/grub/device.map« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden.
/dev/sda3


on a current system with kernel 6.7.0
Code:

grub-probe: Info: »/boot/grub/device.map« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden.
grub-probe: Info: changing current directory to /dev.
grub-probe: Info: changing current directory to cpu.
grub-probe: Info: changing current directory to 0.
grub-probe: Info: changing current directory to 1.
grub-probe: Info: changing current directory to 2.
grub-probe: Info: changing current directory to 3.
grub-probe: Info: changing current directory to 4.
grub-probe: Info: changing current directory to 5.
grub-probe: Info: changing current directory to 6.
grub-probe: Info: changing current directory to 7.
grub-probe: Info: changing current directory to 8.
grub-probe: Info: changing current directory to 9.
grub-probe: Info: changing current directory to 10.
grub-probe: Info: changing current directory to 11.
grub-probe: Info: changing current directory to 12.
grub-probe: Info: changing current directory to 13.
grub-probe: Info: changing current directory to 14.
grub-probe: Info: changing current directory to 15.
grub-probe: Info: changing current directory to net.
grub-probe: Info: changing current directory to bus.
grub-probe: Info: changing current directory to usb.
grub-probe: Info: changing current directory to 001.
grub-probe: Info: changing current directory to 002.
grub-probe: Info: changing current directory to 003.
grub-probe: Info: changing current directory to 004.
grub-probe: Info: changing current directory to 005.
grub-probe: Info: changing current directory to 006.
grub-probe: Info: changing current directory to input.
grub-probe: Info: changing current directory to by-path.
grub-probe: Info: changing current directory to by-id.
grub-probe: Info: changing current directory to mapper.
grub-probe: Info: changing current directory to bsg.
grub-probe: Info: changing current directory to shm.
grub-probe: Info: changing current directory to pts.
grub-probe: Info: changing current directory to hugepages.
grub-probe: Info: changing current directory to mqueue.
grub-probe: Info: changing current directory to disk.
grub-probe: Info: changing current directory to by-diskseq.
grub-probe: Info: changing current directory to by-id.
grub-probe: Info: changing current directory to by-path.
grub-probe: Info: changing current directory to by-partlabel.
grub-probe: Info: changing current directory to by-partuuid.
grub-probe: Info: changing current directory to by-uuid.
grub-probe: Info: changing current directory to by-label.
grub-probe: Info: changing current directory to block.
grub-probe: Info: changing current directory to char.
grub-probe: Info: changing current directory to serial.
grub-probe: Info: changing current directory to by-id.
grub-probe: Info: changing current directory to by-path.
grub-probe: Fehler: Gerät für / konnte nicht gefunden werden (ist /dev eingehängt?).
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Wed Jan 17, 2024 5:20 pm    Post subject: Reply with quote

Ah, seeing the whole output, the "info: cannot open `/boot/grub/device.map': No such file or directory" message is just informational, the command actually works and prints "/dev/sda3" for kernel 6.5.0, and fails with "error: cannot find a device for / (is /dev mounted?)" for kernel 6.7.0.

Could someone affected install dev-util/strace and post the output (on a pastebin site if necessary) of strace grub-probe --target=device / 2>&1 with the 6.7 kernel? Without the --verbose this time.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
cc68
n00b
n00b


Joined: 21 Jul 2008
Posts: 6

PostPosted: Wed Jan 17, 2024 8:55 pm    Post subject: Reply with quote

I did the strace, it is temporarily available here:

https://docs.google.com/document/d/1BjDJLrTGTH4IFX99ZTUTF5v6aguqBDDGFEzlKGexiG4
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 729
Location: Sota algun pi o alzina...

PostPosted: Wed Jan 17, 2024 10:42 pm    Post subject: Reply with quote

kernel 6.7.0

C_MESSAGES=C.utf8 strace grub-probe --target=device / 2>&1
https://paste.gentoo.zip/RqQadznw

LC_MESSAGES=C.utf8 grub-probe --verbose --target=device /
Code:
grub-probe: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-probe: info: changing current directory to /dev.
grub-probe: info: changing current directory to dma_heap.
grub-probe: info: changing current directory to bus.
grub-probe: info: changing current directory to usb.
grub-probe: info: changing current directory to 001.
grub-probe: info: changing current directory to 002.
grub-probe: info: changing current directory to 003.
grub-probe: info: changing current directory to 004.
grub-probe: info: changing current directory to 005.
grub-probe: info: changing current directory to 006.
grub-probe: info: changing current directory to 007.
grub-probe: info: changing current directory to 008.
grub-probe: info: changing current directory to input.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to by-id.
grub-probe: info: changing current directory to bsg.
grub-probe: info: changing current directory to mqueue.
grub-probe: info: changing current directory to pts.
grub-probe: info: changing current directory to shm.
grub-probe: info: changing current directory to net.
grub-probe: info: changing current directory to mapper.
grub-probe: info: changing current directory to vfio.
grub-probe: info: changing current directory to snd.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to by-id.
grub-probe: info: changing current directory to char.
grub-probe: info: changing current directory to disk.
grub-probe: info: changing current directory to by-id.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to by-diskseq.
grub-probe: info: changing current directory to by-uuid.
grub-probe: info: changing current directory to by-partuuid.
grub-probe: info: changing current directory to by-label.
grub-probe: info: changing current directory to block.
grub-probe: info: changing current directory to usb.
grub-probe: info: changing current directory to v4l.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to by-id.
grub-probe: info: changing current directory to dri.
grub-probe: info: changing current directory to by-path.
grub-probe: error: cannot find a device for / (is /dev mounted?).

_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470


Last edited by papu on Wed Jan 17, 2024 10:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Wed Jan 17, 2024 10:47 pm    Post subject: Reply with quote

cc68 wrote:
https://docs.google.com/document/d/1BjDJLrTGTH4IFX99ZTUTF5v6aguqBDDGFEzlKGexiG4

Thanks.

Code:
openat(AT_FDCWD, "/", O_RDONLY)         = 4
ioctl(4, BTRFS_IOC_FS_INFO, {max_id=1, num_devices=1, fsid=2d795910-c775-42ed-aa7f-bba5a6c697f0, nodesize=16384, sectorsize=4096, clone_alignment=4096, flags=0}) = 0
ioctl(4, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0x1)} => {uuid=caef47d2-4e4b-44de-88a1-dd016ba6b676, bytes_used=114932318208, total_bytes=127360393216, path="/dev/root"}) = 0
close(4)                                = 0
openat(AT_FDCWD, "/", O_RDONLY)         = 4
ioctl(4, BTRFS_IOC_INO_LOOKUP, {treeid=0, objectid=BTRFS_FIRST_FREE_OBJECTID} => {treeid=BTRFS_FS_TREE_OBJECTID, name=""}) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=170, ...}, AT_EMPTY_PATH) = 0
close(4)                                = 0

That's definitely the code of functions grub_find_root_devices_from_btrfs() and get_btrfs_fs_prefix() in grub-core/osdep/linux/getroot.c. Something related to Btrfs must have changed for the 6.7 kernels. Could you post the output of the same strace, but for kernel 6.5.0? I'd like to compare.

papu wrote:
C_MESSAGES=C.utf8 strace grub-probe --target=device / 2>&1
https://paste.gentoo.zip/RqQadznw

Thank you too, yours is similar.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)


Last edited by GDH-gentoo on Wed Jan 17, 2024 10:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 729
Location: Sota algun pi o alzina...

PostPosted: Wed Jan 17, 2024 10:53 pm    Post subject: Reply with quote

kernel 6.6.12

Code:
~ $ LC_MESSAGES=C.utf8 grub-probe --verbose --target=device /
grub-probe: info: cannot open `/boot/grub/device.map': No such file or directory.
/dev/nvme0n1p3


~ $ LC_MESSAGES=C.utf8 strace grub-probe --target=device / 2>&1 | wgetpaste
https://paste.gentoo.zip/LrlH9o4u
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Thu Jan 18, 2024 1:47 am    Post subject: Reply with quote

papu wrote:
~ $ LC_MESSAGES=C.utf8 strace grub-probe --target=device / 2>&1 | wgetpaste
https://paste.gentoo.zip/LrlH9o4u

Oh, there really is one difference between both kernels:

6.7.0
Code:
ioctl(4, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0x1)} => {uuid=bfaba489-5508-4e90-a240-5012f1554220, bytes_used=54785998848, total_bytes=499804798976, path="/dev/root"}) = 0
6.6.12
Code:
ioctl(4, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0x1)} => {uuid=bfaba489-5508-4e90-a240-5012f1554220, bytes_used=54785998848, total_bytes=499804798976, path="/dev/nvme0n1p3"}) = 0

The same BTRFS_IOC_DEV_INFO ioctl is returning a different string as the value of the path member of the struct btrfs_ioctl_dev_info_args object passed to the ioctl() system call. It's /dev/nvme0n1p3 for the older kernel, which is directly usable by grub-probe, and /dev/root for the newer one. Or at least it is if the rootfs was mounted directly by the kernel instead of by an initramfs, it seems. That might be causing the breakage.

It's too late in my timezone now, I'll have to look into this tomorrow.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
fabolous_gen2
n00b
n00b


Joined: 30 Jul 2023
Posts: 9
Location: Pluto

PostPosted: Thu Jan 18, 2024 11:31 am    Post subject: Reply with quote

Thank you so much for looking into this.

FYI: My root device is not /dev/nvme0n1p3 it's /dev/nvme1n1p3
Why is this even hardcoded in the kernel?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5118
Location: Bavaria

PostPosted: Thu Jan 18, 2024 12:04 pm    Post subject: Reply with quote

fabolous_gen2 wrote:
FYI: My root device is not /dev/nvme0n1p3 it's /dev/nvme1n1p3
Why is this even hardcoded in the kernel?

Usually it is not hardcoded in the kernel. The kernel gets the information which is the root partition from UEFI (if UEFI loads/starts the kernel) OR from a bootmanager (e.g. grub) via the kernel command line parameter root=. Of course you can configure this information into your kernel when doing a manually kernel configuration wiht "make menuconfig".

See more here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Commandline_Parameter
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1703
Location: South America

PostPosted: Thu Jan 18, 2024 12:29 pm    Post subject: Reply with quote

It's not hardcoded in the kernel. It should give different pathnames for different computers.

"ioctls" are interfaces that the kernel exposes to userspace programs through one system call (see man 2 ioctl if you are curious). grub-probe makes use of some of the Btrfs-specific ones if it finds out (by reading /proc/self/mountinfo) that the pathname it is given is the mountpoint of a device with such a filesystem.

One of these ioctls, BTRFS_IOC_DEV_INFO, seems to have changed behaviour and affect grub-probe. Seemingly for one specific corner case:
  • The rootfs is Btrfs.
  • The rootfs is mounted without an initramfs.
I want to post a small C program based on GRUB's code that readers can build and run to test their kernels. I'll try to do that when I come home after work.

EDIT: It doesn't matter where kernels are, grub-probe --target=device / is called unconditionally.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)


Last edited by GDH-gentoo on Sat Jan 27, 2024 5:38 pm; edited 1 time in total
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
Goto page 1, 2, 3  Next
Page 1 of 3

 
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