Project

General

Profile

Bug #762 » disklabel.8.patch

thomas.nikolajsen, 08/09/2007 09:49 PM

View differences:

disklabel.8 9 Aug 2007 20:53:58 -0000
134 134
forms require a disk device name, which should always be the raw
135 135
device name representing the disk or slice.
136 136
For example
137
.Pa da0
137
.Pa da0s0
138 138
represents the entire disk regardless of any DOS partitioning,
139
this is called the compatibility slice,
139 140
and
140 141
.Pa da0s1
141
represents a slice.
142
Some devices, most notably
143
.Ar ccd ,
144
require that the
145
.Dq whole-disk
146
(or
147
.Dq c )
148
partition be specified.
149
For example
150
.Pa ccd0c .
142
represents a normal slice, i.e. one with a positive number.
151 143
You do not have to include the
152 144
.Pa /dev/
153 145
path prefix when specifying the device.
......
165 157
.Pp
166 158
.Ar disk
167 159
represents the raw disk in question, and may be in the form
168
.Pa da0
160
.Pa da0s1
169 161
or
170
.Pa /dev/da0c .
162
.Pa /dev/da0s1 .
171 163
It will display all of the parameters associated with the drive and its
172 164
partition layout.
173 165
Unless the
......
371 363
If you are creating a
372 364
.Dq dangerously-dedicated
373 365
slice for compatibility with older PC systems,
374
you generally want to specify the raw disk name such as
375
.Pa da0 .
366
you generally want to specify the compatibility slice, such as
367
.Pa da0s0 .
376 368
If you are creating a label within an existing DOS slice,
377 369
you should specify
378
the partition name such as
379
.Pa da0s1a .
370
the slice name such as
371
.Pa da0s1 .
380 372
Making a slice bootable can be tricky.
381 373
If you are using a normal DOS
382 374
slice you typically install (or leave) a standard MBR on the base disk and
......
395 387
.Pp
396 388
This form installs the bootstrap only.
397 389
It does not change the disk label.
398
You should never use this command on a base disk unless you intend to create a
390
You should never use this command on a compatibility slice unless you intend to create a
399 391
.Dq dangerously-dedicated
400 392
disk, such as
401
.Ar da0 .
402
This command is typically run on a slice such as
393
.Ar da0s0 .
394
This command is typically run on a normal slice such as
403 395
.Ar da0s1 .
404 396
.Pp
405 397
.Nm
......
417 409
.Dq write label
418 410
command described above.
419 411
In addition to writing a new volume label, it also installs the bootstrap.
420
If run on a base disk this command will create a
412
If run on a compatibility slice this command will create a
421 413
.Dq dangerously-dedicated
422 414
label.
423
This command is normally run on a slice rather than a base disk.
415
This command is normally run on a normal slice rather than a compatibility slice.
424 416
If
425 417
.Fl n
426 418
is used, no data will be written to the device, and instead the
......
441 433
.Dq restore label
442 434
command described above.
443 435
In addition to restoring the volume label, it also installs the bootstrap.
444
If run on a base disk this command will create a
436
If run on a compatibility slice this command will create a
445 437
.Dq dangerously-dedicated
446 438
label.
447
This command is normally run on a slice rather than a base disk.
439
This command is normally run on a normal slice rather than a compatibility slice.
448 440
.Pp
449 441
The bootstrap commands always access the disk directly, so it is not necessary
450 442
to specify the
......
573 565
label.
574 566
The format is:
575 567
.Bd -literal -offset 4n
576
# /dev/da1c:
568
# /dev/da0s1:
577 569
type: SCSI
578 570
disk: da0s1
579 571
label:
......
593 585
drivedata: 0
594 586

  
595 587
16 partitions:
596
#        size   offset    fstype
597
  a:    81920        0    4.2BSD	#      40.000M
598
  b:   160000    81920      swap	#      78.125M
599
  c:  1173930        0    unused	#     573.208M
600
  h:   962010   211920     vinum	#     469.731M
588
#          size     offset    fstype
589
  a:      81920          0    4.2BSD	#      40.000M
590
  b:     160000      81920      swap	#      78.125M
591
  c:    1173930          0    unused	#     573.208M
592
  g:     320000     241920       ccd	#     156.250M
593
  h:     612010     561920     vinum	#     298.833M
601 594
.Ed
602 595
.Pp
603 596
Lines starting with a
......
644 637
The partition identifier is a single letter in the range
645 638
.Ql a
646 639
to
647
.Ql h .
640
.Ql p .
648 641
By convention, partition
649 642
.Ql c
650 643
is reserved to describe the entire disk.
......
698 691
The example shows all currently used partition types.
699 692
For
700 693
.Tn UFS
701
file systems and
694
file systems, use type
695
.Cm 4.2BSD .
696
For
702 697
.Xr ccd 4
703 698
partitions, use type
704
.Cm 4.2BSD .
699
.Cm ccd .
705 700
For Vinum drives, use type
706 701
.Cm vinum .
707 702
Other common types are
......
723 718
(See the definitions starting with
724 719
.Dv FS_UNUSED
725 720
in
726
.In sys/disklabel.h
721
.In sys/dtype.h
727 722
for more details).
728 723
.El
729 724
.Pp
730 725
The remainder of the line is a comment and shows the size of the partition
731
in MB.
726
in bytes.
732 727
.Pp
733 728
.Dx
734 729
no longer snoop-adjusts the on-disklabel when reading or writing
......
755 750
.Pa /dev/da0s1 .
756 751
(If the disk is
757 752
.Dq dangerously-dedicated ,
758
the base disk name should be specified, such as
759
.Pa da0 . )
753
the compatibility slice name should be specified, such as
754
.Pa da0s0 . )
760 755
.Pp
761 756
.Dl "disklabel da0s1 > savedlabel"
762 757
.Pp
......
871 866
.Cm * ,
872 867
which could be used as a source file for
873 868
.Pp
874
.Dl disklabel -R ad0s1c new_label_file
869
.Dl disklabel -R ad0s1 new_label_file
875 870
.Bd -literal -offset 4n
876
# /dev/ad0s1c:
871
# /dev/ad0s1:
877 872
type: ESDI
878 873
disk: ad0s1
879 874
label:
......
893 888
drivedata: 0
894 889

  
895 890
16 partitions:
896
#        size   offset    fstype
897
  a:   400M        0    4.2BSD
898
  b:     1G        *      swap
899
  c:      *        *    unused
900
  e: 204800        *    4.2BSD
901
  f:     5g        *    4.2BSD
902
  g:      *        *    4.2BSD
891
#          size     offset    fstype
892
  a:       400M          0    4.2BSD
893
  b:         1G          *      swap
894
  c:          *          *    unused
895
  e:     204800          *    4.2BSD
896
  f:         5g          *    4.2BSD
897
  g:          *          *    4.2BSD
903 898
.Ed
904 899
.Sh DIAGNOSTICS
905 900
The kernel device drivers will not allow the size of a disk partition
(7-7/11)