Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Dec 96 19:08:22 JST
From:      akiyama@kme.mei.co.jp
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/2198: Add installing from optical disk device facility.
Message-ID:  <9612121008.AA01763@kmegate.kme.mei.co.jp>
Resent-Message-ID: <199612121010.CAA03643@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2198
>Category:       misc
>Synopsis:       Add installing from optical disk device facility.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 12 02:10:04 PST 1996
>Last-Modified:
>Originator:     Shunsuke Akiyama
>Organization:
Kyushu Matsushita Electric Co., LTD.
>Release:        FreeBSD 2.2-ALPHA i386
>Environment:

	N/A

>Description:

	I'm Added installing from optical disk drive facility.
	This enables install FreeBSD system from optical disk, which
	formatted as super floppy style or cliced MSDOS-FS and UFS on
	slice.
	I've made boot floppies with this patch and it's works fine
	for me.

>How-To-Repeat:

	N/A

>Fix:
	
===================================================================
--- etc/etc.i386/MAKEDEV	1996/11/01 08:49:13
+++ etc/etc.i386/MAKEDEV	1996/11/16 11:34:53
@@ -175,6 +175,7 @@
 	sh MAKEDEV std						# standard
 	sh MAKEDEV wd0 wd1 wd2 wd3 fd0 fd1 sd0 sd1 sd2 sd3	# bdev, disk
 	sh MAKEDEV cd0 mcd0 scd0 matcd0 wcd0			# bdev, cdrom
+	sh MAKEDEV od0						# bdev, ODD
 	sh MAKEDEV ft0 wt0 st0					# bdev, tape
 	sh MAKEDEV ttyd0 ttyd1 ttyd2 ttyd3			# cdev, serial
 	sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3			# cdev, serial
===================================================================
--- lib/libdisk/create_chunk.c	1996/04/29 05:03:01
+++ lib/libdisk/create_chunk.c	1996/07/22 13:23:26
@@ -257,6 +257,8 @@
 	bmaj = 0, cmaj = 3;
     else if (!strncmp(p, "sd", 2))
 	bmaj = 4, cmaj = 13;
+    else if (!strncmp(p, "od", 2))
+	bmaj = 20, cmaj = 70;
     else {
 	return 0;
     }
===================================================================
--- lib/libdisk/disk.c	1996/04/29 05:03:02
+++ lib/libdisk/disk.c	1996/07/22 13:27:42
@@ -283,7 +283,7 @@
 }
 #endif
 
-static char * device_list[] = {"wd","sd",0};
+static char * device_list[] = {"wd","sd","od",0};
 
 char **
 Disk_Names()
===================================================================
--- release/Makefile	1996/11/12 09:06:05
+++ release/Makefile	1996/11/16 11:50:47
@@ -371,10 +371,10 @@
 		DIR=${RD}/mfsfd/stand ZIP=false
 	( cd ${RD}/trees/bin/dev && \
 		ls console tty ttyv0 ttyv1 ttyv2 ttyv3 null zero \
-		*[sw]d* cuaa[01] cuaa[23] fd[01] rfd[01] \
+		*[swo]d* cuaa[01] cuaa[23] fd[01] rfd[01] \
 		cd0a mcd0a scd0a matcd0a wcd0c rst0 rft0 rwt0 | \
 	cpio -dump ${RD}/mfsfd/dev )
-	( cd ${RD}/mfsfd/dev && rm -f *[sw]d*[bdefgh] )
+	( cd ${RD}/mfsfd/dev && rm -f *[swo]d*[bdefgh] )
 	cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand
 	echo "nameserver      42/tcp name"	> ${RD}/mfsfd/stand/etc/services
 	echo "ftp             21/tcp"		>> ${RD}/mfsfd/stand/etc/services
===================================================================
--- release/sysinstall/config.c	1996/11/09 19:26:17
+++ release/sysinstall/config.c	1996/11/16 12:47:31
@@ -47,6 +47,7 @@
 
 static Chunk *chunk_list[MAX_CHUNKS];
 static int nchunks;
+static int rootdev_is_od;
 
 /* arg to sort */
 static int
@@ -85,6 +86,21 @@
     }
 }
 
