From owner-FreeBSD-users-jp@jp.freebsd.org  Thu Sep  5 13:22:55 1996
Received: by mail.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) id NAA14193
	Thu, 5 Sep 1996 13:22:55 +0900 (JST)
Received: by mail.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) with ESMTP id NAA14185
	for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 5 Sep 1996 13:22:43 +0900 (JST)
Received: from adam.dsp.cl.nec.co.jp by research.gate.nec.co.jp (8.7.5+2.6Wbeta6/950912) with ESMTP id NAA01247; Thu, 5 Sep 1996 13:22:37 +0900 (JST)
Received: from tapir.dsp.cl.nec.co.jp by adam.dsp.cl.nec.co.jp (8.7.5+2.6Wbeta6/CL-960412) with SMTP id NAA27803; Thu, 5 Sep 1996 13:22:36 +0900 (JST)
Message-Id: <199609050422.NAA27803@adam.dsp.cl.nec.co.jp>
To: FreeBSD-users-jp@jp.freebsd.org
In-reply-to: Your message of Thu, 05 Sep 96 10:11:48 +0200.
             <9609050111.AA06546@gotenba.lp.nm.fujitsu.co.jp> 
Date: Thu, 05 Sep 1996 13:22:25 +0900
From: Akihiro Hirano <hirano@dsp.cl.nec.co.jp>
Reply-To: FreeBSD-users-jp@jp.freebsd.org
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: FreeBSD-users-jp 4185
Subject: [FreeBSD-users-jp 4185] Re: Can I use over 540MB-HDD? 
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

