diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-07-19 01:08:36 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-07-19 01:08:36 +0000 |
commit | 35079cc1e8f038dc53a700df6b690ac8b2552f03 (patch) | |
tree | cfffbec194717d7262a27b85274016e283aec58e /sys/arch/amd64 | |
parent | 880744d74684f8d48bb797c25dc53a6157a83643 (diff) |
Warn about but don't prevent installboot from installing /boot when
the OpenBSD partition starts at >128G. This restores previous
behaviour but adds the warning.
ok deraadt@ guenther@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/stand/installboot/installboot.c | 10 | ||||
-rw-r--r-- | sys/arch/amd64/stand/libsa/biosdev.c | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sys/arch/amd64/stand/installboot/installboot.c b/sys/arch/amd64/stand/installboot/installboot.c index 0434eeed25a..9f38b5386e2 100644 --- a/sys/arch/amd64/stand/installboot/installboot.c +++ b/sys/arch/amd64/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.22 2011/07/05 18:34:10 krw Exp $ */ +/* $OpenBSD: installboot.c,v 1.23 2011/07/19 01:08:34 krw Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -243,13 +243,13 @@ write_bootblocks(int devfd, struct disklabel *dl) errx(1, "no OpenBSD partition"); } - if (start + (protosize / dl->d_secsize) > BOOTBIOS_MAXSEC) - errx(1, "invalid location: all of /boot must be < sector %u.", - BOOTBIOS_MAXSEC); - if (verbose) fprintf(stderr, "/boot will be written at sector %u\n", start); + if (start + (protosize / dl->d_secsize) > BOOTBIOS_MAXSEC) + warnx("/boot extends beyond sector %u. OpenBSD might not boot.", + BOOTBIOS_MAXSEC); + if (!nowrite) { if (lseek(devfd, (off_t)start * dl->d_secsize, SEEK_SET) < 0) err(1, "seek bootstrap"); diff --git a/sys/arch/amd64/stand/libsa/biosdev.c b/sys/arch/amd64/stand/libsa/biosdev.c index d4bdfe2c5c4..a8950c2375e 100644 --- a/sys/arch/amd64/stand/libsa/biosdev.c +++ b/sys/arch/amd64/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.15 2011/03/17 12:53:44 krw Exp $ */ +/* $OpenBSD: biosdev.c,v 1.16 2011/07/19 01:08:35 krw Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -216,10 +216,6 @@ EDD_rw(int rw, int dev, u_int32_t daddr, u_int32_t nblk, void *buf) int rv; volatile static struct EDD_CB cb; - /* Some (most?) BIOSen get confused by i/o above 2 ^ 28 - 1 sector. */ - if ((daddr + nblk) > BOOTBIOS_MAXSEC) - return (1); /* Invalid function/parameter. */ - /* Zero out reserved stuff */ cb.edd_res1 = 0; cb.edd_res2 = 0; |