Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to stop installkernel from making an initramfs?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Wed Jan 31, 2024 2:06 pm    Post subject: How to stop installkernel from making an initramfs? Reply with quote

So, I understand installkernel recently changed its behavior to install and use dracut. Prior to this, the way I've installed a kernel was this:

Code:
/usr/src/linux # make -j17 && make -j17 modules_install
# make install
# genkernel --lvm --mdadm --kernel-config=/usr/src/linux/.config initramfs
# nano /boot/grub/grub.cfg % (to manually edit the grub file to point to the new files)


I've disabled dracut through the USE flag. Now, however, the second command still puts an initramfs file into /boot, which I do not want. How do I stop it from doing this?

Cheers,

EE
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 266
Location: Nijmegen

PostPosted: Wed Jan 31, 2024 2:57 pm    Post subject: Re: How to stop installkernel from making an initramfs? Reply with quote

ExecutorElassus wrote:

I've disabled dracut through the USE flag. Now, however, the second command still puts an initramfs file into /boot, which I do not want. How do I stop it from doing this?


Which version of dracut and which version of installkernel? With the latest versions of both no initramfs should be generated if the dracut flag is disabled.

Of course, removing the dracut package will also work.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
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
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Wed Jan 31, 2024 3:24 pm    Post subject: Reply with quote

On the initial run I was using installkernel-16. Then I added "-dracut" to its USE, and emerged installkernel-19 and unmerged dracut. I don't know which version it was. But after that, running `make install` still placed an initramfs file on /boot.

Are you saying that should no longer happen with my system as it's now configured?

Cheers,

EE
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 266
Location: Nijmegen

PostPosted: Wed Jan 31, 2024 4:44 pm    Post subject: Reply with quote

ExecutorElassus wrote:
Are you saying that should no longer happen with my system as it's now configured?


Dracut is not on your system but you still end up with an initramfs in /boot?

Either something else is generating one (unlikely), or you still have a left over initrd file at /usr/src/linux-x.y.z/arch/x86/boot/initrd (or equivalent for your architecture).

Unfortunately the traditional installkernel (USE=-systemd) generates it at the same place as the kernel image, so if you drop initramfs generation (i.e. set USE=-dracut) this file will still be left behind and it will still get picked up by the main installkernel script. It's an annoyance in the original design that I don't think we can get rid of without breaking things elsewhere. Systemd's kernel-install (USE=+systemd) is a bit better in this regard in the sense that it will never alter the kernel source tree.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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