You are not logged in.

#1 2014-11-13 17:47:31

GourdCaptain
Member
Registered: 2009-04-18
Posts: 121

Can't create loop device for dm-crypt

I'm trying to set up a disk image to use dm-crypt with, and after using dd from /dev/urandom to create an appropriately sized random file, I modprobed the loop module and ran:
losetup /dev/loop0 /home/user/image
as specified on the Arch Linux wiki page for dm-crypt and got the error: "losetup: /dev/loop0: failed to set up loop device: No such file or directory".
I tried using the -f switch to create one, I got the error "losetup: cannot find an unused loop device: No such file or directory".

How do I get this to work? I also tried running these with sudo in case it was a permissions error, and that didn't help.

Offline

#2 2014-11-16 01:36:24

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,487

Re: Can't create loop device for dm-crypt

Should work (with sudo). Maybe you had not rebooted after a kernel update?

Offline

#3 2014-11-16 03:27:22

GourdCaptain
Member
Registered: 2009-04-18
Posts: 121

Re: Can't create loop device for dm-crypt

Yeah, it worked after a reboot. Thing was, modprobe loop had been done pre-kernel install, so I was a tad confused since the error didn't mention anything about a module needing loading or such. Either way, I ended up switching in the end to using veracrypt, it had better performance on my system and didn't take up an obscene amount of memory when mounting the image.

Offline

#4 2014-11-17 00:36:24

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,487

Re: Can't create loop device for dm-crypt

Good that's solved then.
Out of curiousity it would be interesting how you benchmarked the performance against veracrypt.

Offline

#5 2014-11-17 04:31:15

GourdCaptain
Member
Registered: 2009-04-18
Posts: 121

Re: Can't create loop device for dm-crypt

The "better performance" is that when I created a 10 GB image with both to use, the dmcrypt instantiation took over a minute and most of my 16 GB of RAM before it finished mounting for some reason. Which is slightly absurd. Veracrypt did it much faster and with less RAM. It's not actual benchmarking of the performance once the drive's set up.

Offline

#6 2014-11-17 09:35:53

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,487

Re: Can't create loop device for dm-crypt

Ok, thanks for explaining.

Offline

Board footer

Powered by FluxBB