From f0f2f5b31c0820430df16d9fad0f02e3490c1981 Mon Sep 17 00:00:00 2001 From: jkh Date: Thu, 12 Jun 1997 08:46:51 +0000 Subject: YAMF22 --- usr.sbin/sade/disks.c | 11 ++++++++--- usr.sbin/sysinstall/disks.c | 11 ++++++++--- usr.sbin/sysinstall/install.cfg | 13 ++++++++----- 3 files changed, 24 insertions(+), 11 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index 036268d..115e578 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.85 1997/05/10 17:11:24 pst Exp $ + * $Id: disks.c,v 1.86 1997/06/05 09:47:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -598,7 +598,8 @@ static void diskPartitionNonInteractive(Device *dev, Disk *d) { char *cp; - int i, sz; + int i, sz, all_disk = 0; + u_char *mbrContents; record_chunks(d); cp = variable_get(VAR_GEOMETRY); @@ -638,7 +639,7 @@ diskPartitionNonInteractive(Device *dev, Disk *d) /* Do really-all-the-disk-space case */ msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name); - All_FreeBSD(d, TRUE); + All_FreeBSD(d, all_disk = TRUE); } else if ((sz = strtol(cp, &cp, 0))) { /* Look for sz bytes free */ @@ -675,6 +676,10 @@ diskPartitionNonInteractive(Device *dev, Disk *d) msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_PARTITION); return; } + if (!all_disk) { + mbrContents = getBootMgr(d->name); + Set_Boot_Mgr(d, mbrContents); + } variable_set2(DISK_PARTITIONED, "yes"); } } diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index 036268d..115e578 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.85 1997/05/10 17:11:24 pst Exp $ + * $Id: disks.c,v 1.86 1997/06/05 09:47:55 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -598,7 +598,8 @@ static void diskPartitionNonInteractive(Device *dev, Disk *d) { char *cp; - int i, sz; + int i, sz, all_disk = 0; + u_char *mbrContents; record_chunks(d); cp = variable_get(VAR_GEOMETRY); @@ -638,7 +639,7 @@ diskPartitionNonInteractive(Device *dev, Disk *d) /* Do really-all-the-disk-space case */ msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name); - All_FreeBSD(d, TRUE); + All_FreeBSD(d, all_disk = TRUE); } else if ((sz = strtol(cp, &cp, 0))) { /* Look for sz bytes free */ @@ -675,6 +676,10 @@ diskPartitionNonInteractive(Device *dev, Disk *d) msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_PARTITION); return; } + if (!all_disk) { + mbrContents = getBootMgr(d->name); + Set_Boot_Mgr(d, mbrContents); + } variable_set2(DISK_PARTITIONED, "yes"); } } diff --git a/usr.sbin/sysinstall/install.cfg b/usr.sbin/sysinstall/install.cfg index 832d403..c5ed7e5 100644 --- a/usr.sbin/sysinstall/install.cfg +++ b/usr.sbin/sysinstall/install.cfg @@ -26,8 +26,11 @@ distSetUser # remaining free space (could also be "all" or "existing" to use all the # disk or an existing FreeBSD slice). disk=wd0 -diskSpace=free -bootManager=booteasy +# Use the whole disk. +partition=exclusive +# Use only the free space. +#partition=free +#bootManager=booteasy diskPartitionEditor # It's bogus that we have to re-enter the label editor for each partition @@ -36,15 +39,15 @@ diskPartitionEditor # partition and mounts it as /dos, which is the case on my laptop. # We can also create a root partition of 20MB in size on the same pass since # it's in a different slice (s2). All sizes are expressed in 512 byte blocks! -wd0s2=partition 40960 / +wd0s1=partition 40960 / diskLabelEditor # Now make a 20MB swap partition in the second slice. -wd0s2=swap 40960 none +wd0s1=swap 40960 none diskLabelEditor # Size of 0 means allocate the rest of the space to /usr -wd0s2=partition 0 /usr +wd0s1=partition 0 /usr diskLabelEditor # OK, everything is set. Do it! -- cgit v1.1