1

I had a good-working system. Cent OS 6. But after I made a reboot luks-partition has been unmounted. And our system administrator have a weekends now :(

Please help me to mount a luks partition again.

I know the path to encrypted file and password.

System administrator's records says: "Encrypted file located at /path/file and mount to /crypt. Password is xxxxx" That's all.

Before reboot the server I made a records of 'mount' command, the related partition was:

/dev/mapper/crypt_fun /crypt ext4 rw,relatime,barrier=1,data=ordered 0 0

Now I try this commands:

cryptsetup luksOpen /dev/loop0 /path/file

type a password

mount /path/file /crypt

But nothing works good :( Please help me.

  • Take a look inside /etc/crypttab. Are there any clues in there? – JasonAzze Jun 11 '13 at 19:51
4

Given the above, my guess is that you would need to do something like this.

  • First make your file accessible via a loopback device
    • losetup /dev/loop/0 /path/file
  • Open the loopback device to crypt_fun
    • cryptsetup luksOpen /dev/loop/0 crypt_fun
  • Mount it
    • mount /dev/mapper/crypt_fun /crypt
  • You can also skip to step 2 if you simply supply /path/file and crypt_fun it will automatically handle the loop device and creating the mapper, then you can proceed to step 3. – dragon788 Nov 15 '18 at 20:47
  • @dragon788 yeah, I think when I was answering this back in 2013, I was using old at the time distro that wasn't automatically creating loop devices. – Zoredache Nov 16 '18 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.