summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-02-23 01:48:42 +0000
committerru <ru@FreeBSD.org>2003-02-23 01:48:42 +0000
commit5ecd4995a53ef83a3ed6cc0e466632e66719f8c0 (patch)
treecfae9526af95d4076b33edc5d378ef6e2bfd3a5f
parent8b5b8ec6a76033148b7266d572cd6e0ec6ddd60b (diff)
downloadFreeBSD-src-5ecd4995a53ef83a3ed6cc0e466632e66719f8c0.zip
FreeBSD-src-5ecd4995a53ef83a3ed6cc0e466632e66719f8c0.tar.gz
Deal with vestiges of d_boot[01].
-rw-r--r--sbin/bsdlabel/bsdlabel.846
-rw-r--r--sbin/bsdlabel/bsdlabel.c18
-rw-r--r--sbin/disklabel/disklabel.846
-rw-r--r--sbin/disklabel/disklabel.c18
4 files changed, 24 insertions, 104 deletions
diff --git a/sbin/bsdlabel/bsdlabel.8 b/sbin/bsdlabel/bsdlabel.8
index ab18c6f..c618dc5 100644
--- a/sbin/bsdlabel/bsdlabel.8
+++ b/sbin/bsdlabel/bsdlabel.8
@@ -86,7 +86,6 @@
.Fl b Ar boot
.Oc
.Ar disk Ar protofile
-.Oo Ar disktype/auto Oc
.Sh DESCRIPTION
The
.Nm
@@ -370,7 +369,6 @@ disklabel that would have been written will be printed to stdout.
.Fl b Ar boot
.Oc
.Ar disk Ar protofile
-.Oo Ar disktype Oc
.Pp
This form corresponds to the
.Dq restore label
@@ -388,38 +386,13 @@ flag. If
is used, no data will be written to the device, and instead the
disklabel that would have been written will be printed to stdout.
.Pp
-The bootstrap code is comprised of two boot programs. Specify the name of the
-boot programs to be installed in one of these ways:
-.Bl -enum
-.It
-Specify the names explicitly with the
-.Fl b
-and
-.Fl s
-flags.
-.Fl b
-indicates the primary boot program and
-.Fl s
-the secondary boot program. The boot programs are located in
-.Pa /boot .
-.It
-If the
+The bootstrap code is comprised of two boot programs, both
+compiled into a single
+.Pa /boot/boot
+image.
+An alternative boot image may be specified with the
.Fl b
-and
-.Fl s
-flags are not specified, but
-.Ar disktype
-was specified, the names of the programs are taken from the
-.Dq b0
-and
-.Dq b1
-parameters of the
-.Xr disktab 5
-entry for the disk if the disktab entry exists and includes those parameters.
-.It
-Otherwise, the default boot image name are used:
-.Pa /boot/boot .
-.El
+option.
.Ss Initializing/Formatting a bootable disk from scratch
.Pp
To initialize a disk from scratch the following sequence is recommended.
@@ -478,10 +451,11 @@ auto
.Fl e
.Ar da0s1
.Sh FILES
-.Bl -tag -width Pa -compact
+.Bl -tag -width ".Pa /etc/disktab" -compact
+.It Pa /boot/boot
+Default boot image.
.It Pa /etc/disktab
-.It Pa /boot/
-.It Pa /boot/boot<n>
+Disk description file.
.El
.Sh SAVED FILE FORMAT
The
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index ecb1705..88604d3 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -256,18 +256,6 @@ main(int argc, char *argv[])
break;
case RESTORE:
- if (installboot && argc == 3) {
- makelabel(argv[2], 0, &lab);
- argc--;
-
- /*
- * We only called makelabel() for its side effect
- * of setting the bootstrap file names. Discard
- * all changes to `lab' so that all values in the
- * final label come from the ASCII label.
- */
- bzero((char *)&lab, sizeof(lab));
- }
if (argc != 2)
usage();
if (!(t = fopen(argv[1], "r")))
@@ -312,9 +300,7 @@ main(int argc, char *argv[])
}
/*
- * Construct a prototype disklabel from /etc/disktab. As a side
- * effect, set the names of the primary and secondary boot files
- * if specified.
+ * Construct a prototype disklabel from /etc/disktab.
*/
void
makelabel(const char *type, const char *name, struct disklabel *lp)
@@ -1522,7 +1508,7 @@ usage(void)
"\t\t(to install boot program with existing on-disk label)",
" disklabel -w -B [-n] [ -b bootprog ] disk type [ packid ]",
"\t\t(to write label and install boot program)",
- " disklabel -R -B [-n] [ -b bootprog ] disk protofile [ type ]",
+ " disklabel -R -B [-n] [ -b bootprog ] disk protofile",
"\t\t(to restore label and install boot program)"
);
exit(1);
diff --git a/sbin/disklabel/disklabel.8 b/sbin/disklabel/disklabel.8
index ab18c6f..c618dc5 100644
--- a/sbin/disklabel/disklabel.8
+++ b/sbin/disklabel/disklabel.8
@@ -86,7 +86,6 @@
.Fl b Ar boot
.Oc
.Ar disk Ar protofile
-.Oo Ar disktype/auto Oc
.Sh DESCRIPTION
The
.Nm
@@ -370,7 +369,6 @@ disklabel that would have been written will be printed to stdout.
.Fl b Ar boot
.Oc
.Ar disk Ar protofile
-.Oo Ar disktype Oc
.Pp
This form corresponds to the
.Dq restore label
@@ -388,38 +386,13 @@ flag. If
is used, no data will be written to the device, and instead the
disklabel that would have been written will be printed to stdout.
.Pp
-The bootstrap code is comprised of two boot programs. Specify the name of the
-boot programs to be installed in one of these ways:
-.Bl -enum
-.It
-Specify the names explicitly with the
-.Fl b
-and
-.Fl s
-flags.
-.Fl b
-indicates the primary boot program and
-.Fl s
-the secondary boot program. The boot programs are located in
-.Pa /boot .
-.It
-If the
+The bootstrap code is comprised of two boot programs, both
+compiled into a single
+.Pa /boot/boot
+image.
+An alternative boot image may be specified with the
.Fl b
-and
-.Fl s
-flags are not specified, but
-.Ar disktype
-was specified, the names of the programs are taken from the
-.Dq b0
-and
-.Dq b1
-parameters of the
-.Xr disktab 5
-entry for the disk if the disktab entry exists and includes those parameters.
-.It
-Otherwise, the default boot image name are used:
-.Pa /boot/boot .
-.El
+option.
.Ss Initializing/Formatting a bootable disk from scratch
.Pp
To initialize a disk from scratch the following sequence is recommended.
@@ -478,10 +451,11 @@ auto
.Fl e
.Ar da0s1
.Sh FILES
-.Bl -tag -width Pa -compact
+.Bl -tag -width ".Pa /etc/disktab" -compact
+.It Pa /boot/boot
+Default boot image.
.It Pa /etc/disktab
-.It Pa /boot/
-.It Pa /boot/boot<n>
+Disk description file.
.El
.Sh SAVED FILE FORMAT
The
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index ecb1705..88604d3 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -256,18 +256,6 @@ main(int argc, char *argv[])
break;
case RESTORE:
- if (installboot && argc == 3) {
- makelabel(argv[2], 0, &lab);
- argc--;
-
- /*
- * We only called makelabel() for its side effect
- * of setting the bootstrap file names. Discard
- * all changes to `lab' so that all values in the
- * final label come from the ASCII label.
- */
- bzero((char *)&lab, sizeof(lab));
- }
if (argc != 2)
usage();
if (!(t = fopen(argv[1], "r")))
@@ -312,9 +300,7 @@ main(int argc, char *argv[])
}
/*
- * Construct a prototype disklabel from /etc/disktab. As a side
- * effect, set the names of the primary and secondary boot files
- * if specified.
+ * Construct a prototype disklabel from /etc/disktab.
*/
void
makelabel(const char *type, const char *name, struct disklabel *lp)
@@ -1522,7 +1508,7 @@ usage(void)
"\t\t(to install boot program with existing on-disk label)",
" disklabel -w -B [-n] [ -b bootprog ] disk type [ packid ]",
"\t\t(to write label and install boot program)",
- " disklabel -R -B [-n] [ -b bootprog ] disk protofile [ type ]",
+ " disklabel -R -B [-n] [ -b bootprog ] disk protofile",
"\t\t(to restore label and install boot program)"
);
exit(1);
OpenPOWER on IntegriCloud