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.
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
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 udev/rules. d', but also under 'etc/udev/rules.d'.
'usr/lib/
$ sudo chzdev dasd-eckd 0.0.0400 -p zdev:early=1 --yes img-5.4. 0-52-generic
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.
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 rules.d/ 41-cio- ignore- root.rules rules.d/ 41-dasd- eckd-0. 0.0200. rules rules.d/ 41-dasd- eckd-0. 0.0400. rules <== udev/rules. d/41-cio- ignore. rules udev/rules. d/41-dasd- eckd-0. 0.0200. rules udev/rules. d/41-dasd- eckd-0. 0.0400. rules <== udev/rules. d/41-generic- ccw-0.0. 0009.rules udev/rules. d/41-qeth- 0.0.0600. rules
etc/udev/
etc/udev/
etc/udev/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
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 0.0.0604: 0.0.0605 configured 0.0.0604: 0.0.0605 img-5.4. 0-52-generic rules.d/ 41-qeth- 0.0.0603. rules | egrep '(layer2| buffer_ count)' 0.0.0603] layer2} ="1" 0.0.0603] buffer_ count}= "128" img-5.4. 0-52-generic | grep 41-qeth- 0.0.0603. rules rules.d/ 41-qeth- 0.0.0603. rules udev/rules. d/41-qeth- 0.0.0603. rules
Configuring devices in the persistent configuration only
QETH device 0.0.0603:
Note: The initial RAM-disk must be updated for these changes to take effect:
- QETH device 0.0.0603:
update-initramfs: Generating /boot/initrd.
Using config file '/etc/zipl.conf'
Building bootmap in '/boot'
Adding IPL section 'ubuntu' (default)
Preparing boot device: dasda (0200).
Done.
$ cat /etc/udev/
ATTR{[ccwgroup/
ATTR{[ccwgroup/
$ lsinitramfs -l /boot/initrd.
-rw-r--r-- 1 root root 1023 Oct 27 09:07 etc/udev/
-rw-r--r-- 1 root root 1023 Oct 27 09:07 usr/lib/