Comment 8 for bug 1892367

Revision history for this message
Frank Heimes (fheimes) wrote :

Using the 'zdev:early' device attribute (and setting it to '1') could be indeed an alternative (at least for the most cases), since with this set one is automatically asked if the initramfs should be rebuild - and in combination with '--yes' this question is automatically confirmed.

I've added here a 2nd disk 0400 and lsinitramfs shows that it's not only listed under
'usr/lib/udev/rules.d', but also under 'etc/udev/rules.d'.

$ sudo chzdev dasd-eckd 0.0.0400 -p zdev:early=1 --yes
Configuring devices in the persistent configuration only
ECKD DASD 0.0.0400 configured
Note: The initial RAM-disk must be updated for these changes to take effect:
       - ECKD DASD 0.0.0400
update-initramfs: Generating /boot/initrd.img-5.4.0-52-generic
Using config file '/etc/zipl.conf'
Building bootmap in '/boot'
Adding IPL section 'ubuntu' (default)
Preparing boot device: dasda (0200).
Done.

$ lsinitramfs /boot/initrd.img-5.4.0-52-generic | grep 41
etc/udev/rules.d/41-cio-ignore-root.rules
etc/udev/rules.d/41-dasd-eckd-0.0.0200.rules
etc/udev/rules.d/41-dasd-eckd-0.0.0400.rules <==
usr/lib/udev/rules.d/41-cio-ignore.rules
usr/lib/udev/rules.d/41-dasd-eckd-0.0.0200.rules
usr/lib/udev/rules.d/41-dasd-eckd-0.0.0400.rules <==
usr/lib/udev/rules.d/41-generic-ccw-0.0.0009.rules
usr/lib/udev/rules.d/41-qeth-0.0.0600.rules

However, like Dimitri already pointed out in comment #3, if someone manually modifies udev rules, a manual mkinitramfs is needed, too.

However (moving from the above DASD example to a qeth example) if you specify any further attributes, that you want to get activated, immediately with the chzdev command (like in your case 'buffer_count=128' and probably layer2=1), this will then land in the initramfs as well - and in case 'zdev:early=1' was specified, it will even land in a rule under 'etc/udev/rules.d', too. See:

$ sudo chzdev qeth 0603 -p zdev:early=1 layer2=1 buffer_count=128 --yes
Configuring devices in the persistent configuration only
QETH device 0.0.0603:0.0.0604:0.0.0605 configured
Note: The initial RAM-disk must be updated for these changes to take effect:
       - QETH device 0.0.0603:0.0.0604:0.0.0605
update-initramfs: Generating /boot/initrd.img-5.4.0-52-generic
Using config file '/etc/zipl.conf'
Building bootmap in '/boot'
Adding IPL section 'ubuntu' (default)
Preparing boot device: dasda (0200).
Done.
$ cat /etc/udev/rules.d/41-qeth-0.0.0603.rules | egrep '(layer2|buffer_count)'
ATTR{[ccwgroup/0.0.0603]layer2}="1"
ATTR{[ccwgroup/0.0.0603]buffer_count}="128"
$ lsinitramfs -l /boot/initrd.img-5.4.0-52-generic | grep 41-qeth-0.0.0603.rules
-rw-r--r-- 1 root root 1023 Oct 27 09:07 etc/udev/rules.d/41-qeth-0.0.0603.rules
-rw-r--r-- 1 root root 1023 Oct 27 09:07 usr/lib/udev/rules.d/41-qeth-0.0.0603.rules