I could use help - LUKS header to /boot and Crypttab edit

Discussion in 'all things UNIX' started by Palancar, Jan 12, 2024.

  1. Palancar

    Palancar Registered Member

    Joined:
    Oct 26, 2011
    Posts:
    2,500
    Aspiration and intent is to copy my LUKS header on my LVM Debian system to my /boot USB stick. I actually have copied the validated and proven backup LUKS image to the USB already. I now want to boot from that USB allowing me to completely remove the LUKS header from the SSD.

    I CANNOT GET THE PATH CORRECT so any help here would be appreciated.

    For the sake of this post my lvm is named Vault (this was a personal install and works perfectly). This system is installed and running only on the /dev/sda2 partition. My LUKS backup header is named sda2.img for the record. Of course the entire /boot is located on the USB already, and performing flawlessly.

    I opened my crypttab and edited the changes as shown below:
    sudo gedit /etc/crypttab

    # <target name> <source device> <key file> <options>
    Vault /dev/sda2 none luks,header=/boot/sda2.img

    # original line below:
    #Vault /dev/sda2 none luks

    After changing crypttab I regenerated initramfs using terminal below:

    sudo dpkg-reconfigure linux-image-6.1.0-17-amd64

    dpkg reports that there is no such sda2.img file. I can toogle into /boot and see it though. Must be something wrong in the way I am writing the path in crypttab!!

    I even attempted to add the updating of grub which completes with no errors.

    Completes without any errors
    sudo update-grub && sudo grub-install /dev/sdb

    Something simple is going on here but I can't see it. Please send me some thoughts.


    edit: do I need a better defined path between header= [but before] /boot/sda2.img? Not sure!
     
    Last edited: Jan 12, 2024
  2. Palancar

    Palancar Registered Member

    Joined:
    Oct 26, 2011
    Posts:
    2,500
    I guess what I am trying to do is not a common thing here anyway. 195 views and no thoughts, LOL! I will keep tinkering along. I have tried like 40 variations to the path in crypttab but no luck so far. Hmmmmmmmmmmmmmmmmmm!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.