From 4ecd975981b82193aff7c76349980ae82cd60cb4 Mon Sep 17 00:00:00 2001 From: mhitch Date: Fri, 10 Nov 2000 19:06:17 +0000 Subject: [PATCH] Change the disktype of the diskimage to what the kernel is looking for to detect a 'miniroot' disklabel. Booting from the diskimage will now get the real disk geometry and adjust the incore disklabel parameters accordingly. Also revert back to using a prototype file - disklabel truncates the disktype to 15 characters when using the disktab entry, but will use 16 characters when using the prototype file. --- distrib/pmax/instkernel/Makefile | 7 ++++--- distrib/pmax/instkernel/diskimage.label.proto | 14 +++++++------- distrib/pmax/instkernel/disktab.diskimage | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/distrib/pmax/instkernel/Makefile b/distrib/pmax/instkernel/Makefile index dafa2998ec47..ef404f24754e 100644 --- a/distrib/pmax/instkernel/Makefile +++ b/distrib/pmax/instkernel/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2000/06/01 06:54:57 matt Exp $ +# $NetBSD: Makefile,v 1.18 2000/11/10 19:06:17 mhitch Exp $ .include "../../../Makefile.inc" .include @@ -10,7 +10,8 @@ KERNBINDIR= /binary/kernel IMAGE= diskimage IMAGESIZE= 4096 # 512 byte blocks, update disktab.diskimage if changed DISKTAB= ${.CURDIR}/disktab.diskimage -DISKTYPE= miniroot +DISKTYPE= "install diskimag" +LABELPROTO= ${.CURDIR}/diskimage.label.proto NEWFSOPTS?= -c 32 -B le -i 32768 # don't need many inodes! KERN= ${KERNOBJDIR}/RAMDISK/netbsd @@ -42,7 +43,7 @@ netbsd.gz: ${KERN} ${RAMDISK} ${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE} vnconfig ${DISKTYPEARG} -v -c ${VND} ${IMAGE} ${VND_GEOM} - disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE} + disklabel -R -r ${VND} ${LABELPROTO} newfs -B le -m 0 -o space ${NEWFSOPTS} ${VND_RDEV} ${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \ ${DESTDIR}/usr/mdec/bootxx_ffs diff --git a/distrib/pmax/instkernel/diskimage.label.proto b/distrib/pmax/instkernel/diskimage.label.proto index 06e0a5b0f143..f9176bb909e3 100644 --- a/distrib/pmax/instkernel/diskimage.label.proto +++ b/distrib/pmax/instkernel/diskimage.label.proto @@ -4,11 +4,11 @@ disk: install diskimag label: flags: bytes/sector: 512 -sectors/track: 32 -tracks/cylinder: 32 -sectors/cylinder: 1024 -cylinders: 1648 -total sectors: 1312344 +sectors/track: 16 +tracks/cylinder: 2 +sectors/cylinder: 32 +cylinders: 128 +total sectors: 4096 rpm: 3600 interleave: 1 trackskew: 0 @@ -19,6 +19,6 @@ drivedata: 0 3 partitions: # size offset fstype [fsize bsize cpg] - a: 4096 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 82*) - b: 4096 4096 unknown # (Cyl. 82*- 247*) + a: 4096 0 4.2BSD 512 4096 16 # (Cyl. 0 - 82*) + b: 0 0 unknown # (Cyl. 82*- 247*) c: 4096 0 unknown # (Cyl. 0 - 82*) diff --git a/distrib/pmax/instkernel/disktab.diskimage b/distrib/pmax/instkernel/disktab.diskimage index d8e4ebb7f15b..e707b0125f50 100644 --- a/distrib/pmax/instkernel/disktab.diskimage +++ b/distrib/pmax/instkernel/disktab.diskimage @@ -1,4 +1,4 @@ -miniroot:2MB Install Diskimage\ +install diskimag|miniroot|2MB Install Diskimage\ :ty=simulated:se#512:nt#2:ns#16:nc#128:\ :ta=4.4BSD:\ :pa#4096:oa#0:ba#4096:fa#512:\