summaryrefslogtreecommitdiffstats
path: root/sbin/disklabel
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-12-17 16:50:10 +0000
committerjkh <jkh@FreeBSD.org>1998-12-17 16:50:10 +0000
commit586eaf95b26fa64e8628fc79ea050f84c7da21e6 (patch)
tree75e2a1bb470454635bee3c3d530dc0c1438aa056 /sbin/disklabel
parentaec28cd70ae23f785e90fd95b938d8029d838d5b (diff)
downloadFreeBSD-src-586eaf95b26fa64e8628fc79ea050f84c7da21e6.zip
FreeBSD-src-586eaf95b26fa64e8628fc79ea050f84c7da21e6.tar.gz
Look for boot blocks in new default location.
Diffstat (limited to 'sbin/disklabel')
-rw-r--r--sbin/disklabel/disklabel.830
-rw-r--r--sbin/disklabel/disklabel.c22
-rw-r--r--sbin/disklabel/pathnames.h2
3 files changed, 18 insertions, 36 deletions
diff --git a/sbin/disklabel/disklabel.8 b/sbin/disklabel/disklabel.8
index 94426b4..9dfca46 100644
--- a/sbin/disklabel/disklabel.8
+++ b/sbin/disklabel/disklabel.8
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94
-.\" $Id: disklabel.8,v 1.8 1998/06/04 06:49:13 charnier Exp $
+.\" $Id: disklabel.8,v 1.9 1998/11/28 09:43:31 rnordier Exp $
.\"
.Dd April 19, 1994
.Dt DISKLABEL 8
@@ -251,25 +251,19 @@ indicates the primary boot program and
the secondary boot program.
If the names are not explicitly given, standard boot programs will be used.
The boot programs are located in
-.Pa /usr/mdec .
+.Pa /boot .
The names of the programs are taken from the ``b0'' and ``b1'' parameters
of the
.Xr disktab 5
entry for the disk if
.Ar disktype
was given and its disktab entry exists and includes those parameters.
-Otherwise, boot program names are derived from the name of the disk.
-These names are of the form
-.Pa basename Ns boot
-for the primary (or only) bootstrap, and
-.Pf boot Pa basename
-for the secondary bootstrap;
-for example,
-.Pa /usr/mdec/daboot
+Otherwise, the default boot image names are used, these being:
+.Pa /boot/boot1
and
-.Pa /usr/mdec/bootda
-if the disk device is
-.Em da0 .
+.Pa /boot/boot2
+for the standard stage1 and stage2 boot images (details may vary
+on architectures like the Alpha, where only a single-stage boot is used).
.Pp
The first of the three boot-installation forms is used to install
bootstrap code without changing the existing label.
@@ -281,8 +275,8 @@ except that they will install bootstrap code in addition to a new label.
.Sh FILES
.Bl -tag -width Pa -compact
.It Pa /etc/disktab
-.It Pa /usr/mdec/ Ns Em xx Ns boot
-.It Pa /usr/mdec/boot Ns Em xx
+.It Pa /boot/
+.It Pa /boot/boot<n>
.El
.Sh EXAMPLES
.Dl disklabel da0
@@ -318,9 +312,9 @@ Existing bootstrap code is unaffected.
.Pp
Install a new bootstrap on da0.
The boot code comes from
-.Pa /usr/mdec/daboot
+.Pa /boot/boot1
and possibly
-.Pa /usr/mdec/bootda .
+.Pa /boot/boot2 .
On-disk and in-core labels are unchanged.
.Pp
.Dl disklabel -w -B /dev/rda0c -b newboot da2212
@@ -329,7 +323,7 @@ Install a new label and bootstrap.
The label is derived from disktab information for ``da2212'' and
installed both in-core and on-disk.
The bootstrap code comes from the file
-.Pa /usr/mdec/newboot .
+.Pa /boot/newboot .
.Sh SEE ALSO
.Xr disklabel 5 ,
.Xr disktab 5
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index bf18a37..ff04e4b 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94";
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
#endif
static const char rcsid[] =
- "$Id: disklabel.c,v 1.22 1998/10/17 09:56:32 bde Exp $";
+ "$Id: disklabel.c,v 1.23 1998/10/23 18:57:39 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -595,25 +595,13 @@ makebootarea(boot, dp, f)
*np++ = '\0';
if (!xxboot) {
- (void)sprintf(np, "%s/%sboot",
- _PATH_BOOTDIR, dkbasename);
- if (access(np, F_OK) < 0 && dkbasename[0] == 'r')
- dkbasename++;
- xxboot = np;
- (void)sprintf(xxboot, "%s/%sboot",
- _PATH_BOOTDIR, dkbasename);
- np += strlen(xxboot) + 1;
+ (void)sprintf(boot0, "%s/boot1", _PATH_BOOTDIR);
+ xxboot = boot0;
}
#if NUMBOOT > 1
if (!bootxx) {
- (void)sprintf(np, "%s/boot%s",
- _PATH_BOOTDIR, dkbasename);
- if (access(np, F_OK) < 0 && dkbasename[0] == 'r')
- dkbasename++;
- bootxx = np;
- (void)sprintf(bootxx, "%s/boot%s",
- _PATH_BOOTDIR, dkbasename);
- np += strlen(bootxx) + 1;
+ (void)sprintf(boot1, "%s/boot2", _PATH_BOOTDIR);
+ bootxx = boot1;
}
#endif
}
diff --git a/sbin/disklabel/pathnames.h b/sbin/disklabel/pathnames.h
index def3297..a24bdef 100644
--- a/sbin/disklabel/pathnames.h
+++ b/sbin/disklabel/pathnames.h
@@ -35,6 +35,6 @@
#include <paths.h>
-#define _PATH_BOOTDIR "/usr/mdec"
+#define _PATH_BOOTDIR "/boot"
#undef _PATH_TMP
#define _PATH_TMP "/tmp/EdDk.aXXXXXX"
OpenPOWER on IntegriCloud