Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Change kernel image install location

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
teissler
Posts: 3
Joined: 2022-01-23 14:29

[SOLVED] Change kernel image install location

#1 Post by teissler »

Hello,

i have an EFI server with a small /boot partition (~230MB - ext2), which is always nearly full, and a /boot/efi partition (~512MB - vfat) which is nearly empty.
After the /boot partition was full today, after running an upgrade, i asked myself if it wouldn't be a good idea to install the kernel and initrd images into /boot/efi instead of /boot.

But even after searching the internet and reading several manpages (kernel-install, installkernel, ...) i don't know for how to achive this.
Even looking at the preinst and postinst scripts of the linux-image-amd64 package doesn't help me to fix this.

I thought i was asked where to install the kernel images while installing debian to another system a while ago, so i'm pretty sure that it is possible, but i need help to know how.

So if anybody knows, please let me know.

Kind regards,

Timo
Last edited by teissler on 2022-01-24 09:32, edited 1 time in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Change kernel image install location

#2 Post by p.H »

teissler wrote: 2022-01-23 16:04 i asked myself if it wouldn't be a good idea to install the kernel and initrd images into /boot/efi instead of /boot.
IMO mounting the EFI partition on /boot is not a good idea.
1) GRUB expects the EFI partition to be mounted on /boot/efi, not /boot. Other boot loaders (systemd-boot) may have different expectations.
2) IIUC, the Debian package management expects /boot to be in a POSIX filesystem (need to create hard links...), which FAT used for the EFI partition is not.

You could set MODULES=dep in /etc/initramfs-tools/initramfs.conf to reduce the size of the initramfs. Caveat: the generated initramfs may not boot on a different hardware.
Or you could reduce the EFI partition and extend the /boot partition, or swap the two partitions.
teissler wrote: 2022-01-23 16:04 I thought i was asked where to install the kernel images while installing debian to another system a while ago,
I do not remember ever seeing this. Wasn't it rather where to install the boot loader ?

teissler
Posts: 3
Joined: 2022-01-23 14:29

Re: Change kernel image install location

#3 Post by teissler »

Hello p.H,

thanks for your answer.

I didn't want to change the mountpoint of any of the directories, i thought it is possible to install the kernels into /boot/efi instead of /boot.
But you brought me to a much better solution... i will shrink the /boot/efi partition and increase the /boot partition :-)

Thank you!

But still i'm asking myself if the above is possible somehow.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Change kernel image install location

#4 Post by p.H »

I do not see how that would be possible. linux-image packages are hardcoded to install the kernel image in /boot.

teissler
Posts: 3
Joined: 2022-01-23 14:29

Re: Change kernel image install location

#5 Post by teissler »

ok. thank you!

Post Reply