aboutsummaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.8
diff options
context:
space:
mode:
authorRobert Nordier <rnordier@FreeBSD.org>1999-06-27 19:29:15 +0000
committerRobert Nordier <rnordier@FreeBSD.org>1999-06-27 19:29:15 +0000
commit26721a89ffd340c4bb267fb533b0d8598a873367 (patch)
treeea314db8c0902a5cc53dd964b9923dffc798e91c /sbin/fdisk/fdisk.8
parentf3ea90113a41b99a8f28d5e722cd825722b1e8be (diff)
downloadsrc-26721a89ffd340c4bb267fb533b0d8598a873367.tar.gz
src-26721a89ffd340c4bb267fb533b0d8598a873367.zip
Drop the embedded boot code in favour of a -B option which reads
the boot code from /boot/mbr, or elsewhere as defined by the revised "-b bootcode" option; use getopt(3); clarify usage(); partially revise man page; etc.
Notes
Notes: svn path=/head/; revision=48282
Diffstat (limited to 'sbin/fdisk/fdisk.8')
-rw-r--r--sbin/fdisk/fdisk.878
1 files changed, 41 insertions, 37 deletions
diff --git a/sbin/fdisk/fdisk.8 b/sbin/fdisk/fdisk.8
index cd82ed585491..b6e0748cf16d 100644
--- a/sbin/fdisk/fdisk.8
+++ b/sbin/fdisk/fdisk.8
@@ -1,23 +1,21 @@
+.\" $Id: $
+.\"
.Dd October 4, 1996
.Dt FDISK 8
.\".Os BSD 4
.Sh NAME
.Nm fdisk
-.Nd DOS partition maintenance program
+.Nd PC partition table maintenance program
.Sh SYNOPSIS
.Nm fdisk
-.Op Fl i
-.Op Fl u
-.Op Fl a
-.Op Fl b
+.Op Fl Baitu
+.Op Fl b Ar bootcode
.Op Fl 1234
.Op Ar disk
.Bl -tag -width time
.Nm fdisk
-.Op Fl f Ar configfile
-.Op Fl i
-.Op Fl v
-.Op Fl t
+.Fl f Ar configfile
+.Op Fl itv
.Op Ar disk
.Sh PROLOGUE
In order for the BIOS to boot the kernel,
@@ -26,17 +24,15 @@ Sector 0 of the disk must contain boot code,
a partition table,
and a magic number.
BIOS partitions can be used to break the disk up into several pieces.
-The BIOS brings in sector 0
-(does it really use the code?)
-and verifies the magic number.
-It then searches the 4 BIOS partitions described by sector 0
-to determine which of them is
+The BIOS brings in sector 0 and verifies the magic number. The sector
+0 boot code then searches the partition table to determine which
+partition is marked
.Em active .
-This boot then brings in the secondary boot block from the
+This boot code then brings in the bootstrap from the
.Em active
-partition and runs it.
+partition and, if marked bootable, runs it.
Under DOS,
-you could have one or more partitions with one
+you can have one or more partitions with one
.Em active .
The DOS
.Nm
@@ -54,32 +50,18 @@ table. The second is used to write a partition table using a
and is designed to be used by other scripts/programs.
.Pp
Options are:
-.It Fl u
-Is used for updating (editing) sector 0 of the disk. Ignored if
-.Fl f
-is given.
-.It Fl i
-Initialize sector 0 of the disk. This implies
-.Fl u ,
-unless
+.It Fl B
+Reinitialize the boot code contained in sector 0 of the disk. Ignored
+if
.Fl f
is given.
.It Fl a
Change the active partition only. Ignored if
.Fl f
is given.
-.It Fl b
-Reinitialize the boot code contained in sector 0 of the disk. Ignored
-if
-.Fl f
-is given. It should be noted, however, that the standard boot code
-written by
-.Nm
-is suitable for booting only from hard drive 0 (BIOS drive 0x80).
-.It Fl 1234
-Operate on a single fdisk entry only. Ignored if
-.Fl f
-is given.
+.It Fl b Ar bootcode
+Get the boot code from the file
+.Ar bootcode .
.It Fl f Ar configfile
Set partition values using the file
.Ar configfile .
@@ -103,17 +85,31 @@ when
.Fl f
is used, you are not asked if you really want to write the partition
table (as you are in the interactive mode). Use with caution!
+.It Fl i
+Initialize sector 0 of the disk. This implies
+.Fl u ,
+unless
+.Fl f
+is given.
.It Fl t
Test mode; do not write partition values. Generally used with the
.Fl f
option to see what would be written to the partition table. Implies
.Fl v .
+.It Fl u
+Is used for updating (editing) sector 0 of the disk. Ignored if
+.Fl f
+is given.
.It Fl v
Be verbose. When
.Fl f
is used,
.Nm
prints out the partition table that is written to the disk.
+.It Fl 1234
+Operate on a single fdisk entry only. Ignored if
+.Fl f
+is given.
.El
.Pp
The final disk name can be provided as a
@@ -411,9 +407,17 @@ Example: to make partition 1 the active partition:
.El
.Pp
+.Sh FILES
+.Bl -tag -width /boot/mbr -compact
+.It Pa /boot/mbr
+The default boot code
+.El
.Sh SEE ALSO
.Xr disklabel 8
.Sh BUGS
+The default boot code will not necessarily handle all partition types
+correctly, in particular those introduced since MS-DOS 6.x.
+.Pp
The entire program should be made more user-friendly.
.Pp
Throughout this man page, the term