Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #226877

Re: Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ...

From David Christensen <dpchrist@holgerdanske.com>
Newsgroups linux.debian.user
Subject Re: Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ...
Date 2020-09-11 00:40 +0200
Message-ID <ANDot-4cm-3@gated-at.bofh.it> (permalink)
References (3 earlier) <AMTEZ-Cd-3@gated-at.bofh.it> <AN9Tr-2iA-3@gated-at.bofh.it> <ANjzs-81C-5@gated-at.bofh.it> <ANnWq-2oc-7@gated-at.bofh.it> <ANxVM-TL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ... rhkramer@gmail.com - 2020-09-08 19:00 +0200
  Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... Tixy <tixy@yxit.co.uk> - 2020-09-08 19:00 +0200
  Re: Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ... rhkramer@gmail.com - 2020-09-08 19:00 +0200
    Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-08 22:40 +0200
      Re: Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ... rhkramer@gmail.com - 2020-09-08 23:50 +0200
        Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-09 00:50 +0200
        Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Wright <deblis@lionunicorn.co.uk> - 2020-09-09 17:10 +0200
          Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-10 03:30 +0200
            Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David <bouncingcats@gmail.com> - 2020-09-10 08:10 +0200
              Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Wright <deblis@lionunicorn.co.uk> - 2020-09-10 18:50 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-11 00:40 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David <bouncingcats@gmail.com> - 2020-09-11 05:10 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-11 06:20 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Wright <deblis@lionunicorn.co.uk> - 2020-09-11 16:30 +0200
              Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-11 01:20 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David <bouncingcats@gmail.com> - 2020-09-11 05:50 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Wright <deblis@lionunicorn.co.uk> - 2020-09-11 16:30 +0200
                Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Christensen <dpchrist@holgerdanske.com> - 2020-09-11 22:10 +0200
        Re: Why start the first partition at 2 MIB, why not at any multiple of 4096 bytes ... Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-09-09 17:20 +0200
          Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... David Wright <deblis@lionunicorn.co.uk> - 2020-09-09 18:30 +0200
            Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-09-09 19:10 +0200
  Re: Why start the first partition at 2 MIB, why not at any multiple  of 4096 bytes ... Michael Stone <mstone@debian.org> - 2020-09-08 23:10 +0200

csiph-web