0

I would like to hide the device name of the LUKS-encrypted disk that is supposed to be unlocked during boot on Kali Purple. Currently whenever I boot my system there is a password prompt and below a small text banner which reads "Please unlock disk sda1_crypt" (example name). I am interested in removing this device name banner to enable additional security through obscurity during boot.

Is this possible or feasible at all?

Thank you

1
  • 1
    Besides whether this is doable or not (I have no idea and it would be kinda cool to be able to change the message), I'm curious, what kind of additional security would this provide? I'm failing to see how the crypto device name could be considered a leak in this context
    – kos
    Commented Apr 3 at 10:54

1 Answer 1

0

Well, changing that message might not be possible (or maybe). I can recommend you to rename the device name using dmsetup command.

Warning: Do not run these commands without understanding them. A simple mistake will boot your system to intitramfs.

Here goes a similar question (not exactly the same). It's solution will help you in renaming it to something else. How to change the name an encrypted full-system partition is mapped to

Here's a brief summary of commands that you might need from that guide.

sudo dmsetup rename /dev/mapper/sda1_crypt myhiddenname
sudo sed -i 's/sda1_crypt/myhiddenname/g' /etc/crypttab
sudo update-initramfs -u -k all

Note: Do not just copy paste above commands without understanding its parameters. You'll have to verify you're using correct deviice name and there's no typo.

Here, the first command will rename your crypt disk name. You can verify before and after change using lsblk. The second command will change the old name entry to new name in /etc/crypttab file which will tell the new encrypted disk name to be unlocked and the last command is to apply the changes you made in the /etc/crypttab file.

It is technically not changing the message. Instead you are renaming the the name of your crypt disk. If you just wanted to hide sda1 which represents your partition on your sda SATA device, then this solution will work.

3
  • This has caused my system to boot to initramfs instead of booting to desktop and I am unsure on how to proceed here since I am not familiar at all with initramfs TTY. I also do not want to deal with a system stuck on initramfs right now so I will clean install and redo everything up until that final step, where I will share the exact output. I remember seeing errors relating to "missing symbols" (or a symbol mismatch) and multiple firmware errors on running update-initramfs.
    – Max Brod
    Commented Apr 5 at 19:17
  • 1. Kali Linux is not meant for people who just copy-paste commands. 2. It's my mistake that I didn't add a warning for this answer, I'll fix this right now. Commented Apr 5 at 23:47
  • And for your rescue, go through this guide unix.stackexchange.com/questions/689566/… and don't run commands without modifying for your usecase. If your encrypted disk has just root partition, you can just type exit after unlocking disk and root partition will be automatically mounted. Once you're back in your system, share the exact commands you ran (get from history). Commented Apr 5 at 23:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .