Hi,

I’m trying to encrypt the root filesystem / of a raspberry pi 4 device running under Devuan rpi ( custom kernel )

I’m following LUKS on Raspberry Pi 2021 guide

That explain step by step how achieve this.

But the guide use initramfs and my distro seem to use initrd

So the question, is: should I migrate to initramfs ? and how check whats is inside my current initrd

or keep-up with initrd but then how insert the necessary to enable LUKS drive to be mounted by it ( initrd ) ?

Thanks.

  • gnuhaut@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    3 hours ago

    So, firstly, about the nomenclature: initrd (initial ram disk) and initramfs (initial ram file system) are usually used interchangeably as far as I know. For example, even though my Debian uses initramfs-tools, the generated images are called /boot/initrd.img-*.

    For example, when installing a kernel, apt shows this output on my Debian machine:

    linux-image-6.12.6-amd64 (6.12.6-1) wird eingerichtet ...
    /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.12.6-amd64
    

    What you’re talking about is probably the software used to generate this initial ramdisk, which on Debian is done using initramfs-tools (which contains the mkinitramfs command), while on other distros dracut (command: mkinitrd) might be used.

    I will say it strikes me as weird that Devuan doesn’t use initramfs-tools since it’s a Debian derivative. Maybe you are mistaken about this? Possibly no initrd/initramfs is used at all on this specific Pi version of Devuan? IDK.

  • Justin@lemmy.jlh.name
    link
    fedilink
    arrow-up
    2
    ·
    7 hours ago

    The boot process (e.g. initrd initramfs) is specific to your distro and cannot be changed. Follow a guide for Devuan/Debian.

  • user_naa@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    5 hours ago

    AFAIK initramfs is the same thing as initrd. But do you have update-initramfs command available?

          • user_naa@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            25 minutes ago

            Also systemd says I am using initrd (on my Fedora machine)

            systemd[1]: Running in initrd.
            

            But I have initramfs packed with dracut in /boot folder

            /boot/initramfs-6.12.8-200.fc41.x86_64.img
            
          • user_naa@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            3 hours ago

            Based on first result

            We can use initrd for Linux kernels 2.4 and lower. Conversely, initramfs is for kernels 2.6 and above.

            Since on all modern system initial filesystem is tmpfs sometimes it is confused and initramfs is called initrd (for example: in grub to load initramfs you use initrd command).