$BJ?Ln(B@NEC$B$G$9!#(B

> FreeBSD$B$@$H!"%$%s%9%H!<%k;~$O$h$$$N$G$9$,!"(BHDD$B$rDI2C$9$k$H$-$,$a$s$I$&(B
> $B$J5$$,$7$^$9!#$J$K$+$$$$%D!<%k$O$"$j$^$;$s$+!)(B

$B!!;d$O!"(Bsysinstall$B$r2~B$$7$F;H$C$F$$$^$9!#(BCustom$B%$%s%9%H!<%k$HF1$8$h$&(B
$B$K!"(Bfdisk$B%Q!<%F%#%7%g%s$r@Z$C$F!"(BFreeBSD$B%Q!<%F%#%7%g%s$r:n$C$F!"(Bnewfs
$B$^$G<B9T$G$-$^$9!#(BIBM/PC$BHG(B2.1.0R$B$H(B2.1.5R$BMQ%Q%C%A$rIU$1$F$*$-$^$9!#(B
----
$BF|K\EE5$(B($B3t(B)$B>pJs%a%G%#%"8&5f=j!!J?Ln989((B
E-mail : hirano@dsp.CL.nec.co.jp

========================================================================
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	README
#	patch-2.1.0R
#	patch-2.1.5R
#
echo x - README
sed 's/^X//' >README << 'END-of-README'
X$B%G%#%9%/%U%)!<%^%C%HMQ(Bsysinstall$B%Q%C%A(B
X
X$B!|35MW(B
X$B!!(Bsysinstall$B$G!"%O!<%I%G%#%9%/Ey$N%U%)!<%^%C%H$r$9$k$?$a$N%Q%C(B
X$B%A$G$9!#(Bfdisk, disklabel, newfs$B$HEy2A$J=hM}$r!"%a%K%e!<7A<0(B
X$B$G9T$($^$9!#(Bod$B%Q%C%A$,Ev$F$F$"$k>l9g$O!"(BMO$B$N%U%)!<%^%C%H$b$G(B
X$B$-$k$H;W$$$^$9!#(B
X
X$B!!$J$*!"$3$N%Q%C%A$O!"(Bquick hack$B$G$"$j!"L5J]>Z$G$9!#%G!<%?$,(B
X$B>C$($h$&$H!"EvJ}$O!"G!2?$J$k@UG$$bIi$$$+$M$^$9!#3P8g$7$F!"$*(B
X$B;H$$2<$5$$!#(B
X
X$B!|%3%s%Q%$%k(B
X$B!!(B/usr/src/sys/release/sysinstall$B$G!"%Q%C%A$rEv$F$F2<$5$$!#(B
X$B8e$O!"(Bmake$B$G%3%s%Q%$%k$9$l$P=PMh>e$,$j$G$9!#(B
X
X$B!|;H$$J}(B
X$B!!(BCustom$B"*(BFormat$B$G!"%O!<%I%G%#%9%/$N%U%)!<%^%C%H$,$G$-$^$9!#(B 
XCustom$B"*(BPartition$B$H(BCustom$B"*(BLabel$B$HF1$8%a%K%e!<$r=g<!5/F0$7$F!"(B
X$B%U%)!<%^%C%H$9$k%G%#%9%/$rA*Br$7!"(BFreeBSD$B%Q!<%F%#%7%g%s$rA*(B
X$BBr$7$^$9!#3NG'8e!"%G%#%9%/$N=i4|2=$r9T$$$^$9!#(B
X
X$B!|%P%0(B
X$B!!(BPartition$B%a%K%e!<$G%G%#%9%/$N%Q!<%F%#%7%g%s$rA4$/JQ99$7$F(B
X$B$$$J$$>l9g$O!"(B
X
XYou must partition the disk(s) before this option can be used.
X
X$B$H$$$&%(%i!<$K$J$C$F!"%U%)!<%^%C%H$,$G$-$^$;$s!#$3$l$O!"(B 
Xfdisk$B%Q!<%F%#%7%g%s$rJQ99$;$:$K!"(BFreeBSD$B%Q!<%F%#%7%g%sFb$N$_(B
X$B$rJQ99$7$h$&$H$7$?>l9g$K5/$3$j$^$9!#(B
X
X$B!!(B2.1.0R$BHG$O!"(BLabel$B%(%G%#%?$G$O!"(B/$B$,B8:_$9$k%G%#%9%/$O!"2?$,(B
X$B2?$G$bI=<($5$l$F$7$^$$$^$9!#$&$C$+$jJQ99$7$J$$$h$&$K!"?5=E$K(B
X$B:n6H$7$F2<$5$$!#(B
END-of-README
echo x - patch-2.1.0R
sed 's/^X//' >patch-2.1.0R << 'END-of-patch-2.1.0R'
X--- Makefile.orig	Thu Nov  9 11:31:49 1995
X+++ Makefile	Tue Aug 20 21:13:31 1996
X@@ -9,7 +9,8 @@
X 	ftp_strat.c globals.c index.c install.c installFinal.c \
X 	installPreconfig.c installUpgrade.c label.c lndir.c main.c \
X 	makedevs.c media.c menus.c misc.c msg.c network.c nfs.c options.c \
X-	package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
X+	package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c \
X+	format.c
X 
X CFLAGS+= -Wall -I${.CURDIR}/../libdisk -I${.CURDIR}/../../gnu/lib/libdialog
X 
X--- devices.c.orig	Wed Nov 15 15:57:02 1995
X+++ devices.c	Tue Aug 20 20:19:55 1996
X@@ -89,6 +89,7 @@
X     { DEVICE_TYPE_TAPE, 	"rft0",		"Floppy tape drive (QIC-02)"				},
X     { DEVICE_TYPE_TAPE, 	"rwt0",		"Wangtek tape drive"					},
X     { DEVICE_TYPE_DISK, 	"sd",		"SCSI disk device"					},
X+    { DEVICE_TYPE_DISK, 	"od",		"Optical disk device"					},
X     { DEVICE_TYPE_DISK, 	"wd",		"IDE/ESDI/MFM/ST506 disk device"			},
X     { DEVICE_TYPE_FLOPPY,	"fd0",		"floppy drive unit A"					},
X     { DEVICE_TYPE_FLOPPY,	"fd1",		"floppy drive unit B"					},
X--- /dev/null	Tue Aug 20 02:01:17 1996
X+++ format.c	Tue Aug 20 22:41:48 1996
X@@ -0,0 +1,123 @@
X+/*
X+ * The new sysinstall program.
X+ *
X+ * This is probably the last program in the `sysinstall' line - the next
X+ * generation being essentially a complete rewrite.
X+ *
X+ * $Id: install.c,v 1.71.2.104 1996/07/16 17:34:28 jkh Exp $
X+ *
X+ * Copyright (c) 1995
X+ *	Jordan Hubbard.  All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer,
X+ *    verbatim and that no modifications are made prior to this
X+ *    point in the file.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ *
X+ */
X+/*
X+ * Disk Format Program by Akihiro HIRANO
X+ * hirano@DSP.CL.nec.co.jp
X+ */
X+
X+#include "sysinstall.h"
X+#include <ctype.h>
X+#include <sys/disklabel.h>
X+#include <sys/errno.h>
X+#include <sys/ioctl.h>
X+#include <sys/fcntl.h>
X+#include <sys/wait.h>
X+#include <sys/param.h>
X+#define MSDOSFS
X+#include <sys/mount.h>
X+#undef MSDOSFS
X+#include <sys/stat.h>
X+#include <unistd.h>
X+#include <sys/mount.h>
X+
X+/* Format new disks */
X+int
X+formatDisks(char *str)
X+{
X+    int i;
X+    Device **devs;
X+    Disk *disk;
X+    Chunk *c1, *c2;
X+    char *cp;
X+
X+    if (diskPartitionEditor(str) != RET_SUCCESS)
X+	return RET_FAIL;
X+    if ((cp = variable_get(DISK_SELECTED)) == NULL || strcmp(cp, "yes")) {
X+	msgConfirm("You must select at least one disk.");
X+	return RET_FAIL;
X+    }
X+
X+    if (diskLabelEditor(str) != RET_SUCCESS)
X+	return RET_FAIL;
X+    if ((cp = variable_get(DISK_LABELLED)) == NULL || strcmp(cp, "yes")) {
X+	msgConfirm("You must select at least one disk part.");
X+	return RET_FAIL;
X+    }
X+
X+
X+    /* If we refuse to proceed, bail. */
X+    dialog_clear();
X+    if (msgYesNo("Proceed to format?\n\n"
X+		 "We can take no responsibility for lost disk contents!"))
X+	return RET_FAIL;
X+
X+    /* Write disk partition */
X+    if (diskPartitionWrite(str) != RET_SUCCESS)
X+	return RET_FAIL;
X+
X+    /* Now buzz through the rest of the partitions and mount them too */
X+    devs = deviceFind(NULL, DEVICE_TYPE_DISK);
X+    for (i = 0; devs[i]; i++) {
X+	if (!devs[i]->enabled)
X+	    continue;
X+
X+	disk = (Disk *)devs[i]->private;
X+	if (!disk->chunks) {
X+	    dialog_clear();
X+	    msgConfirm("No chunk list found for %s!", disk->name);
X+	    return RET_FAIL;
X+	}
X+
X+	for (c1 = disk->chunks->part; c1; c1 = c1->next) {
X+	    if (c1->type == freebsd) {
X+		for (c2 = c1->part; c2; c2 = c2->next) {
X+		    if (c2->type == part && c2->subtype != FS_SWAP && c2->private) {
X+			PartInfo *tmp = (PartInfo *)c2->private;
X+
X+			if (tmp->newfs) {
X+			    command_shell_add(tmp->mountpoint, "%s /dev/r%s", tmp->newfs_cmd, c2->name);
X+}			else
X+			    command_shell_add(tmp->mountpoint, "fsck -y /dev/r%s", c2->name);
X+		    }
X+		}
X+	    }
X+	}
X+    }
X+
X+    command_sort();
X+    command_execute();
X+    return RET_SUCCESS;
X+}
X--- menus.c.orig	Thu Nov  9 11:32:01 1995
X+++ menus.c	Tue Aug 20 20:22:31 1996
X@@ -661,6 +661,8 @@
X 	DMENU_CALL,	installCommit, 0, 0			},
X       { "Extract",	"Just do distribution extract step",
X 	DMENU_CALL,	distExtractAll, 0, 0			},
X+      { "Format",	"Format new disks",
X+	DMENU_CALL,	formatDisks, 0, 0			},
X       { "Exit",		"Exit this menu (returning to previous)",
X 	DMENU_CANCEL, NULL, 0, 0 },
X       { NULL } },
X--- sysinstall.h.orig	Thu Nov  9 11:32:03 1995
X+++ sysinstall.h	Tue Aug 20 20:23:29 1996
X@@ -630,5 +630,7 @@
X /* wizard.c */
X extern void	slice_wizard(Disk *d);
X 
X+/* format.c */
X+extern int formatDisks(char *str);
X #endif
X /* _SYSINSTALL_H_INCLUDE */
END-of-patch-2.1.0R
echo x - patch-2.1.5R
sed 's/^X//' >patch-2.1.5R << 'END-of-patch-2.1.5R'
X--- Makefile.dist	Fri Jul 12 05:06:49 1996
X+++ Makefile	Tue Aug 20 19:39:22 1996
X@@ -9,7 +9,7 @@
X 	ftp_strat.c globals.c index.c install.c installUpgrade.c \
X 	label.c lndir.c main.c makedevs.c media.c menus.c misc.c \
X 	msg.c network.c nfs.c options.c package.c samba.c system.c \
X-	tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
X+	tape.c tcpip.c termcap.c ufs.c variable.c wizard.c format.c
X 
X CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog
X 
X--- devices.c.dist	Sat Jul 13 14:10:22 1996
X+++ devices.c	Tue Aug 20 12:06:38 1996
X@@ -67,6 +67,7 @@
X     { DEVICE_TYPE_TAPE, 	"rft0",		"Floppy tape drive (QIC-02)"				},
X     { DEVICE_TYPE_TAPE, 	"rwt0",		"Wangtek tape drive"					},
X     { DEVICE_TYPE_DISK, 	"sd",		"SCSI disk device"					},
X+    { DEVICE_TYPE_DISK, 	"od",		"Optical disk device"					},
X     { DEVICE_TYPE_DISK, 	"wd",		"IDE/ESDI/MFM/ST506 disk device"			},
X     { DEVICE_TYPE_FLOPPY,	"fd0",		"floppy drive unit A"					},
X     { DEVICE_TYPE_FLOPPY,	"fd1",		"floppy drive unit B"					},
X--- /dev/null	Wed Aug 21 09:51:21 1996
X+++ format.c	Wed Aug 21 01:02:20 1996
X@@ -0,0 +1,115 @@
X+/*
X+ * The new sysinstall program.
X+ *
X+ * This is probably the last program in the `sysinstall' line - the next
X+ * generation being essentially a complete rewrite.
X+ *
X+ * $Id: install.c,v 1.71.2.104 1996/07/16 17:34:28 jkh Exp $
X+ *
X+ * Copyright (c) 1995
X+ *	Jordan Hubbard.  All rights reserved.
X+ *
X+ * Redistribution and use in source and binary forms, with or without
X+ * modification, are permitted provided that the following conditions
X+ * are met:
X+ * 1. Redistributions of source code must retain the above copyright
X+ *    notice, this list of conditions and the following disclaimer,
X+ *    verbatim and that no modifications are made prior to this
X+ *    point in the file.
X+ * 2. Redistributions in binary form must reproduce the above copyright
X+ *    notice, this list of conditions and the following disclaimer in the
X+ *    documentation and/or other materials provided with the distribution.
X+ *
X+ * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X+ * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X+ * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X+ * SUCH DAMAGE.
X+ *
X+ */
X+/*
X+ * Disk Format Program by Akihiro HIRANO
X+ * hirano@DSP.CL.nec.co.jp
X+ */
X+
X+#include "sysinstall.h"
X+#include <ctype.h>
X+#include <sys/disklabel.h>
X+#include <sys/errno.h>
X+#include <sys/ioctl.h>
X+#include <sys/fcntl.h>
X+#include <sys/wait.h>
X+#include <sys/param.h>
X+#define MSDOSFS
X+#include <sys/mount.h>
X+#undef MSDOSFS
X+#include <sys/stat.h>
X+#include <unistd.h>
X+#include <sys/mount.h>
X+
X+/* Format new disks */
X+int
X+formatDisks(dialogMenuItem *self)
X+{
X+    int i;
X+    char *str;
X+    Device **devs;
X+    Disk *disk;
X+    Chunk *c1, *c2;
X+
X+    str = variable_get(SYSTEM_STATE);
X+
X+    if (diskPartitionEditor(self) == DITEM_FAILURE)
X+	return DITEM_FAILURE;
X+
X+    if (diskLabelEditor(self) != DITEM_SUCCESS)
X+	return DITEM_FAILURE;
X+
X+    /* If we refuse to proceed, bail. */
X+    dialog_clear();
X+    if (msgYesNo("Proceed to format?\n\n"
X+		 "We can take no responsibility for lost disk contents!"))
X+	return DITEM_FAILURE | DITEM_RESTORE;
X+
X+    /* Write disk partitions */
X+    if (diskPartitionWrite(self) != DITEM_SUCCESS)
X+	return DITEM_FAILURE;
X+
X+    /* Now buzz through the rest of the partitions and mount them too */
X+    devs = deviceFind(NULL, DEVICE_TYPE_DISK);
X+    for (i = 0; devs[i]; i++) {
X+	if (!devs[i]->enabled)
X+	    continue;
X+
X+	disk = (Disk *)devs[i]->private;
X+	if (!disk->chunks) {
X+	    msgConfirm("No chunk list found for %s!", disk->name);
X+	    return DITEM_FAILURE;
X+	}
X+
X+	for (c1 = disk->chunks->part; c1; c1 = c1->next) {
X+	    if (c1->type == freebsd) {
X+		for (c2 = c1->part; c2; c2 = c2->next) {
X+		    if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
X+			PartInfo *tmp = (PartInfo *)c2->private_data;
X+
X+			if (tmp->newfs)
X+			    command_shell_add(tmp->mountpoint, "%s /dev/r%s", tmp->newfs_cmd, c2->name);
X+			else
X+			    command_shell_add(tmp->mountpoint, "fsck -y /dev/r%s", c2->name);
X+		    }
X+		}
X+	    }
X+	}
X+    }
X+
X+    command_sort();
X+    command_execute();
X+    return DITEM_SUCCESS;
X+}
X--- menus.c.dist	Wed Jul 17 02:34:29 1996
X+++ menus.c	Tue Aug 20 19:46:01 1996
X@@ -953,6 +953,7 @@
X   { "5 Media",		"Choose the installation media type",	NULL, dmenuSubmenu, NULL, &MenuMedia },
X   { "6 Commit",		"Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
X   { "7 Extract",	"Just do distribution extract step",	NULL, distExtractAll },
X+  { "8 Format",		"Format new disks",			NULL, formatDisks },
X   { "0 Exit",		"Exit this menu (returning to previous)", NULL, dmenuExit },
X   { NULL } },
X };
X--- sysinstall.h.dist	Wed Jul 17 02:34:32 1996
X+++ sysinstall.h	Tue Aug 20 19:46:13 1996
X@@ -622,5 +622,7 @@
X /* wizard.c */
X extern void	slice_wizard(Disk *d);
X 
X+/* format.c */
X+extern int formatDisks(dialogMenuItem *self);
X #endif
X /* _SYSINSTALL_H_INCLUDE */
END-of-patch-2.1.5R
exit

