Announcement

Collapse
No announcement yet.

LUKS encrpted Partition home out of space. Decrypt ? How ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] LUKS encrpted Partition home out of space. Decrypt ? How ?

    Installed too much on Laptop today.
    Now cannot get into KDE. Gets stuck at Login.

    Have tried everything to remove files, via
    F2 console after entering pass phrase.

    Have tried to temporarily decrypt access via Knoppix, but eg Gparted
    cannot do it, and Dolphin cannot do it. Shows blank file system.

    What was careless over-install, has turned into a nightmare.
    I now may loose access to files because of this !
    From reading form posts, it will take at least +5 hours, of copying out partition to undo
    what what seemed was a minor mishap.
    http://atterer.org/linux-remove-disa...rypttab-initrd

    I just want to delete enough files to regain access to KDE.

    Have tried this from Knoppix live disk:
    https://ubuntuforums.org/showthread.php?t=2132516
    And this for my partition sda5:
    cryptsetup luksOpen /dev/sda5 crypt
    After entering password, does not give error, but just gives blank/empty file system.

    Using Knoppix to post this msg !!
    I will never use encryption again. Not worth the risk. The right Password can be rendered useless,
    Wish the installer warned of this danger.

    Any help much appreciated.
    Thanks
    Last edited by sparxz; Dec 01, 2019, 02:35 PM. Reason: Additional info

    #2
    more info is needed
    Have tried everything to remove files, via
    F2 console after entering pass phrase.
    What have you tried to remove, exactly, and specifically how?
    Have you uninstalled any extra software?

    Did you do any custom partitions, or is it just a normal Kubuntu install?
    How big is the drive or partition that Kubuntu is on?

    For starters, you can clear the cache of downloaded software:
    Code:
    sudo apt clean
    This *may* give you enough space to allow you to log in to Plasma, especially if you very recently installed a lot of things.
    If you can now log in to Plasma, you can then uninstall extra software, and look for large files to remove.

    If it is not enough, we can try to uninstall software from the command line, which is easy, but you do have to know the specific names of what you installed, so if you give an idea what stuff you installed just before this happened, we can help you with the commands.

    Comment


      #3
      The Thinkpad Laptop is 250GB with just Kubuntu default partition arrangement on entire disk

      One of the first things I tried was: sudo apt-get clean
      then
      sudo apt-get autoremove.

      Tired emptying thumbnails cache, then snaps.
      No matter what I do. cannot seem to get any space. Very strange.

      Still in Knoppix writing this.

      Thanks.
      Last edited by sparxz; Dec 01, 2019, 02:38 PM. Reason: additional info

      Comment


        #4
        It is fairly unlikely that you filled 250 gb by installing software. It would take quite a massive amount, like gobs of 4k videos, or a few Steam games, backup files, or things of similar hugeness.

        Try this to see if it is full or not, and how much space you have:

        Code:
        df -h
        Sample output:
        Code:
        Filesystem      Size  Used Avail Use% Mounted on
        udev            3.8G     0  3.8G   0% /dev
        tmpfs           783M  1.6M  782M   1% /run
        [B]/dev/nvme0n1p1   28G   13G   14G  49% /[/B]
        tmpfs           3.9G  381M  3.5G  10% /dev/shm
        tmpfs           5.0M  4.0K  5.0M   1% /run/lock
        tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
        /dev/nvme0n1p2  441G   75G  345G  18% /home
        /dev/sda1       256M   35M  222M  14% /boot/efi
        tmpfs           783M   20K  783M   1% /run/user/1000
        The line with '/' is the one we need to look at, and '/home' , though you won't have one unless you did as custom install.

        A thing to try is to see what the very specific error is when trying to load Plasma

        Code:
        startx
        And see if that outputs anything more informative.

        I'll likely be out of the house for a bit, so if anyone else can chime in, it would be cool. I feel like I am missing something.

        Comment


          #5
          Thanks
          Will try this now.
          But any ideas on how to free enough to get back into plasma ?

          Comment


            #6
            As I mentioned we would need to know some of the things you have installed recently or where you may have saved some larger files.

            But seeing exactly how much space you have is good info to know before just randomly removing something, especially if the full-disk message is not correct.

            So we are waiting for more info.

            Sent from my LG-H931 using Tapatalk

            Comment


              #7
              Results typed out. Cannot format better with carriage return in this post. May have made few typos... df -h l less (below: path size, remaining & % used /dev/mapper/kubuntu--vg-root 233G 0 100 Loads of snaps & no "/home" listed. startx -> xauth: unable to write authority file /temp/serverauth.FWnz8spoj-h xauth: unable to write authority file /home/s/xauthority-n xauth: unable to write authority file /home/s/xauthority-n fatal sever error (EE) could not write PID to lock file in /temp
              Last edited by sparxz; Dec 01, 2019, 04:57 PM. Reason: formatting

              Comment


                #8
                One option may be to boot to a live dvd of the same version, and then mount the hard drive - the passphrase should decrypt the drive. Hopefully that will allow access to files to be copied at least.

                Edit:
                I've never encountered the problem mentioned here, so my steps may not work. My usual steps to copying encrypted partitions is to install the system that will be used onto a new hard drive that is partitioned as needed, eg 18.04, and then add in the old drive - either as an external drive or SATA attached.
                I then boot to the new system and the file manager sees the old secondary drive partitions. Clicking on the partition brings up the password dialog and with the correct password it opens the partition. There is no command line interaction, and the new system takes charge of the partition as a /media directory. All of the files on the old partition can now be copied as needed.
                Last edited by suplero; Dec 01, 2019, 05:52 PM.

                Comment


                  #9
                  There does not seem to be many options to what I thought would be a common problem. Could not find the fail-safe Quota limit system that OpenSUSE uses, and forgot to look for another solution. The current K/Ubuntu system seems to defaults to a Windows95 approach ! Will try this, but really disappointed it has not worked from Knoppix, from Terminal or File managers, and something I wrongly assumed I could rely on, if needed. My confidence in LUKS has been hammered. It is more of a hazard than a help. Thanks

                  Comment


                    #10
                    Originally posted by sparxz View Post
                    Results typed out. Cannot format better with carriage return in this post. May have made few typos... df -h l less (below: path size, remaining & % used /dev/mapper/kubuntu--vg-root 233G 0 100 Loads of snaps & no "/home" listed. startx -> xauth: unable to write authority file /temp/serverauth.FWnz8spoj-h xauth: unable to write authority file /home/s/xauthority-n xauth: unable to write authority file /home/s/xauthority-n fatal sever error (EE) could not write PID to lock file in /temp
                    Ok, this is something we can work with, tho I can't tell how full your "/" is (percentage):
                    28G 13G 14G 49% /
                    the xauthority file(s) can't be updated, which can happen if there is something like a sudden power loss while the file is being written to, or ( a bit more common) running a GUI program with sudo, and I imagine a full disk could cause it, but that usually would be mentioned in the terminal error message, iirc.
                    Deleting the files will cause new ones to be generated, but if we can get the four numbers like above, that will clarify
                    If that zero is indicating the free space, (ie in the third number), then you need to tell us what sort of things can be deleting, like any large files or folders, or a list of some of the programs you installed, so we can make space. We can't tell you what to remove, really., without knowing at least vaguely what we can ditch.

                    So: IF YOUR DISK IS NOT FULL:
                    stop the login manager:
                    systemctl stop sddm


                    Try deleting one of the two files we are working with:
                    rm /home/s/.Xauthority-n
                    Note the very important dot there, as well as capitalization, and assuming 's' is not your actual username, substitute it for the correct one.
                    If you get an error like 'permission denied', do this to run the previous command with sudo privileges:
                    sudo !!
                    Then '!!' is a shortcut to the previous command entered, and saves typing
                    Now, do the same for the other file
                    rm /home/s/.Xauthority
                    Again, note the dot and capital X. If you needed to use sudo before, add sudo to the beginning

                    If you did have to use sudo, you will then need to make sure no other files are affected:
                    sudo chown -R your-username:your-username /home/your-username

                    This will make sure no other files have the wrong ownership, and set them to be owned by you.

                    Now, to check if you can log in to the desktop:

                    systemctl start sddm
                    Last edited by claydoh; Dec 01, 2019, 06:27 PM.

                    Comment


                      #11
                      Thanks Claydoh. This looks like a well thought out solution. The clock has beaten me in this time zone, so will give this a go within 24hrs, when I get a chance. I have your suggested solution now on a text file on memory stick to print out to follow. Will tell you how it goes. Thanks.

                      Comment


                        #12
                        Originally posted by sparxz View Post
                        Thanks Claydoh. This looks like a well thought out solution. The clock has beaten me in this time zone, so will give this a go within 24hrs, when I get a chance. I have your suggested solution now on a text file on memory stick to print out to follow. Will tell you how it goes. Thanks.
                        Don't miss my edits and added comments, please.

                        Comment


                          #13
                          To post this forum msg, now on a crappy slow locked-down Win7 using only option Explorer ! Lost all in auto logout after 2mins & a crash. So again.

                          Tried that. Gives no errors. No change. Parks at "Starting, Show Plymouth Boot screen".

                          df -h l less [below: path size, remaining & % used]
                          /dev/mapper/kubuntu--vg-root 233G[Total size] 0 [remaining] 100[used %]

                          In home directory cannot delete files using eg: rm -f abcdefg.mp4
                          Gives no errors, just leaves file.

                          If I could just copy out my files safely now, and reinstall without ever using LUKS again, and find a Quota limit system, it would make life a bit easier.

                          Thanks
                          Last edited by sparxz; Dec 02, 2019, 12:46 PM. Reason: aditional info

                          Comment


                            #14
                            Just tried this too from original 19.02 Live DVD.
                            KDE Partition does not give option to decrypt. [Gparted, not on this DVD does]
                            Dolphin gives error in top status bar.:

                            An error occurred while accessing '237.8 GiB Encrypted Drive', the system responded: An unspecified error has occurred: No such interface “org.freedesktop.UDisks2.Filesystem” on object at path /org/freedesktop/UDisks2/block_devices/dm_2d0

                            I am guessing there is a bug in LUKS. Ironically it is meant to protect data not loose it !

                            If I had a spare SSD, I would now be swapping out, new install, and find another way to get data off the LUKS encrypted drive,
                            and still have use of my laptop.

                            Thanks
                            Last edited by sparxz; Dec 02, 2019, 10:25 AM.

                            Comment


                              #15
                              SOLVED
                              Swapped out SSD for new one.
                              Connected Old 250GB SSD via USB3.
                              Recognized allowed password, give full access, now moving files over.

                              Not going to use LUKS encrypt drive again.
                              Looking for a solution to encrypt folders instead,
                              so not in this situation again.

                              Thanks for all input guys.

                              Comment

                              Working...
                              X