summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/label.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-07-13 16:37:03 +0000
committerobrien <obrien@FreeBSD.org>2001-07-13 16:37:03 +0000
commitdc28b4f284f6c821347ed7fac76b3a21414d8e95 (patch)
tree03f00943c9b23099c301476e3b959e1480f476a5 /usr.sbin/sysinstall/label.c
parent15642ccfc39a409defc439fc027618bd8f0d909a (diff)
downloadFreeBSD-src-dc28b4f284f6c821347ed7fac76b3a21414d8e95.zip
FreeBSD-src-dc28b4f284f6c821347ed7fac76b3a21414d8e95.tar.gz
Rudamentary attempt to reconize when `a' is not the first partition on the
Alpha. (the Alpha will not boot except from the first partition) PR: 23064 Submitted by: Kees Jan Koster <kjkoster@kjkoster.org>
Diffstat (limited to 'usr.sbin/sysinstall/label.c')
-rw-r--r--usr.sbin/sysinstall/label.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index a6940e8..465e019 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -965,6 +965,28 @@ diskLabel(Device *dev)
clear_wins();
break;
}
+
+#ifdef __alpha__
+ /*
+ * The boot blocks require that the root partition is at the
+ * begining of the disk and cannot boot otherwise.
+ * Warn Alpha users if they are about to shoot themselves in
+ * the foot in this way.
+ *
+ * Since partitions may not start precisely at offset 0 we
+ * check for a "close to 0" instead. :-(
+ */
+ if ((flags & CHUNK_IS_ROOT) && (tmp->offset > 1024)) {
+ msgConfirm("Your root partition (a) does not seem to be the first\n"
+ "partition. The Alpha can only boot from the first partition,\n"
+ "so it is unlikely that your current disk layout will\n"
+ "be bootable boot after installation.\n"
+ "\n"
+ "Please allocate the root partition before allocating\n"
+ "any others.\n");
+ }
+#endif /* alpha */
+
if (type != PART_SWAP) {
/* This is needed to tell the newfs -u about the size */
tmp->private_data = new_part(p->mountpoint, p->newfs, tmp->size);
@@ -977,7 +999,7 @@ diskLabel(Device *dev)
variable_set2(DISK_LABELLED, "yes", 0);
record_label_chunks(devs, dev);
clear_wins();
- /*** This is where we assign focus to new label so it shows ***/
+ /* This is where we assign focus to new label so it shows. */
{
int i;
label_focus = -1;
OpenPOWER on IntegriCloud