+static void
+check_rootdev(Chunk **list, int n)
+{
+	int i;
+	Chunk *c;
+
+	rootdev_is_od = 0;
+	for (i = 0; i < n; i++) {
+		c = *list++;
+		if (c->type == part && (c->flags & CHUNK_IS_ROOT)
+		    && strncmp(c->disk->name, "od", 2) == 0)
+			rootdev_is_od = 1;
+	}
+}
+
 static char *
 name_of(Chunk *c1)
 {
@@ -127,21 +143,33 @@
 fstype_short(Chunk *c1)
 {
     if (c1->type == part) {
-	if (c1->subtype != FS_SWAP)
-	    return "rw";
+	if (c1->subtype != FS_SWAP) {
+	    if (rootdev_is_od == 0 && strncmp(c1->name, "od", 2) == 0)
+		return "rw,noauto";
+	    else
+		return "rw";
+	}
 	else
 	    return "sw";
     }
-    else if (c1->type == fat)
-	return "ro";
+    else if (c1->type == fat) {
+	if (strncmp(c1->name, "od", 2) == 0)
+	    return "ro,noauto";
+	else
+	    return "ro";
+    }
     return "bog";
 }
 
 static int
 seq_num(Chunk *c1)
 {
-    if (c1->type == part && c1->subtype != FS_SWAP)
-	return 1;
+    if (c1->type == part && c1->subtype != FS_SWAP) {
+	if (rootdev_is_od == 0 && strncmp(c1->name, "od", 2) == 0)
+	    return 0;
+	else
+	    return 1;
+    }
     return 0;
 }
 
@@ -198,6 +226,8 @@
 		   "will be required.");
 	return DITEM_FAILURE;
     }
+
+    check_rootdev(chunk_list, nchunks);
 
     /* Go for the burn */
     msgDebug("Generating /etc/fstab file\n");
===================================================================
--- release/sysinstall/devices.c	1996/10/05 11:56:47
+++ release/sysinstall/devices.c	1996/11/24 14:51:34
@@ -68,8 +68,10 @@
     { DEVICE_TYPE_TAPE, 	"rwt0",		"Wangtek tape drive"					},
     { DEVICE_TYPE_DISK, 	"sd",		"SCSI disk device"					},
     { DEVICE_TYPE_DISK, 	"wd",		"IDE/ESDI/MFM/ST506 disk device"			},
+    { DEVICE_TYPE_DISK, 	"od",		"SCSI optical disk device"				},
     { DEVICE_TYPE_FLOPPY,	"fd0",		"floppy drive unit A"					},
     { DEVICE_TYPE_FLOPPY,	"fd1",		"floppy drive unit B"					},
+    { DEVICE_TYPE_FLOPPY,	"od0",		"SCSI optical disk/floppy format"			},
     { DEVICE_TYPE_NETWORK,	"cuaa0",	"%s on serial port 0 (COM1)"				},
     { DEVICE_TYPE_NETWORK,	"cuaa1",	"%s on serial port 1 (COM2)"				},
     { DEVICE_TYPE_NETWORK,	"cuaa2",	"%s on serial port 2 (COM3)"				},
===================================================================
--- sys/i386/conf/GENERIC	1996/10/28 06:05:56	1.77
+++ sys/i386/conf/GENERIC	1996/12/07 12:01:16	1.77.1.3
@@ -62,6 +62,7 @@
 # A single entry for any of these controllers (ncr, ahb, ahc) is sufficient
 # for any number of installed devices.
 controller	ncr0
+options		MAX_LUN=2	#ncr0: for PD drive
 controller	ahb0
 controller	ahc0
 options		"AHC_FORCE_PIO"		# Some motherboards choke on MemI/O,
===================================================================
--- sys/pci/ncr.c	1996/11/09 21:15:54
+++ sys/pci/ncr.c	1996/11/16 12:29:34
@@ -53,7 +53,9 @@
 
 #ifdef	FAILSAFE
 #define	SCSI_NCR_DFLT_TAGS (0)
+#ifndef MAX_LUN
 #define	MAX_LUN		(1)
+#endif	/* MAX_LUN */
 #define	CDROM_ASYNC
 #endif	/* FAILSAFE */
 
===================================================================
--- sys/scsi/cd.c	1996/09/06 23:09:06
+++ sys/scsi/cd.c	1996/10/13 07:27:58
@@ -200,7 +200,7 @@
 	if (sc_link->quirks & CD_Q_NO_TOUCH) {
 		dp->disksize = 0;
 	} else {
-		cd_get_parms(unit, SCSI_NOSLEEP | SCSI_NOMASK);
+		cd_get_parms(unit, SCSI_NOSLEEP | SCSI_NOMASK | SCSI_SILENT);
 	}
 	if (dp->disksize) {
 		printf("cd present [%ld x %ld byte records]",



>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9612121008.AA01763>