I've renamed the previous script as "check-kernels" and I've saved it on /usr/sbin ; I've added this line inside the file /etc/sudoers :
ALL ALL = NOPASSWD: /usr/sbin/check-kernels and I've created the file below that I have saved inside the folder /etc/xdg/autostart : check-nvidia-kernel.desktop [Desktop Entry] Version=1.0 Type=Application Name=check_kernels GenericName=Add logo and images inside the installed kernel Comment=Add logo and images inside the installed kernel Exec=/usr/sbin/check-kernels Icon=applications-biology Path=/usr/sbin Terminal=false StartupNotify=false Dunno if it is correct. Il giorno lun 24 ott 2022 alle ore 19:14 Mario Marietto < marietto2...@gmail.com> ha scritto: > Almost,but not fully. Because I've realized that as soon as a new kernel > has been installed by the user,logos and images should be added > automatically inside the initrd.img* file. For this reason,I've created the > bash script below. It works,I've tested it. Now I should understand where > to place it and which stage of the linux booting is the better one to > invoke it. I would like to read your suggestions. Thanks. > > #!/bin/bash > > if [ "`id -u`" -ne 0 ]; then > echo "Switching from `id -un` to root" > exec sudo "$0" > exit 99 > fi > > # Lets check the kernel version > > function kernels-check() { > CURRENT_KERNEL_VERSION_LIQUORIX=$(uname --kernel-release | cut > --delimiter="-" --fields=3) > if [ "$CURRENT_KERNEL_VERSION_LIQUORIX" = "liquorix" ]; then > CURRENT_KERNEL_VERSION_GZ='initrd.img-'$(uname --kernel-release | > cut --delimiter="-" --fields=1-3)'-amd64.gz' > CURRENT_KERNEL_VERSION_NO_GZ='initrd.img-'$(uname --kernel-release > | cut --delimiter="-" --fields=1-3)'-amd64' > else > CURRENT_KERNEL_VERSION_GZ='initrd.img-'$(uname --kernel-release | > cut --delimiter="-" --fields=1-2)'-amd64.gz' > CURRENT_KERNEL_VERSION_NO_GZ='initrd.img-'$(uname --kernel-release > | cut --delimiter="-" --fields=1-2)'-amd64' > fi > echo $CURRENT_KERNEL_VERSION_GZ > echo $CURRENT_KERNEL_VERSION_NO_GZ > cp $CURRENT_KERNEL_VERSION_GZ /boot/old > gunzip /boot/old/$CURRENT_KERNEL_VERSION_GZ > echo /usr/share/plymouth/themes/homeworld/debian.png | cpio -H > newc -o -A -F /boot/old/$CURRENT_KERNEL_VERSION_NO_GZ > echo /usr/share/plymouth/themes/homeworld/logo.png | cpio -H newc > -o -A -F /boot/old/$CURRENT_KERNEL_VERSION_NO_GZ > echo /usr/share/plymouth/debian-logo.png | cpio -H newc -o -A -F > /boot/old/$CURRENT_KERNEL_VERSION_NO_GZ > gzip /boot/old/$CURRENT_KERNEL_VERSION_NO_GZ > cp /boot/old/$CURRENT_KERNEL_VERSION_GZ /boot > > } > > kernels-check > > Il giorno lun 24 ott 2022 alle ore 13:36 Thomas Schmitt <scdbac...@gmx.net> > ha scritto: > >> Hi, >> >> Mario Marietto wrote: >> > But the technique below worked : >> >> So your initrd problems are solved now and you managed to modify a Debian >> Live ISO by help of Cubic ? >> >> >> Have a nice day :) >> >> Thomas >> >> > > -- > Mario. > -- Mario.