O'Reilly logo

Absolute OpenBSD, 2nd Edition by Michael W. Lucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required