Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sys-boot/syslinux cannot find device for path /boot/extlinux
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
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 336

PostPosted: Sat Oct 12, 2024 6:23 am    Post subject: sys-boot/syslinux cannot find device for path /boot/extlinux Reply with quote

I've just migrated from lilo to extlinux and have booted just fine, however...
The entire time messing with bootloaders, extlinux failed to detect the device for /boot/extlinux, saying

Code:
bstaletic@Gallifrey ~ % doas extlinux -U /boot/
extlinux: cannot find device for path /boot/
extlinux: cannot open device (null)


I can specify the device manually, but maybe there's a problem I'm overlooking?

Additional info:

lsblk wrote:
Code:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0    50G  0 part /
└─sda2   8:2    0 182.9G  0 part /home

ls -lA /boot wrote:
Code:
total 31576
drwxr-xr-x 2 root root     4096 Oct 12 08:02 extlinux
-rw-r--r-- 1 root root      512 Jan  3  2022 boot.0800
lrwxrwxrwx 1 root root       18 Oct 11 09:47 config -> config-6.11.3-test
-rw-r--r-- 1 root root   126244 Oct  6 02:01 config-6.11.2-test
-rw-r--r-- 1 root root   126388 Oct 11 09:47 config-6.11.3-test
lrwxrwxrwx 1 root root       18 Oct  6 02:01 config.old -> config-6.11.2-test
-rw-r--r-- 1 root root        0 Jan  2  2022 .keep
-r--r--r-- 1 root root    59904 Oct 12 07:15 ldlinux.sys
-rw------- 1 root root    25088 Oct 11 09:47 map
lrwxrwxrwx 1 root root       22 Oct 11 09:47 System.map -> System.map-6.11.3-test
-rw-r--r-- 1 root root  5536980 Oct  6 02:01 System.map-6.11.2-test
-rw-r--r-- 1 root root  5535927 Oct 11 09:47 System.map-6.11.3-test
lrwxrwxrwx 1 root root       22 Oct  6 02:01 System.map.old -> System.map-6.11.2-test
lrwxrwxrwx 1 root root       19 Oct 12 08:12 vmlinuz -> vmlinuz-6.11.3-test
-rw-r--r-- 1 root root 10454016 Oct  6 02:01 vmlinuz-6.11.2-test
-rw-r--r-- 1 root root 10445824 Oct 12 08:10 vmlinuz-6.11.3-test
lrwxrwxrwx 1 root root       19 Oct  6 02:01 vmlinuz.old -> vmlinuz-6.11.2-test

ls -lA /boot/extlinux wrote:
Code:
total 440
-rw-r--r-- 1 root root    519 Oct 12 07:56 extlinux.conf
-r--r--r-- 1 root root 115532 Oct 12 07:56 ldlinux.c32
-r--r--r-- 1 root root  59904 Oct 12 07:56 ldlinux.sys
-rw-r--r-- 1 root root 178660 Oct 12 06:37 libcom32.c32
-rw-r--r-- 1 root root  25396 Oct 12 06:37 libutil.c32
-rw-r--r-- 1 root root  26792 Oct 12 06:37 memdisk
-rw-r--r-- 1 root root  26244 Oct 12 06:37 menu.c32

extlinux.conf wrote:
Code:
TIMEOUT 10
ONTIMEOUT gentoo

LABEL gentoo
        KERNEL /boot/vmlinuz
        APPEND net.ifnames=0 rw root=/dev/sda1 init=/sbin/openrc-init sysrq_always_enabled=1

LABEL rescue
        LINUX /boot/vmlinuz
        APPEND net.ifnames=0 ro root=/dev/sda1 single init=/bin/bash sysrq_always_enabled=1

LABEL old
        LINUX /boot/vmlinuz.old
        APPEND net.ifnames=0 rw root=/dev/sda1 init=/sbin/openrc-init sysrq_always_enabled=1

LABEL oldrescue
        LINUX /boot/vmlinuz.old
        APPEND net.ifnames=0 ro root=/dev/sda1 single init=/bin/bash sysrq_always_enabled=1


EDIT: Also, at one point I did extlinux -i /boo --device /dev/sda1, then I realized I shouldn't have and tried to remove /boot/ld*, but ldlinux.sys has 0400 permissions.
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 336

PostPosted: Sat Oct 12, 2024 6:49 am    Post subject: Reply with quote

Okay, so /proc/self/mounts is talking about /dev/root, but on boot I do not have /dev/root symlink.
Manually triggering udevadm does create that symlink.
After that, extlinux can find /dev/root.

So why would the symlink be missing at boot?
To be honest, I'd rather /proc/self/mounts show /dev/sda1 rather than /dev/root

EDIT:

Considering this udev-trigger init script:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/tree/init.d/udev-trigger

I can see my system executing this section:
Code:
   ebegin "Populating /dev with existing devices through uevents"
   udevadm trigger --type=subsystems --action=add
   udevadm trigger --type=devices --action=add
   eend $?

However, the /dev/root symlink is only created in the other section:
Code:
      einfo "Setting /dev permissions and symbolic links"
      udevadm trigger --attr-match=dev --action=add
      udevadm trigger --subsystem-match=net --action=add
      rc=$?
      ewarn "Skipping udev coldplug sequence"
      return $rc


EDIT2:

I tried switching udev-trigger service to hotpugging, but that didn't create the /dev/root symlink either.
However, manually running either of these commands does create the symlink:
Code:
udevadm trigger --attr-match=dev --action=add

Code:
udevadm trigger --type=devices --action=add


Now I'm definitely stumped.
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