Gentoo Archives: gentoo-user

From: Caveman Al Toraboran <toraboracaveman@××××××××××.com>
To: Gentoo <gentoo-user@l.g.o>
Subject: [gentoo-user] how to partition a dm-crypt disk?
Date: Sat, 02 May 2020 04:19:01
Message-Id: 6ZBgJ5WukW30Sga_F29dI73g6-PrkSk-AY_-2zzwtV5o1xMuwY_uUHNvjFiqxyhA7p_7nMVojrJkQVlGOfX4o5rA-UQ3QAzkmwIINbkIxX8=@protonmail.com
1 hi - why can't i use fdisk to partition a dm-crypt
2 disk?
3
4 tried to `sudo fdisk /dev/mapper/ea`, which is created by:
5
6 > `sudo cryptsetup open --type plain /dev/sda ea`
7
8 fdisk shows my partitions:
9
10 > Device Start End Sectors Size Type
11 > /dev/mapper/ea-part1 2048 10487807 10485760 5G Linux filesystem
12 > /dev/mapper/ea-part2 10487808 1953525134 1943037327 926.5G Linux filesystem
13
14 but, as i save that partition table, i get this
15 error:
16
17 > Command (m for help): w
18 > The partition table has been altered.
19 > Failed to add partition 1 to system: Invalid argument
20 > Failed to add partition 2 to system: Invalid argument
21
22 if i repeat the execution of fdisk, i see that
23 partition table, and if i hit `w`, it saves
24 without showing that error.
25
26 then, as i go to run `mkfs.ext4` on them, i can't
27 see them under `/dev/mapper/`.
28
29 rgrds,
30 cm.