File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,19 @@ def custom_rootfs_setup():
175
175
with open (os .path .join (CHROOT_BASEDIR , 'etc/default/zfs' ), 'a' ) as f :
176
176
f .write ('ZFS_INITRD_POST_MODPROBE_SLEEP=15' )
177
177
178
- run_in_chroot (['update-initramfs' , '-k' , 'all' , '-u' ])
178
+ for initrd in os .listdir (f"{ CHROOT_BASEDIR } /boot" ):
179
+ if initrd .startswith ("initrd-" ) and "debug" in initrd :
180
+ os .unlink (f"{ CHROOT_BASEDIR } /boot/{ initrd } " )
181
+
182
+ for kernel in os .listdir (f"{ CHROOT_BASEDIR } /boot" ):
183
+ if not kernel .startswith ("vmlinuz-" ):
184
+ continue
185
+
186
+ kernel_name = kernel .removeprefix ("vmlinuz-" )
187
+ if "debug" in kernel_name :
188
+ continue
189
+
190
+ run_in_chroot (['update-initramfs' , '-k' , kernel_name , '-u' ])
179
191
180
192
# Generate native systemd unit files for SysV services that lack ones to prevent systemd-sysv-generator warnings
181
193
tmp_systemd = os .path .join (CHROOT_BASEDIR , 'tmp/systemd' )
You can’t perform that action at this time.
0 commit comments