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.

  • user_naa@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 hours 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
    
    • ShortN0te
      link
      fedilink
      arrow-up
      3
      ·
      2 hours ago

      Initramfs and initrd are 2 different things, the problem where the confusion happens is that initrd is deprecated since a few years.

      Now, systemd has implemented an interface called systemd-initrd which basically is initramfs.

      I guess here is were the confusion lies. Nowadays everything is initramfs even if it called initrd.

      The original initrd differs from initramfs, but it is no longer a thing.

      Sorry if i came across a little bit snappy have not had a great week so far.

      • gnuhaut
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        45 minutes ago

        Edit: You are right. I looked it up:

        There seems to be an actual technical difference, in the kernel, between an initrd and an initramfs. An initrd is apparently mounted like a normal file system, it’s just in RAM instead of a backed by a block device. An initramfs is a tmpfs into which a (usually cpio) archive is extracted into. The initramfs apparently would be preferable generally, because the kernel understands that it’s a ramdisk, whereas with an initrd it would go through the block device layer, which would mean it would use more ram: If you read a file from an initrd, the kernel would copy the file to ram (unnecessarily, since it’s already in ram) like it would for a filesystem on disk, but for a tmpfs/initramfs, it understands it doesn’t need to do that.

        From a user’s perspective there is no significant functional difference I don’t think, and I don’t think this relevant to OP’s question, that probably has more to do with the userspace tools.