how to associate /dev/ada0 to /dev/gptid/...

gpart show -l

Should show which disk partitions have gpt labels. I don't know about gptid.
It would be gpart list <partition>.
Would be seen in rawuuid and efimedia.

But if you want to use non-GEOM name, which is stable anywhere, GPT label would match better.
 
Currently i mount root with /dev/ada0p1 but i want to use /dev/gptid/* because of bios disk renumbering.
I don't know which /dev/gptid corresponds to /dev/ada0p1.
Maybe i can use a geom command to see the sizes are identical ?
 
I don't use /dev/gptid/* for mounting filesystems. Of course, not raw geom, too.

Code:
% cat fstab
# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/gpt/swapN1 none    swap    sw,trimonce     0       0

     (snip)
    
/dev/msdosfs/ESP_N01    /boot/efi       msdosfs rw      0       0

     (snip)

% gpart list nda0
Geom name: nda0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 3907029127
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: nda0p1
   Mediasize: 576716800 (550M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r1w1e2
   efimedia: HD(1,GPT,********-****-****-****-************,0x800,0x113000)
   rawuuid: ********-****-****-****-************
   rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
   label: ESP_N1
   length: 576716800
   offset: 1048576
   type: efi
   index: 1
   end: 1128447
   start: 2048

     (snip)

4. Name: nda0p4
   Mediasize: 69232230400 (64G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1931166613504
   Mode: r1w1e1
   efimedia: HD(4,GPT,********-****-****-****-************,0xe0d14000,0x80f4800)
   rawuuid: ********-****-****-****-************
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: swapN1
   length: 69232230400
   offset: 1931166613504
   type: freebsd-swap
   index: 4
   end: 3907028991
   start: 3771809792

     (snip)

%

As seen, using label I've specified on creating partitions. Can be specified on adding partition or modify afterwards, both with -l option.
See manpage gpart(8) for details.
 
Back
Top