Results 1 to 14 of 14

Thread: Issue with Standalone Kali Linux 2021.4 Installation on a USB Drive, Fully Encrypted

  1. #1
    Join Date
    2022-Aug
    Posts
    3

    Issue with Standalone Kali Linux 2021.4 Installation on a USB Drive, Fully Encrypted

    Hi Guys

    I am following the documentation from https://www.kali.org/docs/usb/usb-standalone-encrypted/

    everything was nice and perfect (of course corrected some mistypes like)

    sgdisk --change-name=1:/boot --change-name=2:GRUB --change-name=3:EFI-SP 00change-name=4:swap --change-name=5:rootfs /dev/sda


    but once reached to the section of Btrfs Adjustments
    I am completely stuck.

    the doc states that the debian installer would already create subvolume @rootfs
    the issues are already starting that I can't create subvolumes @, @home, @root and @snapshots as these already exist.
    Next, unmounting /mnt/point and /target/boot/efi (yeah.. my equipment no longer provides any legacy options. EFI or nothing) worked
    but unmounting /target is throwing that the device is busy (even if every single step of the documentation went absolutely fine and nothing was altered)

    At this stage decided to force unmount the /target and continued, but at the point of mounting
    Code:
    mount -o subvol=@rootfs /dev/mapper/LUKS_ROOT /mnt/point
    I am getting the error that I have an invalid argument ...
    That means I am unable to copy the fstab from the mount to the target/etc/fstab and amending the UUID wouldn't work (the fstab which I would be later editing does not even contain @rootfs)

    Would someone be so kind and point me into a direction to make it working?
    So far till now, I was using a live USB with persistant encrypted storage, but once I have found this article as a documenation, I have even ordered myself M2 128GB drive just to place a full Kali onto it

  2. #2
    Join Date
    2021-Jun
    Location
    The Land of the Dead
    Posts
    39
    Quote Originally Posted by xant1s View Post
    ...
    At this stage decided to force unmount the /target and continued, but at the point of mounting
    Code:
    mount -o subvol=@rootfs /dev/mapper/LUKS_ROOT /mnt/point
    I am getting the error that I have an invalid argument ...
    That's not the command it's showing in the tutorial:

    Code:
    mount -o subvol=/ /dev/mapper/LUKS_ROOT /mnt/point

  3. #3
    Join Date
    2021-May
    Location
    UK
    Posts
    772
    If it says you already have the subvolumes, then you have let the automatic set up get too far;

    Do not execute Detect disks. Rather press [Ctrl]+[Alt]+[F3] and then [Enter] in order to open a text console with root privileges. Now Connect the target USB drive on which we will install Kali Linux 2021.4. Use ls /dev before and after connecting in order to discover which device files it is associated with. In my case, the USB pen drive from which I have booted, is /dev/sda, and the target USB drive becomes /dev/sdb.

    You need to start again with a totally blank USB no partitions etc, then slowly work through every step again, read read read, don't just blindly copy paste commands there are steps between (and commands to use to confirm progress) that are important to grasp!

  4. #4
    Join Date
    2022-Aug
    Posts
    3
    Quote Originally Posted by Trihexagonal View Post
    That's not the command it's showing in the tutorial:




    .......


    Quote Originally Posted by Fred Sheehan View Post
    If it says you already have the subvolumes, then you have let the automatic set up get too far;

    Do not execute Detect disks. Rather press [Ctrl]+[Alt]+[F3] and then [Enter] in order to open a text console with root privileges. Now Connect the target USB drive on which we will install Kali Linux 2021.4. Use ls /dev before and after connecting in order to discover which device files it is associated with. In my case, the USB pen drive from which I have booted, is /dev/sda, and the target USB drive becomes /dev/sdb.

    You need to start again with a totally blank USB no partitions etc, then slowly work through every step again, read read read, don't just blindly copy paste commands there are steps between (and commands to use to confirm progress) that are important to grasp!

    I am not blindly copying everything.
    I am not using any automated partitioning. Each time the USB is prepared fresh (so I am deleting partitions, creating new ones, encryptin opening them and etc)
    Next (in Kali installer) I am using manual partitioning after the encrypted partitions are ready and after btrfs partition is set, I am moving to that btrfs adjustments section where, well... following the guide just does not work.

    the @, @home, @root is already present. the @.snapshots is already present so creating a new subvolume @snapshots seems pointless, but as mentioned, I am "following the guide"
    as I always treat such a guide as "well, clearly this guy is smarter than me so I won't be trying anything by my own".
    This is not blindly copying and pasting the commands, but if the author is saying, that I should adjust the partition and set a default subvolume and copy the etc/fstab, this is exactly what I am trying to achieve.

    But, despite using two different computers (as to just to confirm that having a machine which does not support Legacy BOOT isn't the culrprit here) and going through this scenario already 12 times (yep. I already 12 times formatted the drive, created new partitions, encrypted those, opened, and etc) - as soon as I am reaching the stage that I should unmount /target, that does not work (unless I will force unmount it, but at the end the rootfs can't be mounted)
    I have even tried to not even bother with unmounting the /target but instead, creating new mount point (lets say /target/tempmount) but attempting to mount @rootfs does not want to work
    (because such a subvolume does not exist)

    At the moment I am starring at
    Code:
    mount -o subvol=@rootfs /dev/mapper/LUKS_ROOT /mnt/point
    and I am trying to understand to which subvolume the author is reffering too as the debian installer created a lot of subvolumes, but not the @rootfs
    (unless author is reffering to rootfs as "/" ? but why then he would mention at the beginning that it has been created by the installer)

    I know that by reading it, you might be thinking that "the guide is 100% correct, it must be the end user which does not understand it" but with all the fairness, this part seems like maybe it used to work as "out of the box" but something has changed since Kali 21 (version 4) as we are now using Kali 22 v5.

    Would someone be able to confirm how to get around this or if anyone recently was following that guide and managed to sort this adjustments?

  5. #5
    Join Date
    2021-May
    Location
    UK
    Posts
    772
    This might help, its for an encrypted debian 11, install, but creating partitions etc is relevent;

    https://blackpine.io/posts/2022.04.1...lumes-on-luks/

  6. #6
    Join Date
    2021-Jun
    Location
    The Land of the Dead
    Posts
    39
    Quote Originally Posted by xant1s View Post



    .......
    Second line from the top.


    Quote Originally Posted by xant1s View Post
    At the moment I am starring at
    Code:
    mount -o subvol=@rootfs /dev/mapper/LUKS_ROOT /mnt/point
    and I am trying to understand to which subvolume the author is reffering too as the debian installer created a lot of subvolumes, but not the @rootfs
    (unless author is reffering to rootfs as "/" ?
    Files in Unix System are organized into multi-level hierarchy structure known as a directory tree. At the very top of the file system is a directory called "root" which is represented by a "/". All other files are "descendants" of root.

    https://www.geeksforgeeks.org/unix-file-system/

    .......

  7. #7
    Join Date
    2022-Oct
    Posts
    1
    I can confirm what OP has described in this thread. The tutorial does not work starting with the Btrfs Adjustments section. I run into the exact same problems as the OP.
    Tutorial should be deleted from the websiteit is non-functional unfortunately.

  8. #8
    Join Date
    2021-May
    Location
    UK
    Posts
    772
    At that second mount command, it would need a forward slash wouldn't it?

    mount -o subvol=/@rootfs /dev/mapper/LUKS_ROOT /mnt/point

  9. #9
    Join Date
    2022-Oct
    Posts
    1
    I am struggling with exactly the same problem. I even tried VirtualBox with virtual disks. I always get stuck on Btrfs adjustments when trying to mount @rootfs. Did you find a solution?

  10. #10
    Join Date
    2022-Nov
    Posts
    1
    Quote Originally Posted by smH0 View Post
    I am struggling with exactly the same problem. I even tried VirtualBox with virtual disks. I always get stuck on Btrfs adjustments when trying to mount @rootfs. Did you find a solution?
    Same issue was here. If you look at the intent to get a proper fstab in /etc. It is already there with the @ root in it. So the new installer created that already. The @rootfs is not present and not mounted.
    No need to force unmount either, checking df and mount | grep target to see what is holding the unmount
    You see more volumes under target which you can decently unmount.


    In fstab you need to add the PARTUUID sequence


    So progressing this way I get stuck on the next that fsck.btrfs is not available so initramfs seems to fail.
    Any ideas someone?

  11. #11
    Join Date
    2022-Nov
    Posts
    1
    I've been messing with this for over 2 weeks myself, I would love to get an update and see the tutorial removed/updated

  12. #12
    Join Date
    2022-Aug
    Posts
    3
    I can only say that I have given up with this project.
    I am finding it quite strange, that the guide is present in the documentation. I have tried multiple times to get through it.
    Without and with alcohol (just in case if I was too "strict").
    I am not a linux expert.
    I have been looking after several boxes in my life and had many weird problems to fix in the last 15-20 years
    (where 20 years ago I had no access to the internet to even search for answers or for any knowledge). Still - somehow managed to find my way through issues either with changing the method of the approach or applying "wacky" workarounds.
    With this guide to follow - I am just giving up.
    Sadly, the biggest disappointment here is not that the guide is wrong,
    but as soon as you will post online that the steps "don't add up", the only thing you hear back is "you haven't read the manual, you haven't followed steps in order" and etc.
    Quite disappointing based on the fact that we are on Kali forum. Not on tiktok, facebook group or in GoogleGroups.
    We are on a Kali Linux forum. Few users are reporting that the guide is misleading/not complete and so far the only comments which are not from the users which are having issues, are posts that "we must be doing something wrong".
    Well - partially it is true. We are doing something wrong.
    Otherwise it would work, wouldn't it?

    So.. at this step, I am dropping this project off my list of things to do.
    It's been too long flapping around without seeing any perspectives of getting BTFRS encrypted persistent USB Kali Linux on NVME disk.

  13. #13
    Join Date
    2022-Dec
    Posts
    2
    Check my post below.
    Last edited by d33p3nd; 2022-12-31 at 16:06. Reason: Accidental double post

  14. #14
    Join Date
    2022-Dec
    Posts
    2
    Just use the versions described in the docs (Kali 2021.4 and Xubuntu 20.04). I also had to make '/target/root' and '/target/home' directories in the Btrfs Adjustments chapter. After installation update Kali to the latest version (in my case it was 2022.4) and you're good to go

Similar Threads

  1. Kali LInux Standalone USB installation problems
    By sheiki in forum Installing Archive
    Replies: 1
    Last Post: 2022-04-27, 13:07
  2. Replies: 0
    Last Post: 2017-04-06, 09:46
  3. Encrypted Hard Drive Installation - Renaming the LVM Volume
    By gatherercryptic in forum Installing Archive
    Replies: 2
    Last Post: 2015-03-02, 11:53
  4. Is my Kali Linux installation drive encrypted?
    By thexer in forum Installing Archive
    Replies: 1
    Last Post: 2014-05-22, 11:56
  5. Replies: 0
    Last Post: 2013-05-01, 12:27

Posting Permissions

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