View previous topic :: View next topic |
Author |
Message |
mattemod n00b
Joined: 23 Nov 2008 Posts: 19 Location: Italy
|
Posted: Fri Oct 04, 2024 3:22 pm Post subject: How to avoid creating /boot/vmlinuz-X.Y.Z.old files? |
|
|
Hello,
I currently use sys-kernel/gentoo-kernel and I'd like to know how I can avoid copying/generating the .old files in /boot (vmlinuz, initramfs, System.map) when I either (re)install a kernel or emerge --configure it.
I know perfectly well that it'd be better to keep them as a fallback in case something goes wrong, but - without going into details - I'm currently in a situation where I need the newly generated files to overwrite the old ones without the .old files being copied/created at all.
I don't know if it's related to Installkernel or Dracut or /etc/kernel/ or what else: I tried to search for it but couldn't find anything definitive, maybe I don't know the right keywords.
Some info:
- I don't use Systemd.
- sys-kernel/installkernel and sys-kernel/dracut are installed, while sys-kernel/genkernel isn't.
- (After reading man 8 installkernel) /usr/lib/kernel/install.conf obviously exists, while /etc/kernel/install.conf doesn't. I can't find a list of possible options anywhere to see if there's one about .old files.
- /etc/kernel/ doesn't contain any files, it only contains the directories install.d, postinst.d and preinst.d with the .keep_sys-kernel_installkernel-0 files.
- grep -Ri .old /usr/lib/kernel/ doesn't give me any related results, so I don't know where the copy is performed.
Tell me if you need to know anything else.
Could you help me and maybe also give me some reference link(s) to read/study?
Thanks _________________ Matteo
Drago Bianco |
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 429 Location: Nijmegen
|
Posted: Fri Oct 04, 2024 4:03 pm Post subject: |
|
|
Install sys-kernel/installkernel with the systemd flag enabled, that implementation does not create .old files (this does not require systemd itself, the dependency is available via sys-apps/systemd-utils).
Traditional installkernel (USE=-systemd) always creates the .old backup files.
Quote: | I'm currently in a situation where I need the newly generated files to overwrite the old ones without the .old files being copied/created at all. |
You may also be able to do what you want by creating the vmlinuz, initramfs etc symlinks (without a version) pointing to the latest versioned kernel, initramfs. Both installkernel implementations will automatically update these versionless symlinks/copies if they are present.
Quote: | so I don't know where the copy is performed. |
In /sbin/installkernel (this code is not in a plugin/hook): https://github.com/projg2/installkernel-gentoo/blob/7e537f874c5ecc0c849b07c0233935ae7ffe9e68/installkernel#L61 _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|