summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/fdisk.1m
blob: db5a8b553630cc9c01affb4821162c14bd098bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH FDISK 1M "Feb 11, 2018"
.SH NAME
fdisk \- create or modify fixed disk partition table
.SH SYNOPSIS
.LP
.nf
\fBfdisk\fR [\fB-o\fR \fIoffset\fR] [\fB-s\fR \fIsize\fR] [\fB-P\fR \fIfill_patt\fR] [\fB-S\fR \fIgeom_file\fR]
     [\fB-w\fR | \fB-r\fR | \fB-d\fR | \fB-n\fR | \fB-I\fR | \fB-B\fR | \fB-t\fR | \fB-T\fR | \fB-g\fR | \fB-G\fR | \fB-R\fR]
     [-\fB-F\fR \fIfdisk_file\fR] [ [\fB-v\fR] \fB-W\fR {\fIfdisk_file\fR | \(mi}]
     [\fB-h\fR] [\fB-b\fR \fImasterboot\fR]
     [\fB-A\fR \fIid\fR : \fIact\fR : \fIbhead\fR : \fIbsect\fR : \fIbcyl\fR : \fIehead\fR : \fIesect\fR :
         \fIecyl\fR : \fIrsect\fR : \fInumsect\fR]
     [\fB-D\fR \fIid\fR : \fIact\fR : \fIbhead:\fR \fIbsect\fR : \fIbcyl\fR : \fIehead:\fR \fIesect\fR :
         \fIecyl\fR : \fIrsect\fR : \fInumsect\fR] \fIrdevice\fR
     [\fB-E\fR [\fIslot\fR : \fIactive\fR]]
     \fIrdevice\fR
.fi

.SH DESCRIPTION
.LP
This command is used to do the following:
.RS +4
.TP
.ie t \(bu
.el o
Create and modify an \fBfdisk\fR partition table on x86 systems
.RE
.RS +4
.TP
.ie t \(bu
.el o
Create and modify an \fBfdisk\fR partition table on removable media on SPARC or
x86 systems
.RE
.RS +4
.TP
.ie t \(bu
.el o
Install the master boot record that is put in the first sector of the fixed
disk on x86 systems only
.RE
.sp
.LP
This table is used by the first-stage bootstrap (or firmware) to identify parts
of the disk reserved for different operating systems, and to identify the
partition containing the second-stage bootstrap (the \fIactive\fR Solaris
partition). The \fIrdevice\fR argument must be used to specify the raw device
associated with the fixed disk, for example, \fB/dev/rdsk/c0t0d0p0\fR.
.sp
.LP
The program can operate in three different modes. The first is interactive
mode. In interactive mode, the program displays the partition table as it
exists on the disk, and then presents a menu allowing the user to modify the
table. The menu, questions, warnings, and error messages are intended to be
self-explanatory.
.sp
.LP
In interactive mode, if there is no partition table on the disk, the user is
given the options of creating a default partitioning or specifying the initial
table values. The default partitioning allocates the entire disk for the
Solaris system and makes the Solaris system partition active. In either case,
when the initial table is created, \fBfdisk\fR also writes out the first-stage
bootstrap (x86 only) code along with the partition table. In this mode, (x86
only) when creating an  entry for a non-EFI partition on a disk that is larger
than 2 TB (terabytes), \fBfdisk\fR warns that the maximum size of the partition
is 2 TB. Under these conditions percentages displayed by \fBfdisk\fR are based
on 2 TB.
.sp
.LP
The second mode of operation is used for automated entry addition, entry
deletion, or replacement of the entire \fBfdisk\fR table. This mode can add or
delete an entry described on the command line. In this mode the entire
\fBfdisk\fR table can be read in from a file replacing the original table.
\fBfdisk\fR can also be used to create this file. There is a command line
option that will cause \fBfdisk\fR to replace any \fBfdisk\fR table with the
default of the whole disk for the Solaris system.
.sp
.LP
The third mode of operation is used for disk diagnostics. In this mode, a
section of the disk can be filled with a user-specified pattern and mode
sections of the disk can also be read or written.
.LP
Note -
.sp
.RS 2
The third mode of operation is not currently supported for extended partitions
.RE
.sp
.LP
When \fBfdisk\fR creates a partition, the space is allocated in the \fBfdisk\fR
partition table, but the allocated disk space is not initialized.
\fBnewfs\fR(1M) is required to create and write file system metadata to the new
partition, and \fBformat\fR(1M) is required to write the VTOC or EFI/GPT
metadata.
.SS "Menu Options"
.LP
The menu options for interactive mode given by the \fBfdisk\fR program are:
.sp
.ne 2
.na
\fB\fBCreate a partition\fR\fR
.ad
.sp .6
.RS 4n
This option allows the user to create a new partition. The maximum number of
partitions is 4. The program will ask for the type of the partition (SOLARIS,
MS-DOS, UNIX, or other). It will then ask for the size of the partition as a
percentage of the disk. The user may also enter the letter \fBc\fR at this
point, in which case the program will ask for the starting cylinder number and
size of the partition in cylinders. If a \fBc\fR is not entered, the program
will determine the starting cylinder number where the partition will fit. In
either case, if the partition would overlap an existing partition or will not
fit, a message is displayed and the program returns to the original menu.
.RE

.sp
.ne 2
.na
\fB\fBChange Active (Boot from) partition\fR\fR
.ad
.sp .6
.RS 4n
This option allows the user to specify the partition where the first-stage
bootstrap will look for the second-stage bootstrap, otherwise known as the
\fIactive\fR partition.
.RE

.sp
.ne 2
.na
\fB\fBDelete a partition\fR\fR
.ad
.sp .6
.RS 4n
This option allows the user to delete a previously created partition. Note that
this will destroy all data in that partition.
.RE

.sp
.ne 2
.na
\fB\fBChange between Solaris and Solaris2 Partition IDs\fR\fR
.ad
.sp .6
.RS 4n
This option allows the user to switch between the current \fBfdisk\fR operating
system partition identifier and the previous one. This does not affect any data
in the disk partition and is provided for compatibility with older software.
.RE

.sp
.ne 2
.na
\fB\fBEdit/View extended partitions\fR\fR
.ad
.sp .6
.RS 4n
This option provides the extended partition menu to the user. Use the extended
partition menu to add and delete logical drives, change the sysid of the
logical drives, and display logical drive information. To commit the changes
made in the extended partition, you must return to the main menu using the
extended partition submenu option \fBr\fR. There is also an option to display
the list of options that the extended partition submenu supports. Given below
is the list:
.sp
.ne 2
.na
\fB\fBa\fR\fR
.ad
.RS 5n
Add a logical drive.
.sp
Use this submenu option to add a logical drive. There are three pieces of
information that are required: The beginning cylinder, the size (in cylinders
or in human readable form - KB, MB, or GB), and the partition ID. While
specifying the partition ID, there is an option (\fBI\fR) that you can use to
list the supported partitions.
.RE

.sp
.ne 2
.na
\fB\fBd\fR\fR
.ad
.RS 5n
Delete a logical drive.
.sp
Use this submenu option to delete a logical drive. The only input required is
the number of the logical drive that is to be deleted.
.RE

.sp
.ne 2
.na
\fB\fBh\fR\fR
.ad
.RS 5n
Display the help menu.
.sp
This submenu option displays the supported operations in the extended partition
submenu.
.RE

.sp
.ne 2
.na
\fB\fBi\fR\fR
.ad
.RS 5n
Change the id of the logical drive.
.sp
Use this submenu option to change the system ID of the existing logical drives.
A list of supported system IDs is displayed when you use the \fBI\fR option
when in this submenu.
.RE

.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.RS 5n
Display the logical drive layout.
.sp
Displays the logical drive information to stdout. This output reflects any
changes made during the current run of the \fBfdisk\fR program. The changes are
not committed to the disk until return to the main menu (using the submenu
\fBr\fR) and choose the option to commit the changes to the disk.
.RE

.sp
.ne 2
.na
\fB\fBr\fR\fR
.ad
.RS 5n
Return to the main \fBfdisk\fR menu.
.sp
Exit the extended partition submenu and return to the main menu.
.RE

.RE

.sp
.LP
Use the following options to include your modifications to the partition table
at this time or to cancel the session without modifying the table:
.sp
.ne 2
.na
\fB\fBExit\fR\fR
.ad
.RS 10n
This option writes the new version of the table created during this session
with \fBfdisk\fR out to the fixed disk, and exits the program.
.RE

.sp
.ne 2
.na
\fB\fBCancel\fR\fR
.ad
.RS 10n
This option exits without modifying the partition table.
.RE

.SH OPTIONS
.LP
The following options apply to \fBfdisk\fR:
.sp
.ne 2
.na
\fB\fB-A\fR \fIid:act:bhead:bsect:bcyl:ehead:esect:ecyl:rsect:numsect\fR\fR
.ad
.sp .6
.RS 4n
Add a partition as described by the argument (see the \fB-F\fR option below for
the format). Use of this option will zero out the \fBVTOC\fR on the Solaris
partition if the \fBfdisk\fR table changes.
.RE

.sp
.ne 2
.na
\fB\fB-b\fR \fImaster_boot\fR\fR
.ad
.sp .6
.RS 4n
Specify the file \fImaster_boot\fR as the master boot program. The default
master boot program is \fB/usr/lib/fs/ufs/mboot\fR.
.RE

.sp
.ne 2
.na
\fB\fB-B\fR\fR
.ad
.sp .6
.RS 4n
Default to one Solaris partition that uses the whole disk. On an x86 machine,
if the disk is larger than 2 TB (terabytes), the default size of the Solaris
partition will be limited to 2 TB.
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
Turn on verbose \fIdebug\fR mode. This will cause \fBfdisk\fR to print its
state on stderr as it is used. The output from this option should not be used
with \fB-F\fR.
.RE

.sp
.ne 2
.na
\fB\fB-D\fR \fIid:act:bhead:bsect:bcyl:ehead:esect:ecyl:rsect:numsect\fR\fR
.ad
.sp .6
.RS 4n
Delete a partition as described by the argument (see the \fB-F\fR option below
for the format). Note that the argument must be an exact match or the entry
will not be deleted! Use of this option will zero out the \fBVTOC\fR on the
Solaris partition if the \fBfdisk\fR table changes.
.RE

.sp
.ne 2
.na
\fB-E\fR [\fIslot\fR:\fIactive\fR]
.ad
.sp .6
.RS 4n
Create an \fBEFI\fR partition that uses the entire disk.
.sp
By default this partition entry will be placed into the first slot within the
partition table and will not be marked active. The remaining slots within the
table will be zeroed out.
.sp
Some broken firmware implementations have issues booting in CSM/Legacy/BIOS
mode from EFI partitions that are not set active. Others have issues with
booting from EFI partitions without UEFI if the protective partition table
entry is in the first slot. To work around these problems, the \fB-E\fR
option takes an optional argument which can be used to override the defaults
described above.

.sp
.ne 2
.na
\fB\fIslot\fR\fR
.ad
.RS 11n
Specify the MBR slot into which the EFI partition should be placed. This accepts a value in the range 0 to 3 with the default being 0.
.RE

.sp
.ne 2
.na
\fB\fIactive\fR\fR
.ad
.RS 11n
Specify whether the EFI partition entry should be marked active; \fB0\fR specifies not active (the default) and \fB1\fR means active.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-F\fR \fIfdisk_file\fR\fR
.ad
.sp .6
.RS 4n
Use fdisk file \fIfdisk_file\fR to initialize table. Use of this option will
zero out the \fBVTOC\fR on the Solaris partition if the \fBfdisk\fR table
changes.
.sp
The \fIfdisk_file\fR contains four specification lines for the primary
partitions followed by specification lines for the logical drives. You must
have four lines for the primary partitions if there is at least one logical
drive. In this case, if the number of primary partitions to be configured is
less than four, the remaining lines should be filled with zeros.
.sp
Each line is composed of entries that are position-dependent, are separated by
whitespace or colons, and have the following format:
.sp
\fIid act bhead bsect bcyl ehead esect ecyl rsect numsect\fR
.sp
\&...where the entries have the following values:
.sp
.ne 2
.na
\fB\fIid\fR\fR
.ad
.RS 11n
This is the type of partition and the correct numeric values may be found in
\fBfdisk.h\fR.
.RE

.sp
.ne 2
.na
\fB\fIact\fR\fR
.ad
.RS 11n
This is the active partition flag; \fB0\fR means not active and \fB128\fR means
active. For logical drives, this flag will always be set to 0 even if specified
as 128 by the user.
.RE

.sp
.ne 2
.na
\fB\fIbhead\fR\fR
.ad
.RS 11n
This is the head where the partition starts. If this is set to \fB0\fR,
\fBfdisk\fR will correctly fill this in from other information.
.RE

.sp
.ne 2
.na
\fB\fIbsect\fR\fR
.ad
.RS 11n
This is the sector where the partition starts. If this is set to \fB0\fR,
\fBfdisk\fR will correctly fill this in from other information.
.RE

.sp
.ne 2
.na
\fB\fIbcyl\fR\fR
.ad
.RS 11n
This is the cylinder where the partition starts. If this is set to \fB0\fR,
\fBfdisk\fR will correctly fill this in from other information.
.RE

.sp
.ne 2
.na
\fB\fIehead\fR\fR
.ad
.RS 11n
This is the head where the partition ends. If this is set to \fB0\fR,
\fBfdisk\fR will correctly fill this in from other information.
.RE

.sp
.ne 2
.na
\fB\fIesect\fR\fR
.ad
.RS 11n
This is the sector where the partition ends. If this is set to \fB0\fR,
\fBfdisk\fR will correctly fill this in from other information.
.RE

.sp
.ne 2
.na
\fB\fIecyl\fR\fR
.ad
.RS 11n
This is the cylinder where the partition ends. If this is set to \fB0\fR,
\fBfdisk\fR will correctly fill this in from other information.
.RE

.sp
.ne 2
.na
\fB\fIrsect\fR\fR
.ad
.RS 11n
The relative sector from the beginning of the disk where the partition starts.
This must be specified and can be used by \fBfdisk\fR to fill in other fields.
For logical drives, you must make sure that there are at least 63 free sectors
before the \fIrsect\fR specified for a logical drive.
.RE

.sp
.ne 2
.na
\fB\fInumsect\fR\fR
.ad
.RS 11n
The size in sectors of this disk partition. This must be specified and can be
used by \fBfdisk\fR to fill in other fields.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-g\fR\fR
.ad
.sp .6
.RS 4n
Get the label geometry for disk and display on stdout (see the \fB-S\fR option
for the format).
.RE

.sp
.ne 2
.na
\fB\fB-G\fR\fR
.ad
.sp .6
.RS 4n
Get the physical geometry for disk and display on stdout (see the \fB-S\fR
option for the format).
.RE

.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.sp .6
.RS 4n
Issue verbose message; message will list all options and supply an explanation
for each.
.RE

.sp
.ne 2
.na
\fB\fB-I\fR\fR
.ad
.sp .6
.RS 4n
Forgo device checks. This is used to generate a file image of what would go on
a disk without using the device. Note that you must use \fB-S\fR with this
option (see above).
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
Don't update \fBfdisk\fR table unless explicitly specified by another option.
If no other options are used, \fB-n\fR will only write the master boot record
to the disk. In addition, note that \fBfdisk\fR will not come up in interactive
mode if the \fB-n\fR option is specified.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR \fIoffset\fR\fR
.ad
.sp .6
.RS 4n
Block offset from start of disk. This option is used for \fB-P\fR, \fB-r\fR,
and \fB-w\fR. Zero is assumed when this option is not used.
.RE

.sp
.ne 2
.na
\fB\fB-P\fR \fIfill_patt\fR\fR
.ad
.sp .6
.RS 4n
Fill disk with pattern \fIfill_patt\fR. \fIfill_patt\fR can be decimal or hex
and is used as number for constant long word pattern. If \fIfill_patt\fR is
\fB#\fR, then pattern is block # for each block. Pattern is put in each block
as long words and fills each block (see \fB-o\fR and \fB-s\fR).
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.sp .6
.RS 4n
Read from disk and write to stdout. See \fB-o\fR and \fB-s\fR, which specify
the starting point and size of the operation.
.RE

.sp
.ne 2
.na
\fB\fB-R\fR\fR
.ad
.sp .6
.RS 4n
Treat disk as read-only. This is for testing purposes.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR \fIsize\fR\fR
.ad
.sp .6
.RS 4n
Number of blocks to perform operation on (see \fB-o\fR).
.RE

.sp
.ne 2
.na
\fB\fB-S\fR \fIgeom_file\fR\fR
.ad
.sp .6
.RS 4n
Set the label geometry to the content of the \fIgeom_file\fR. The
\fIgeom_file\fR contains one specification line. Each line is delimited by a
new-line character (\fB\en\fR). If the first character of a line is an asterisk
(*), the line is treated as a comment. Each line is composed of entries that
are position-dependent, are separated by white space, and have the following
format:
.sp
.in +2
.nf
\fIpcyl ncyl acyl bcyl nheads nsectors sectsiz\fR
.fi
.in -2
.sp

where the entries have the following values:
.sp
.ne 2
.na
\fB\fIpcyl\fR\fR
.ad
.RS 12n
This is the number of physical cylinders for the drive.
.RE

.sp
.ne 2
.na
\fB\fIncyl\fR\fR
.ad
.RS 12n
This is the number of usable cylinders for the drive.
.RE

.sp
.ne 2
.na
\fB\fIacyl\fR\fR
.ad
.RS 12n
This is the number of alt cylinders for the drive.
.RE

.sp
.ne 2
.na
\fB\fIbcyl\fR\fR
.ad
.RS 12n
This is the number of offset cylinders for the drive (should be zero).
.RE

.sp
.ne 2
.na
\fB\fInheads\fR\fR
.ad
.RS 12n
The number of heads for this drive.
.RE

.sp
.ne 2
.na
\fB\fInsectors\fR\fR
.ad
.RS 12n
The number of sectors per track.
.RE

.sp
.ne 2
.na
\fB\fIsectsiz\fR\fR
.ad
.RS 12n
The size in bytes of a sector.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.sp .6
.RS 4n
Adjust incorrect slice table entries so that they will not cross partition
table boundaries.
.RE

.sp
.ne 2
.na
\fB\fB-T\fR\fR
.ad
.sp .6
.RS 4n
Remove incorrect slice table entries that span partition table boundaries.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
Output the HBA (virtual) geometry dimensions. This option must be used in
conjunction with the \fB-W\fR flag. This option will work for platforms which
support virtual geometry. (x86 only)
.RE

.sp
.ne 2
.na
\fB\fB-w\fR\fR
.ad
.sp .6
.RS 4n
Write to disk and read from stdin. See \fB-o\fR and \fB-s\fR, which specify the
starting point and size of the operation.
.RE

.sp
.ne 2
.na
\fB\fB-W\fR \fB\(mi\fR\fR
.ad
.sp .6
.RS 4n
Output the disk table to \fBstdout\fR.
.RE

.sp
.ne 2
.na
\fB\fB-W\fR \fIfdisk_file\fR\fR
.ad
.sp .6
.RS 4n
Create an \fBfdisk\fR file \fIfdisk_file\fR from disk table. This can be used
with the \fB-F\fR option below.
.RE

.SH FILES
.ne 2
.na
\fB\fB/dev/rdsk/c0t0d0p0\fR\fR
.ad
.RS 25n
Raw device associated with the fixed disk.
.RE

.sp
.ne 2
.na
\fB\fB/usr/lib/fs/ufs/mboot\fR\fR
.ad
.RS 25n
Default master boot program.
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Architecture	x86 and SPARC
.TE

.SH SEE ALSO
.LP
\fBuname\fR(1), \fBfmthard\fR(1M), \fBformat\fR(1M), \fBnewfs\fR(1M),
\fBprtvtoc\fR(1M), \fBattributes\fR(5)
.SH DIAGNOSTICS
.LP
Most messages will be self-explanatory. The following may appear immediately
after starting the program:
.sp
.ne 2
.na
\fB\fBFdisk\fR: \fBcannot open\fR <\fBdevice\fR>\fR
.ad
.sp .6
.RS 4n
This indicates that the device name argument is not valid.
.RE

.sp
.ne 2
.na
\fB\fBFdisk\fR: \fBunable to get device parameters for device\fR
<\fBdevice\fR>\fR
.ad
.sp .6
.RS 4n
This indicates a problem with the configuration of the fixed disk, or an error
in the fixed disk driver.
.RE

.sp
.ne 2
.na
\fB\fBFdisk\fR: \fBerror reading partition table\fR\fR
.ad
.sp .6
.RS 4n
This indicates that some error occurred when trying initially to read the fixed
disk. This could be a problem with the fixed disk controller or driver, or with
the configuration of the fixed disk.
.RE

.sp
.ne 2
.na
\fB\fBFdisk\fR: \fBerror writing boot record\fR\fR
.ad
.sp .6
.RS 4n
This indicates that some error occurred when trying to write the new partition
table out to the fixed disk. This could be a problem with the fixed disk
controller, the disk itself, the driver, or the configuration of the fixed
disk.
.RE