Mageia Bugzilla – Attachment 2388 Details for
Bug 5983
Diskdrake does not set encrypted LVM partition as being LVM type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Demonstration of creating two partitions within one encrypted container.
demo.txt (text/plain), 2.14 KB, created by
Dave Hodgins
on 2012-05-28 11:31:02 CEST
(
hide
)
Description:
Demonstration of creating two partitions within one encrypted container.
Filename:
MIME Type:
Creator:
Dave Hodgins
Created:
2012-05-28 11:31:02 CEST
Size:
2.14 KB
patch
obsolete
>fdisk -l /dev/sdd > >Disk /dev/sdd: 259 MB, 259522560 bytes >8 heads, 62 sectors/track, 1021 cylinders, total 506880 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 >Disk identifier: 0x00000000 > > Device Boot Start End Blocks Id System >/dev/sdd1 62 506415 253177 83 Linux > >I then enter the following command, which erases everything in /dev/sdd1 > >/sbin/cryptsetup --cipher aes-xts-benbi --key-size 512 luksFormat /dev/sdd1 >YES >passphrase >passphrase > >Then I open the encrypted container using ... >/sbin/cryptsetup luksOpen /dev/sdd1 crypt_sdd1 > >After the encrypted container has been opened, I create a partition table >and two partitions within the encyrpted block device >cfdisk -z /dev/mapper/crypt_sdd1 >create a vfat partition >create a ntfs partition >write the partition table >quit > >fdisk -l /dev/mapper/crypt_sdd1 > >Disk /dev/mapper/crypt_sdd1: 257 MB, 257156096 bytes >255 heads, 63 sectors/track, 31 cylinders, total 502258 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 >Disk identifier: 0x00dc6e53 > > Device Boot Start End Blocks Id System >/dev/mapper/crypt_sdd1p1 63 257039 128488+ c W95 FAT32 (LBA) >/dev/mapper/crypt_sdd1p2 257040 498014 120487+ 7 HPFS/NTFS > >As you can see above, the two partitions exist. Once formatted, they can >be mounted individually. > >fdisk -l /dev/sdd > >Disk /dev/sdd: 259 MB, 259522560 bytes >8 heads, 62 sectors/track, 1021 cylinders, total 506880 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 >Disk identifier: 0x00000000 > > Device Boot Start End Blocks Id System >/dev/sdd1 62 506415 253177 83 Linux > >As you can see above, the actual sdd1 is still a luks encrypted block device, >that is not changed by the fact that two different types of file systems are >contained within it.
fdisk -l /dev/sdd Disk /dev/sdd: 259 MB, 259522560 bytes 8 heads, 62 sectors/track, 1021 cylinders, total 506880 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 Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 62 506415 253177 83 Linux I then enter the following command, which erases everything in /dev/sdd1 /sbin/cryptsetup --cipher aes-xts-benbi --key-size 512 luksFormat /dev/sdd1 YES passphrase passphrase Then I open the encrypted container using ... /sbin/cryptsetup luksOpen /dev/sdd1 crypt_sdd1 After the encrypted container has been opened, I create a partition table and two partitions within the encyrpted block device cfdisk -z /dev/mapper/crypt_sdd1 create a vfat partition create a ntfs partition write the partition table quit fdisk -l /dev/mapper/crypt_sdd1 Disk /dev/mapper/crypt_sdd1: 257 MB, 257156096 bytes 255 heads, 63 sectors/track, 31 cylinders, total 502258 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 Disk identifier: 0x00dc6e53 Device Boot Start End Blocks Id System /dev/mapper/crypt_sdd1p1 63 257039 128488+ c W95 FAT32 (LBA) /dev/mapper/crypt_sdd1p2 257040 498014 120487+ 7 HPFS/NTFS As you can see above, the two partitions exist. Once formatted, they can be mounted individually. fdisk -l /dev/sdd Disk /dev/sdd: 259 MB, 259522560 bytes 8 heads, 62 sectors/track, 1021 cylinders, total 506880 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 Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 62 506415 253177 83 Linux As you can see above, the actual sdd1 is still a luks encrypted block device, that is not changed by the fact that two different types of file systems are contained within it.
View Attachment As Raw
Actions:
View
Attachments on
bug 5983
:
2357
|
2358
|
2359
| 2388