Can't mount encrypted file
I can't seem to mount a file as an encrypted file system.
The setup process seems to go as it should but when it's time to mount it fails with
No available loopback devices
Cannot open device "/home/nick/mnt/mystuff.fs" for target "mystuff"
The setup:
All necessary files seem to have been created.
And still, when I try to mount it:
What am I doing wrong?
The setup process seems to go as it should but when it's time to mount it fails with
No available loopback devices
Cannot open device "/home/nick/mnt/mystuff.fs" for target "mystuff"
The setup:
- Code: Select all
[root@hal9000 ~]# cryptmount-setup
------------------------------
cryptmount setup script
This program will allow you to setup a secure filing-system that will
be managed by "cryptmount". You will be able to select basic features
such as the location and size of the filesystem - if you want more
advanced features, you should consult the cryptmount manual page.
cryptmount version 4.3, (C)Copyright 2007-2009 RW Penney
cryptmount comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
certain conditions - see the file 'COPYING' in the source directory.
------------------------------
Each cryptmount filesystem is identifed by a short name which is used
when mounting or configuring that filesystem. This name should be a
single word (without spaces), such as "opaque".
The following target names have already been used: (NONE)
Please enter a target name for your filesystem
[opaque]: mystuff
The mystuff filesystem can be configured to be owned by a nominated
user, who will be able to create top-level files & directories
without needing to involve the superuser.
Which user should own the filesystem (leave blank for "root")
[]: nick
In order to access the mystuff filesystem, it must be mounted on top
of an empty directory.
Please specify where "mystuff" should be mounted
[/home/nick/crypt]: /home/nick/mnt/mystuff
The maximum available size of your filesystem needs to be chosen so
that enough space can be reserved on your disk.
Enter the filesystem size (in MB)
[64]: 1024
The actual encrypted filesystem will be stored in a special file,
which needs to be large enough to contain your entire encrypted
filesystem.
Enter a filename for your encrypted container
[/home/nick/crypto.fs]: /home/nick/mnt/mystuff.fs
WARNING: /home/nick/mnt/mystuff.fs already exists
Enter a filename for your encrypted container
[/home/nick/crypto.fs]: /home/nick/mnt/mystuff.fs
Access to your encrypted filesystem is protected by a key that is
kept in a separate small file. The key is locked by a password that
you must enter whenever you mount the filesystem.
Enter a location for the keyfile
[/etc/cryptmount/mystuff.key]:
------------------------------
Your filing system is now ready to be built - this will involve:
- Creating the directory "/home/nick/mnt/mystuff"
- Creating a 1024MB file, "/home/nick/mnt/mystuff.fs"
- Adding an extra entry ("mystuff") in /etc/cryptmount/cmtab
- Creating a key-file ("/etc/cryptmount/mystuff.key")
- Creating an ext3 filingsystem on "/home/nick/mnt/mystuff.fs"
If you do not wish to proceed, no changes will be made to your system.
Please confirm that you want to proceed (enter "yes")
[no]: yes
Making mount-point (/home/nick/mnt/mystuff)... done
Creating filesystem container (/home/nick/mnt/mystuff.fs)... done
Taking backup of cryptmount master config-file (/etc/cryptmount/cmtab.bckp-setup)... done
Generating filesystem access key (/etc/cryptmount/mystuff.key)...
Generating random key; please be patient...
Enter new password for target "mystuff":
Confirm password:
Formatting encrypted filesystem...
Enter password for target "mystuff":
No available loopback devices
Cannot open device "/home/nick/mnt/mystuff.fs" for target "mystuff"
All necessary files seem to have been created.
- Code: Select all
[root@hal9000 ~]# ls -lh /home/nick/mnt/
total 1.1G
drwxr-xr-x 2 root root 4.0K Sep 28 13:54 mystuff/
-rw-r--r-- 1 root root 1.0G Sep 28 14:01 mystuff.fs
- Code: Select all
[root@hal9000 ~]# ls -lh /etc/cryptmount/
total 8.0K
-rw-r--r-- 1 root root 243 Sep 28 14:01 cmtab
-rw-r--r-- 1 root root 0 Sep 28 13:55 cmtab.bckp-setup
-rw------- 1 root root 64 Sep 28 14:01 mystuff.key
- Code: Select all
[root@hal9000 ~]# cat /etc/cryptmount/cmtab
# Entry automatically generated by setup-script:
mystuff {
dev=/home/nick/mnt/mystuff.fs
dir=/home/nick/mnt/mystuff
fstype=ext3
fsoptions=defaults
cipher=aes
keyformat=builtin
keyfile=/etc/cryptmount/mystuff.key
}
And still, when I try to mount it:
- Code: Select all
[root@hal9000 ~]# cryptmount mystuff
Enter password for target "mystuff":
No available loopback devices
Cannot open device "/home/nick/mnt/mystuff.fs" for target "mystuff"
What am I doing wrong?