Labeling Disks
OpenBSD uses disklabel
to set up partitions on all hardware platforms. We used disklabel(8)
as part of the installation process, but you need to partition new disks before you can use them. (You can also use disklabel
to back up, restore, and duplicate partition tables.)
Viewing Labels
To view the current disklabel, just give the disk name as an argument. Here’s how to see the disklabel of the empty disk from the previous section:
# disklabel wd1 1 # /dev/rwd1c: … 2 duid: 0000000000000000 … 16 partitions: # size offset fstype [fsize bsize cpg] 3 c: 33554304 0 unused
This looks much like the disklabel we saw in Chapter 2, with a few critical differences.
First, note the device at 1. The disklabel
command accesses the raw device, ...
Get Absolute OpenBSD, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.