| Author |
Message |
gerd
|
|
Post subject: cryptsetup + fstab + uuid don't work
Posted: 19.09.2010, 16:07
|
|

Joined: 2010-09-13
Posts: 94
Status: Offline
|
|
Hello,
i mount a hdd with cryptsetup to /dev/mapper/data2
blkid says then
Code:
/dev/mapper/data2: LABEL="data" UUID="9688f835-1d32-4e1a-b66d-759b454f3a3d" TYPE="ext4"
Now my problem:
This entry in fstab works (automount works)
Code:
/dev/mapper/data2 /media/1500 ext4 defaults,users 0 0
This entry doesn't work (and same if i use LABEL):
Code:
UUID="9688f835-1d32-4e1a-b66d-759b454f3a3d" /media/1500 ext4 defaults,users 0 0
data2 is automounted, but to another directory (no dupe entries in fstab).
If i use
Code:
UUID=9688f835-1d32-4e1a-b66d-759b454f3a3d /media/1500 ext4 defaults,users 0 0
i get a error popup no rights to mount and nothing is mounted.
Any ideas? Is this a bug and if yes for which program i should look for a bugreport or submit one? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: cryptsetup + fstab + uuid don
Posted: 19.09.2010, 21:08
|
|
Moderator

Joined: 2010-09-11
Posts: 464
|
|
|
Quote:
Any ideas? Is this a bug and if yes for which program i should look for a bugreport or submit one?
My idea is that this is not a bug. because...
You already mounted the partition with that UUID to the device /dev/mapper/data2.
(I don't know how you did it, but I suppose /dev/mapper/data2 is device that shows
*decrypted* content of the bound partition.)
Then you want to mount /dev/mapper/data2, the decrypting device to a mountpoint
in file system /media/1500. so it works.
When you try to mount encrypted partition with the UUID directly to the mountpoint,
there is not decrypting device in the chain, so it should fail. and fails.
Well, I don't have any clue about encrypted disk. So I may be totally wrong. |
|
|
| |
|
|
|
 |
gerd
|
|
Post subject: RE: cryptsetup + fstab + uuid don
Posted: 19.09.2010, 21:42
|
|

Joined: 2010-09-13
Posts: 94
Status: Offline
|
|
Yes, i think you are wrong.
The encrypted device has it's own UUID (and a own line in the output of blkid) and the posted UUID is the one from the decrypted device, which at this point is not mounted. There is also a entry in /dev/disk/by-uuid with this UUID, so i think it should be mountable.
Tomorrow i will try to mount it with uuid in the console and see if there is helpful output... |
|
|
| |
|
|
|
 |
michaaa62
|
|
Post subject:
Posted: 20.09.2010, 01:49
|
|

Joined: 2010-09-11
Posts: 51
Location: Berlin, Germany
Status: Offline
|
|
| Did you compare the output of
Code:
blkid
with the output of
Code:
ls -l /dev/disk/by-uuid
to crosscheck the UUIDs? |
|
|
| |
|
|
|
 |
gerd
|
|
Post subject:
Posted: 20.09.2010, 09:22
|
|

Joined: 2010-09-13
Posts: 94
Status: Offline
|
|
la -al /dev/mapper/
lrwxrwxrwx 1 root root data2 -> ../dm-8
(all other entries are NOT softlinks)
This fstab-entry works
Code:
/dev/disk/by-uuid/9688f835-1d32-4e1a-b66d-759b454f3a3d /media/data ext4 defaults,users 0 0
This don't work
Code:
UUID=9688f835-1d32-4e1a-b66d-759b454f3a3d /media/data ext4 defaults,users 0 0
I get a popup (in german, but i try to translate)
Quote:
The volume "name" can't be mounted. You have no rights to mount the volume
BUT
mount /media/data
in a root console works! |
|
|
| |
|
|
|
 |
kris99
|
|
Post subject:
Posted: 26.09.2010, 16:10
|
|

Joined: 2010-09-11
Posts: 21
Status: Offline
|
|
Did you enter the entry in
/etc/crypttab
Code:
# <target name> <source device> <key file> <options>
sda8_crypt /dev/disk/by-uuid/500107f1-c3cd-49cf-ab96-015c66fdee8e none luks
The UUID is the one of the crypted partition (s. b.)
Code:
# ls -la /etc/crypttab
-rw-r--r-- 1 root root 130 Jun 14 15:22 /etc/crypttab
Code:
# ls -la /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Sep 24 18:03 3d668e5b-6b30-4c22-984e-48bc1034c677 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Sep 24 18:03 500107f1-c3cd-49cf-ab96-015c66fdee8e -> ../../sda8
lrwxrwxrwx 1 root root 10 Sep 24 18:03 a82e6615-b28e-41ed-9570-6e17b2cb30b4 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 24 18:03 b95bdb17-5437-455d-b994-482de77a8177 -> ../../sda6
lrwxrwxrwx 1 root root 10 Sep 24 18:03 bdb10050-684f-46c8-b840-a4172786db03 -> ../../sda5
lrwxrwxrwx 1 root root 10 Sep 24 18:03 c06ba6a5-b781-4fd2-bb6a-7d8fe6dbeaf1 -> ../../sda7
lrwxrwxrwx 1 root root 10 Sep 24 18:03 EEF48D95F48D6127 -> ../../sda3
lrwxrwxrwx 1 root root 10 Sep 24 18:03 F536-7A4D -> ../../sda1
|
|
|
| |
|
|
|
 |
gerd
|
|
Post subject:
Posted: 26.09.2010, 17:22
|
|

Joined: 2010-09-13
Posts: 94
Status: Offline
|
|
No, i didn't touched the crypttab.
But as my workaround works and the problem was only with my usb backup disks, which will be turned off the next months, i will not bother about this problem anymore. |
|
|
| |
|
|
|
 |
|
|