Deal with vestiges of d_boot[01].

This commit is contained in:
Ruslan Ermilov 2003-02-23 01:48:42 +00:00
parent 522ccf3f35
commit ef9ab0b32b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111286
4 changed files with 24 additions and 104 deletions

View File

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

View File

@ -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);

View File

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

View File

@ -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);