Results 1 to 7 of 7

Thread: can`t mount encrypted partition

  1. #1

    Default can`t mount encrypted partition

    Hello,

    At the beginning, I apologize for my English. I have an encrypted "archive" partition on my disk. The assumption is that the partition does not mount automatically but after clicking on the file manager, it is mounted in the
    Code:
    /mnt/archive
    position. This system has been working for me for many years, but it stopped at Leap 42.3. The file manager requests the encryption password, then the root password and instead of mounting the partition, the message
    "Error while storing the password in the keyring database (the activity has been canceled) appears."
    If I delete the entries in
    Code:
    /etc/fstab
    for this partition, then it is easily mounted in
    Code:
    /var/run/media
    (requests encryption password and root password). I am using Leap 42.3.20170911 with the Cinnamon environment, but Mate did not work either. It worked without any problem on Fedora 27, but I went back to Leap and I am asking for help.

    My fstab:
    Code:
     
    UUID=0d7a05ed-c7ea-4989-894f-fd6f4a69f2c0 swap                 swap       defaults              0 0 
    UUID=00befd62-1436-4488-8c32-27578c2e0bbc /                    ext4       acl,user_xattr        1 1 
    /dev/mapper/cr_ata-HGST_HTS725050A7E630_RCF50ACF0RE42N-part5 /home                ext4       acl,user_xattr,nofail 0 2 
    /dev/mapper/cr_ata-ST1000DM003-1CH162_Z1D9F58V-part2 /mnt/archiwum        ext4       noauto,acl,user,nofail     0 0
    My crypttab:

    Code:
     
    cr_ata-HGST_HTS725050A7E630_RCF50ACF0RE42N-part5 /dev/disk/by-id/ata-HGST_HTS725050A7E630_RCF50ACF0RE42N-part5 none       none 
    cr_ata-ST1000DM003-1CH162_Z1D9F58V-part2 /dev/disk/by-id/ata-ST1000DM003-1CH162_Z1D9F58V-part2 none       noauto

    Please, help me!

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,872
    Blog Entries
    3

    Default Re: can`t mount encrypted partition

    I don't really know the answer.

    Since it works without the "/etc/fstab" entry, the encrypted disk partition is presumably good.

    My best guess is that "systemd" is somehow interfering with what you are trying to do. It has probably created a unit from what is in "crypttab" and "fstab". And when your file manager get's halfway done, "systemd" recognized the unit and interferes.

    You could try removing the "noauto" from that "crypttab" entry (change it to "none"). And then you will probably be prompted for the encryption key when booting. Mounting as you want should then work (at least I think it will).

    Personally, I do that manually instead of using file-manager. You could create a script to run (as root) that would do the mounting as needed.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3

    Default Re: can`t mount encrypted partition

    Thank you for Your answer,

    Quote Originally Posted by nrickert View Post
    I don't really know the answer.

    Since it works without the "/etc/fstab" entry, the encrypted disk partition is presumably good.
    Yes, the partition is ok, I have mounted it many times in OpenSuse (Gnome, KDE), in Fedora 27 or liveusb (Debian, Ubuntu).

    My best guess is that "systemd" is somehow interfering with what you are trying to do. It has probably created a unit from what is in "crypttab" and "fstab". And when your file manager get's halfway done, "systemd" recognized the unit and interferes.
    I think this is the problem of a file manager (Caja in Mate, Nemo in Cinnamon) or a key database (Seahorse?) But only in OpenSuse

    You could try removing the "noauto" from that "crypttab" entry (change it to "none"). And then you will probably be prompted for the encryption key when booting. Mounting as you want should then work (at least I think it will).
    Unfortunately it does not work. At the time of booting, he urgently requests passwords, which I ignore. But after logging into the GUI, the partition can not be mounted.

    Personally, I do that manually instead of using file-manager. You could create a script to run (as root) that would do the mounting as needed.
    I was desperately trying to change Opensuse to Fedora but in Fedora my own individual solutions are not working yet

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,872
    Blog Entries
    3

    Default Re: can`t mount encrypted partition

    Here's something you can try, if you have the inclination.

    Step 1: Mount the partition. You have indicated that you can mount it at the wrong place if you comment out the "/etc/fstab" entry.

    Step 2: Find the UUID of the mounted partition. It should show up in the output of "blkid". Or, if you run "cryptsetup" at the command line to make the partition accessible, then you could use:
    Code:
    blkid /dev/mapper//dev/mapper/cr_ata-ST1000DM003-1CH162_Z1D9F58V-part2
    Note that this is not the same as the UUID for the LUKS partition.

    Step 3: Change the "/etc/fstab" entry to use UUID. So the entry would now look like
    Code:
    UUID=12346-6789  /mnt/archiwum        ext4       noauto,acl,user,nofail   0  0
    except with the UUID you find in step 2 (instead of "12346-6789".

    Step 4: Uncomment the entry in "/etc/crypttab".

    You would then have to reboot to fully test.

    The idea here is so that the fstab entry does not depend on that cryptic name in "/etc/crypttab". I think it might work.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  5. #5

    Default Re: can`t mount encrypted partition

    Thanks, but doesn`t work.

    #/dev/mapper/cr_ata-ST1000DM003-1CH162_Z1D9F58V-part2 /mnt/archiwum ext4 noauto,acl,user,nofail 0 0
    UUID=2627de56-1c77-4d73-ac44-e39e5bdced36 /mnt/archiwum ext4 noauto,acl,user,nofail 0 0

    cat /etc/crypttab
    cr_ata-HGST_HTS725050A7E630_RCF50ACF0RE42N-part5 /dev/disk/by-id/ata-HGST_HTS725050A7E630_RCF50ACF0RE42N-part5 none noauto
    cr_ata-ST1000DM003-1CH162_Z1D9F58V-part2 /dev/disk/by-id/ata-ST1000DM003-1CH162_Z1D9F58V-part2 none noauto
    When I click in the file manager of the encrypted partition, an error message appears in the key database. I think the problem is in Seahorse (I will try to translate the message):
    You can not mount encrypted data of size 105 GB
    Error during storage of the password in the key database (Action was canceled).
    After which the symbol of the encrypted partition disappears (no longer visible) in the file manager until the next system restart.

    Do you know where to search for Seahorse logs?

    Thanks for your patience

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,872
    Blog Entries
    3

    Default Re: can`t mount encrypted partition

    Quote Originally Posted by filip76 View Post
    Thanks, but doesn`t work.
    Do you know where to search for Seahorse logs?
    No. I mainly use KDE.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #7

    Default Re: can`t mount encrypted partition

    Thank you very much for your help

    I also used KDE for a long time but unfortunately at some point my computer stopped working and it happened that the screen was frozen or the application was closed ..

Posting Permissions

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