Dracut replacing mkinitcpio? effects

It is a trade-off. On the other hand, unlocking is many times faster than it is with grub.

Of course, that is one of the reasons we offer both grub and systemd-boot. So you can choose the trade-offs you prefer.

Did you setup your data drive in the installer? If you did, it should have unlocked it using the keyfile.

1 Like

No, I did that after installation every time, so thatā€™s the explanation.

1 Like

Of course, that is one of the reasons we offer both grub and systemd-boot. So you can choose the trade-offs you prefer.

Are there plans for making the user choose between dracut and mkinitcpio during the installation, just like there is now for systemd-boot and grub? Iā€™d like to switch to dracut, but Iā€™ve read that making grub-btrfs work with it requires quite a bit of manual intervention, so for now I prefer to stick with mkinitcpio.
Iā€™m asking this because Iā€™m thinking about installing Endeavour OS also on my desktop PC and Iā€™d prefer to have mkinitcpio as an option during installation, that would save me from having to eradicate dracut and installing mkinitcpio right after the initial install.

No, there are currently no plans to do that.

It is possible to convert an install from dracut to mkinitcpio if you would like to. If your machine is not encrypted it is quite easy to switch.

It is also a pretty small change to add support for dracut to grub-btrfs.

Lastly, the changes to support dracut have been commited to grub-btrfs and will be in a future release.

2 Likes

How in the hell do you people put up with Dracut? Over complicated to the extreme!!! There is absolutely nothing wrong with mkinitcpio and itā€™s a hundred times easier to use. The output of Dracut is mostly errors with only a few things it is able to do.

WHY CHANGE SOMETHING THAT WASNā€™T BROKEN!!! With something more complicated and very much not complete?

1 Like

While it is certainly more verbose when it builds the initrd, it seems to be lot easier than mkinitcpio.

In most cases it requires no configuration to work. To me, it seems a lot simpler and more functional than mkinitcpio.

That being said, if you prefer mkinitcpio, you can certainly switch to that.

3 Likes

well, with some help by @dalto that can be found here I configured my dracut to be quiet (like it is on Fedora/RHEL by default) and now all I get is

(4/6) Updating initramfs...
:: Building initramfs for linux (6.1.8-arch1-1)
:: Building fallback initramfs for linux (6.1.8-arch1-1)

A lot less output than mkinitcpio ever generated.
And if there are real errors (what you call errors are simply warnings) they are still displayed.

2 Likes

Exactlyā€¦a lot of so called errors are just informational. :slightly_smiling_face:

Edit: My problem is i donā€™t understand how to it in the way it is explained. Because Iā€™ve not done a lot of these things.

In the script dracut-install in /usr/share/libalpm/scripts. You will need to override the hook by copying it /etc and copy the script anywhere you want and point the hook copy to it.

I donā€™t understand this how to do this?

You will need to override the hook by copying it /etc and copy the script anywhere you want and point the hook copy to it.

Does this mean copy the whole script dracut-install to /etc

How to do this : copy the script anywhere you want and point the hook copy to it. :thinking:

cat /etc/pacman.d/hooks/90-dracut-install.hook 
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Target = usr/lib/modules/*/vmlinuz
Target = usr/lib/dracut/*
Target = usr/lib/systemd/systemd

[Action]
Description = Updating initramfs...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/dracut-install2
NeedsTargets

and in /usr/share/libalpm/scripts/dracut-install2 I simply added the -q (the rest is identical to dracut-install)

        echo ":: Building initramfs for ${pkgbase} (${kver})"
        dracut -q --force --hostonly --no-hostonly-cmdline ${dracut_restore_img} "${kver}"
        install -Dm644 ${dracut_restore_img} "/boot/initramfs-${pkgbase}.img"

        echo ":: Building fallback initramfs for ${pkgbase} (${kver})"
        dracut -q --force --no-hostonly "/boot/initramfs-${pkgbase}-fallback.img" "${kver}"

My personal opinion: the -q should become the default :wink:

Just wait. I am working on adding a simple config file to enable quiet dracut.

3 Likes

I like it when dracut is noisy. At the same time sometimes I want dracut to zip it.

If anyone is searching for a replacement for mkinitcpio-numlock as I did, you can use this:

Would be nice, if someone made this an AUR package.

1 Like

Making an AUR package is usually quite easy. However, it is best done by someone who uses the package.

Why not submit it to the AUR yourself?

The latest versions of eos-dracut and kernel-install-for-dracut now have this functionality.

The config is in /etc/eos-dracut.conf and /etc/kernel-install-for-dracut.conf depending on which package you use.

I am going to update the wiki and the documentation in the next could of days but if you want to play around with it, you can. The config file describes the options and how to set them.

4 Likes

Did grub-btrfs ever get updated for dracut? It doesnā€™t look like it, so I would need to modify that file to get it working right still? Remind me what the overlay is, please.

The change was merged to master but I donā€™t think there has been a release yet.

Yes, unless your system can function with a read-only root. For example, sddm/plasma seems to work fine with only some minor warnings. I think that lightdm and gdm will fail though.

The overlay creates an in-memory filesystem that gets mounted on /. When data is requested, if it isnā€™t in their, it looks in the underlay which is your real / filesystem.

Basically, it allows the read-only filesystem to accept writes even if they arenā€™t actually saved.

2 Likes