[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: update-initramfs



Le 11 avril 2023 davidson a écrit :

> # update-initramfs -u
> # update-initramfs: Generating /boot/initrd.img-5.10.0-21-amd64-kg
> W: missing /lib/modules/5.10.0-21-amd64-kg

Of course : /lib/modules/<kernel version> is installed via package. You
have to do it manually to get rid of this error. And without it you can't
achieve a bootable kernel.

> You didn't make backup copies of your most recent kernel, *give them
> funny names*, and keep them in /boot. That is the distinction here, I
> think.

I don't have to do it *manually* I give funny names during build so the
.deb include all is needed. And I only need backup of the package, not
the /boot files. Obviously /boot is for operational files not for backup
ones.

> I believe the OP just wants an extra entry in his grub menu that will
> boot a redundant copy of his latest working kernel. (But that is only
> my understanding, which might be wrong. OP can speak for himself on
> this point.)

Ok to cover grub menu you just have to had it in /etc/grub.d.
You simply copy a block menuentry from /boot/grub/grub.cfg and put it in
something like /etc/grub.d/40_custom. In the copy you can change kernel
params, etc. update-grub will include it in generated grub.cfg.

> It seems to me that building and packaging like you suggest is more
> work than warranted, just to make a backup copy. According to OP's
> report, that simple practice used to work for him.

Building a kernel is much less work than believed. And much much less
complicated too. It requires apt install kernel sources, apt install deps
for build, then do the build. I build with my custom make commands but I
heard there is a dedicated debian stance to even more simplify this
point. Overall it is much less work than manually following updates on a
breaked /boot.


Reply to: