Results 1 to 6 of 6

Thread: mkinitramfs error during luks setup

  1. #1
    Join Date
    2018-Aug
    Posts
    3

    mkinitramfs error during luks setup

    Greetings,

    i'm trying to follow the instructions for encrypting a RPi/3 with Kali as shown here as several other have. I've searched through the other issues on here and didn't find a solution to the problem I'm having.

    When creating the initramfs.gz I get a couple of errors:
    Code:
    [email protected]:/# [email protected]:/# mkinitramfs -o /boot/initramfs.gz
    cryptsetup: ERROR: Couldn't normalise device /dev/root 
    cryptsetup: ERROR: Couldn't find sysfs directory corresponding to /dev/root
    cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
        nor crypto modules. If that's on purpose, you may want to uninstall the
        'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
        integration and avoid this warning.
    I have found other issues with files being in different directories, but there is no file named "root" in the /dev folder. Using
    Code:
    find / -name root
    returns several files and I don't think I missed a step.

    Any ideas would be appreciated.

    I'm no expert at Linux, I can barely fumble my way through, but I'm learning.
    Last edited by 3dog; 2018-08-15 at 00:02. Reason: Code readability

  2. #2
    Join Date
    2018-Aug
    Posts
    1
    I'm getting the same error. I haven't found anything in the cryptsetup or mkinitramfs documentation to solve the problem yet. Any luck finding a solution, 3dog?

  3. #3
    Had the same issue. Here is how I fixed it.

    1) Force cryptsetup to be included in the initramfs. Open
    Code:
    /etc/cryptsetup-initramfs/conf-hook
    and add the following line to it

    Code:
    CRYPTSETUP=y
    2) Generate initramfs

    Code:
    mkinitramfs -o /boot/initramfs.gz
    3) VERIFY cryptsetup binaries and libraries are included

    Code:
    lsinitramfs /boot/initramfs.gz | grep cryptsetup
    you should have the following output:

    Code:
    usr/lib/arm-linux-gnueabihf/libcryptsetup.so.12
    usr/lib/arm-linux-gnueabihf/libcryptsetup.so.12.3.0
    usr/lib/cryptsetup
    usr/lib/cryptsetup/askpass
    usr/lib/cryptsetup/functions
    usr/sbin/cryptsetup
    4) copy everying to the sdcard as described in the official tutorial step 4 (https://www.kali.org/tutorials/secure-kali-pi-2018/).

    Note: your first boot will be broken. here is how you fix it.
    Take note of the error messages along the lines "device /dev/mapper/crypt does not exist". It will tell you where your encrypted partition sould be mounted.

    5) Wait until you are dropped into initramfs shell, then open your encrypted partition with:

    Code:
    cryptsetup luksOpen /dev/mmcblk0p2 crypt
    6) Verify that your encrypted partition is open:

    Code:
    ls -la /dev/mapper
    7) Once your partition is mounted, exit initramfs by typing

    Code:
    exit
    8) boot into your encrypted system and regenerate initramfs.gz

    Code:
    mkinitramfs -o /boot/initramfs.gz

    Hope this helps
    Last edited by vlad_the_maker; 2018-09-12 at 01:08. Reason: Fixing a typo in configuration option

  4. #4
    Join Date
    2018-Aug
    Posts
    3
    Thanks Vlad. I'll try that and report back

  5. #5
    Join Date
    2017-Apr
    Posts
    5
    vlad_the_maker, thank you for your guide. It has a typo. Instead of line:
    CYPTSETUP=y
    It should be:
    CRYPTSETUP=y

  6. #6
    MiAl, Glad to help. Was the guide pretty easy to follow? Thank you for the typo pointer! Just fixed it.

Similar Threads

  1. Luks on Rpi3 without ssh
    By rigosantana3 in forum ARM Archive
    Replies: 0
    Last Post: 2017-05-21, 18:48
  2. Replies: 2
    Last Post: 2016-09-29, 16:16
  3. LVM over LUKS get error when shutdown
    By BrokenArrow in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2016-09-11, 20:47
  4. Error while Installing Kali from disc, network setup fails
    By ExplodingMonkey in forum Installing Archive
    Replies: 4
    Last Post: 2015-03-07, 06:00

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •