Mount encrypted vdi
Posted: 18. Apr 2016, 17:34
Hi all.
I want to mount encrypted vdi disk to Debian Linux.
1.sudo qemu-nbd -c /dev/nbd0 /home/myfolder/VirtualDrive/debian_w_1/disk.vdi
2. Then I can see that everything is ok:
sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
...............................
Disk /dev/nbd0: 19.3 GiB, 20735901696 bytes, 40499808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0c0140f5
Device Boot Start End Sectors Size Id Type
/dev/nbd0p1 2048 40499807 40497760 19.3G 83 Linux
3. I try to do:
sudo cryptsetup luksOpen /dev/nbd0p1 --key-file /root/pass crypt_dir
And I've got error:
Device /dev/nbd0p1 doesn't exist or access denied.
What's wrong? How can I do that?
Many Thanks...
I want to mount encrypted vdi disk to Debian Linux.
1.sudo qemu-nbd -c /dev/nbd0 /home/myfolder/VirtualDrive/debian_w_1/disk.vdi
2. Then I can see that everything is ok:
sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
...............................
Disk /dev/nbd0: 19.3 GiB, 20735901696 bytes, 40499808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0c0140f5
Device Boot Start End Sectors Size Id Type
/dev/nbd0p1 2048 40499807 40497760 19.3G 83 Linux
3. I try to do:
sudo cryptsetup luksOpen /dev/nbd0p1 --key-file /root/pass crypt_dir
And I've got error:
Device /dev/nbd0p1 doesn't exist or access denied.
What's wrong? How can I do that?
Many Thanks...