You are right. The kernel file grows and grows and grows. I never said that
it's perfect. You seem to understand well what I'm trying to do and you are
able to give good suggestions. It's me that I'm not a pro. I'm a hobbyist.
Anyway,you suggested the road to take. It seems that there isn't any CPIO
parameter that overwrites the old image. Is this correct ? I remember that
the old method (unpack and repack the files inside the kernel image)
failed. I'm not able to understand why. Some one of you gave a look at the
commands that I have used ? Men,I try to do my best,but as I said,I'm not a
pro. I presume that,if there isn't any CPIO parameter that overwrites the
old image,the only chance that I have to avoid that the kernel file grows
forever is to unpack,delete the unwanted files and repack it. If you agree
with that,I wish to use that method. But to do that I need someone of you
give me some indication about how it didn't work. Below I have repeated the
commands that I have used,since the older ones may get lost in the space :

cd /home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot

gunzip initrd.img-5.10.0-19-amd64.gz : has been produced a cpio file called
:  initrd.img-5.10.0-19-amd64

mv initrd.img-5.10.0-19-amd64 initrd.img-5.10.0-19-amd64_

cpio -idv < initrd.img-5.10.0-19-amd64_ : it has been unpacked and then
I've copied the files inside a folder called initrd.img-5.10.0-19-amd64

cd
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot/initrd.img-5.10.0-19-amd64/


cp /usr/share/plymouth/debian-logo.png
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot/initrd.img-5.10.0-19-amd64/usr/share/plymouth/

cp /usr/share/plymouth/themes/homeworld/debian.png
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot/initrd.img-5.10.0-19-amd64/usr/share/plymouth/themes/homeworld

cp /usr/share/plymouth/themes/homeworld/logo.png
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot/initrd.img-5.10.0-19-amd64/usr/share/plymouth/themes/homeworld

mv initrd.img-5.10.0-19-amd64 initrd.img-5.10.0-19-amd64-

cd
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot/initrd.img-5.10.0-19-amd64-

find . -print -depth | cpio -ov > ../initrd.img-5.10.0-19-amd64 : generated
the cpio file called initrd.img-5.10.0-19-amd64

cd ..

gzip initrd.img-5.10.0-19-amd64 : generated the gzip file called "
initrd.img-5.10.0-19-amd64"

cd /home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-root/boot/

mv initrd.img-5.10.0-19-amd64 initrd.img-5.10.0-19-amd64_

cp 
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-disk/boot/initrd.img-5.10.0-19-amd64.gz
/home/ziomario/Scrivania/PassT-Cubic/Debian-new/custom-root/boot/

size of the new (initrd.img-5.10.0-19-amd64) file is 178.4 MiB (187,099,720
byte),of the old one is : 78.8 MiB (82,661,551 byte) ; so probably there is
something not good if the sizes are so different ? I tried to boot the new
ISO image generated by cubic but I've got the following error :
https://ibb.co/GCBFcpK

that's it. Or maybe another solution is to append a new image inside the
kernel  image only when a new kernel  is detected. In this case I need to
study deeply how to do that. At the moment I have no idea.


Il giorno mar 25 ott 2022 alle ore 21:20 Thomas Schmitt <scdbac...@gmx.net>
ha scritto:

> Hi,
>
> Mario Marietto wrote:
> > 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.
>
> I have to confess that i quite lost track of your adventure.
>
> But if you want to execute your script each time the system boots, won't
> your initrds grow and grow and grow ? cpio -A does not overwrite old files
> in the archive but just appends a new version of the file.
>
> At least i cannot spot code which would detect a newly installed kernel.
>
>
> Have a nice day :)
>
> Thomas
>
>

-- 
Mario.

Reply via email to