Partitioning 1T HDD

Kevin Oberman rkoberman at gmail.com
Fri Mar 19 06:45:03 UTC 2021


Exactly. It replaces fdisk and bsdlabel. Use "gpart create" to set the disk
as GPT or BSD. Use "gpart add" to partition the drive. Then use newfs and
glabel as needed to finish up the file system. The gpart man page is pretty
good with several examples. Several more presentations may be found with a
web search. "gpart show <GEOM>" and "gpart list" to check that things look
right. List has all details while "show" just shows partitions. Generally
recommended that the boot block be padded to 2048. Do this by setting the
-b option to 2048 for the "add" of the partition after the boot block.

This is an example of an GPT setup. It has separate partitions for root,
usr, var, swap, and tmp plus an encrypted partition for sensitive files.
Don't forget swap!
gpart show ada
=>        40  3906963376  da0  GPT  (1.8T)
          40        1024    1  freebsd-boot  (512K)
        1064         984       - free -  (492K)
        2048     4194304    2  freebsd-ufs  (2.0G)
     4196352     4194304    3  freebsd-swap  (2.0G)
     8390656    10217464    4  freebsd-ufs  (4.9G)
    18608120   641728512    5  freebsd-ufs  (306G)
   660336632  1287722512    6  freebsd-ufs  (614G)
  1948059144   471040000    7  freebsd-ufs  (225G)
  2419099144   314572800    8  freebsd-ufs  (150G)
  2733671944  1173291472       - free -  (559G)
        34        2014        - free -  (1.0M)
        2048      532480     1  efi  (260M)
      534528      262144     2  ms-reserved  (128M)
      796672   541927424     3  ms-basic-data  (258G)
   542724096  1258291200     5  freebsd-ufs  (600G)
  1801015296    33554432     6  freebsd-swap  (16G)
  1834569728  2069889024     7  freebsd-ufs  (987G)
  3904458752     1034240        - free -  (505M)
  3905492992     1536000     4  ms-recovery  (750M)
  3907028992         143        - free -  (72K)

Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman at gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683


On Thu, Mar 18, 2021 at 5:51 PM Duke Normandin <sidney.reilley.ii at gmail.com>
wrote:

> On Thu, 18 Mar 2021 13:00:20 -0700
> Kevin Oberman <rkoberman at gmail.com> wrote:
>
> > I'd like to point out the GPT works for either MBR or EFI booting. My old
> > laptop had broken EFI support, so had to be MBR, but the partitioning was
> > GPT which is far easier to use and manage. It is likely true that EFI
> > requires GPT, but MBR does not. I'm not even positive about EFI
> > requirements, but it does need more partitions, so using it without GPT
> > would be, at best, awkward.
>
> Thanks for fleshing out the answer to my questions. Are you talking about
> using GPT rather than fdisk/cfdisk?
> --
> Duke Normandin <sidney.reilley.ii at gmail.com>
>


More information about the freebsd-questions mailing list