Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/dev/disk/by-id changed between kernel 4.14.0 and 4.14.14
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
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 309
Location: Stockholm

PostPosted: Fri Jan 19, 2018 8:47 am    Post subject: /dev/disk/by-id changed between kernel 4.14.0 and 4.14.14 Reply with quote

/dev/disk/by-id changed somewhere between kernel 4.14.0 and 4.14.14 :twisted:

With 4.14.0-gentoo:
Code:
ls -l /dev/disk/by-id

lrwxrwxrwx 1 root root  9 Jan 19 07:43 ata-Hitachi_HTS547575A9E384_J2540054CUV0GE -> ../../sdb
.
lrwxrwxrwx 1 root root  9 Jan 19 08:38 ata-ST4000LM016-1N2170_W8007PEH -> ../../sda
.
lrwxrwxrwx 1 root root  9 Jan 19 08:38 wwn-0x13321238111510876160x -> ../../sda
.
lrwxrwxrwx 1 root root  9 Jan 19 07:43 wwn-0x13758285531184517120x -> ../../sdb
.

But with 4.14.14-gentoo:
Code:
ls -l /dev/disk/by-id


lrwxrwxrwx 1 root root  9 Jan 19 09:04 scsi-35000000000000001 -> ../../sda
.
lrwxrwxrwx 1 root root  9 Jan 19 09:04 scsi-35000cca63fcbbeef -> ../../sdb
.
lrwxrwxrwx 1 root root  9 Jan 19 09:04 wwn-0x5000000000000001 -> ../../sda
.
lrwxrwxrwx 1 root root  9 Jan 19 09:04 wwn-0x5000cca63fcbbeef -> ../../sdb
.

No problems, but lilo could not be run. Many hours later: Rebuilding kernel with "config_sysfs_deprecated" and changing one line in /etc/lilo.conf solved the problem:
from: boot = /dev/disk/by-id/ata-ST4000LM016-1N2170_W8007PEH
to: boot = /dev/disk/by-id/scsi-35000000000000001
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41101
Location: 56N 3W

PostPosted: Fri Jan 19, 2018 12:09 pm    Post subject: Reply with quote

Irre,

Don't use boot=<symlink>. The symlink is not created until after udev starts, so its a race to get it there before its needed.
PARTUUID is much safer, it fixed until you make a new partition table and the kernel can read it without any userspace help.

Hmm ... lilo. That builds a block list when you run /sbin/lilo then at boot time, closes its eyes and hopes that whatever is in the block list is your kernel asd initrd.
It gets err, interesting, when its not.
That means you won't have the race problem at startup unless you use symlinks in /etc/fstab.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 309
Location: Stockholm

PostPosted: Fri Jan 19, 2018 10:15 pm    Post subject: Reply with quote

boot=xxx

tells lilo where to update boot-record, /dev/sda or /dev/sdb, nothing else. PARTUUID can not be used.

lilo is my favorite boot loader for external usb-disks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41101
Location: 56N 3W

PostPosted: Fri Jan 19, 2018 10:36 pm    Post subject: Reply with quote

Irre,

Its been a long time since I used lilo on a PC.
I did use silo, the SPARC version, a few years ago though.

The boot record is outside any partition, so only whole volume names work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 309
Location: Stockholm

PostPosted: Fri Jan 19, 2018 11:35 pm    Post subject: Reply with quote

This is my lilo.conf to boot different partitions and systems on an external usb-disk. The only drawback I see is that one has to run "lilo" whenever a kernel is updated.
Code:
# /etc/lilo.conf
lba32
compact
#
boot = /dev/disk/by-id/scsi-35000000000000001

# dracut --force --hostonly /boot/initramfs-genkernel-x86_64-4.14.14-gentoo 4.14.14-gentoo <<<<
#
#lilo
#
map = /boot/map
backup = /boot/lilobackup
timeout = 100
vga = normal
prompt
menu-title="Boot via usb-4t /dev/sdX"
image = /boot/kernel-genkernel-x86_64-4.14.14-gentoo
             label = "Linux-4.14.14"
             initrd=/boot/initramfs-genkernel-x86_64-4.14.14-gentoo
             #root = /dev/sdb4
             root = "UUID=76e0b339-221b-45d5-ac44-989f58d03599"
             read-only
image = /boot/kernel-genkernel-x86_64-4.14.0-gentoo
             label = "Linux-4.14.0"
             initrd=/boot/initramfs-genkernel-x86_64-4.14.0-gentoo
             #root = /dev/sdb4
             root = "UUID=76e0b339-221b-45d5-ac44-989f58d03599"
             read-only
image = /boot/kernel-genkernel-x86_64-4.14.13-gentoo
             label = "part2-4.14.13"
             initrd=/boot/initramfs-genkernel-x86_64-4.14.13-gentoo
             #root = /dev/sdb2
             root = "UUID=24754012-32d6-496b-8e8e-263424db3576"
             read-only
image = /boot/kernel-genkernel-x86_64-4.14.4-gentoo
             label = "part2-4.14.4"
             initrd=/boot/initramfs-genkernel-x86_64-4.14.4-gentoo
             #root = /dev/sdb2
             root = "UUID=24754012-32d6-496b-8e8e-263424db3576"
             read-only
image = /sdb3/boot/vmlinuz-4.14.0-15-generic
             label = "Ubu-4.14.0-15"
             initrd=/sdb3/boot/initrd.img-4.14.0-15-generic
             #root = /dev/sdb3
             root = "UUID=2eaec93d-af2d-4d74-b089-cbedb1268f99"
             read-only
image = /sdb3/boot/vmlinuz-4.13.0-17-generic
             label = "Ubu-4.13.0-17"
             initrd=/sdb3/boot/initrd.img-4.13.0-17-generic
             #root = /dev/sdb3
             root = "UUID=2eaec93d-af2d-4d74-b089-cbedb1268f99"
             read-only
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