Re: Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ...
On 2020-09-10 09:44, David Wright wrote:
On Thu 10 Sep 2020 at 16:02:59 (+1000), David wrote:
On Thu, 10 Sep 2020 at 11:26, David Christensen <dpchrist@holgerdanske.com> wrote:
,,, I'm not sure what to ask for in terms of the encryption:
See cryptsetup(8) with the 'isLuks' action and/or the '-v' option.
For example, my daily driver:
2020-09-10 14:59:09 root@tinkywinky ~
# cat /etc/debian_version ; uname -a
9.13
Linux tinkywinky 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05)
x86_64 GNU/Linux
The boot partition (sda1) does not contain a LUKS volume. The root
partition (sda3) does:
2020-09-10 15:25:51 root@tinkywinky ~
# cryptsetup isLuks -v /dev/sda1
Device /dev/sda1 is not a valid LUKS device.
Command failed with code 22: Invalid argument
2020-09-10 15:25:55 root@tinkywinky ~
# echo $?
1
2020-09-10 15:25:56 root@tinkywinky ~
# cryptsetup isLuks -v /dev/sda3
Command successful.
2020-09-10 15:25:58 root@tinkywinky ~
# echo $?
0
I don't like parted particularly, and don't know what "free" does.
Can you elucidate?
$ man parted | grep -i free
$ info --output=/dev/stdout --subnodes parted | grep -i free
I also am unable to find canonical documentation via RTFM, info, and
STFW. GNU must have missed documenting it (?).
Briefly, if 'free' is provided after the 'print' option to parted(8),
the displayed partition table shows unpartitioned free space. It is
aware of sectors consumed by the partition scheme.
For example, the system disk on my daily driver uses MBR:
2020-09-10 15:09:43 root@tinkywinky ~
# parted /dev/sda u s p
Model: ATA INTEL SSDSC2CW06 (scsi)
Disk /dev/sda: 117231408s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 2048s 1953791s 1951744s primary ext4 boot
2 1953792s 3907583s 1953792s primary
3 3907584s 27344895s 23437312s primary
4 27344896s 117229567s 89884672s primary
2020-09-10 15:09:46 root@tinkywinky ~
# parted /dev/sda u s p free
Model: ATA INTEL SSDSC2CW06 (scsi)
Disk /dev/sda: 117231408s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
63s 2047s 1985s Free Space
1 2048s 1953791s 1951744s primary ext4 boot
2 1953792s 3907583s 1953792s primary
3 3907584s 27344895s 23437312s primary
4 27344896s 117229567s 89884672s primary
117229568s 117231407s 1840s Free Space
The 300 GB external disk uses GPT:
2020-09-10 15:19:20 root@tinkywinky ~
# parted -s /dev/sdb u s p
Error: The backup GPT table is corrupt, but the primary appears OK, so
that will be used.
Model: ATA ST3300622AS (scsi)
Disk /dev/sdb: 586072368s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 586072063s 586070016s ext2 4NF2P9SV
2020-09-10 15:23:14 root@tinkywinky ~
# parted -s /dev/sdb u s p free
Error: The backup GPT table is corrupt, but the primary appears OK, so
that will be used.
Model: ATA ST3300622AS (scsi)
Disk /dev/sdb: 586072368s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
34s 2047s 2014s Free Space
1 2048s 586072063s 586070016s ext2 4NF2P9SV
586072064s 586072334s 271s Free Space
David
Reply to: