simpleroot: rootfilesystem for installing the pmax and maybe the alpha
authorgraichen <graichen@openbsd.org>
Sat, 3 May 1997 00:35:22 +0000 (00:35 +0000)
committergraichen <graichen@openbsd.org>
Sat, 3 May 1997 00:35:22 +0000 (00:35 +0000)
on those machines you can't boot off the swap partition and thus mini-
root doesn't work - ramdisk doesn't work due to exec format problems
... so the installation will be simply dd'ing a complete rootfilesystem
image onto the disk and install the rest from there - simpleroot is this
complete rootfilesystem image - the name simpleroot comes from niklas -
thanks to him for the idea how to put it here into the distrib tree

distrib/simpleroot/Makefile [new file with mode: 0644]

diff --git a/distrib/simpleroot/Makefile b/distrib/simpleroot/Makefile
new file mode 100644 (file)
index 0000000..6eb6cf9
--- /dev/null
@@ -0,0 +1,67 @@
+# Revision is 2.1
+REV=           21
+
+ARCHDIR=       ${.CURDIR}/../${MACHINE}/simpleroot
+
+.if exists(${ARCHDIR}/Makefile.inc)
+.include "${ARCHDIR}/Makefile.inc"
+.endif
+
+MOUNT_POINT?=  /mnt
+VND?=          vnd0
+VND_DEV=       /dev/${VND}a
+VND_RDEV=      /dev/r${VND}a
+DISKTYPE=      simpleroot
+PID!=          echo $$$$
+REALIMAGE!=    echo /var/tmp/image.${PID}
+IMAGE?=                /var/tmp/simpleroot${REV}.fs
+NEWFSOPTS?=
+
+LIST=          ${ARCHDIR}/list
+
+.ifndef DESTDIR
+all:
+       @echo setenv DESTDIR before makeing a miniroot!
+       @false
+.else
+
+all:
+       dd if=/dev/zero of=${REALIMAGE} count=${IMAGESIZE}
+       vnconfig -v -c ${VND} ${REALIMAGE}
+       disklabel -w -r ${VND} ${DISKTYPE}
+.ifdef BOOT_DISKLABEL
+       disklabel -B ${BOOT_DISKLABEL} ${VND} ${DISKTYPE}
+.endif
+       newfs ${NEWFSOPTS} ${VND_RDEV} ${DISKTYPE}
+       mount ${VND_DEV} ${MOUNT_POINT}
+.ifdef BOOT_INSTALLBOOT
+       /usr/mdec/installboot -v ${MOUNT_POINT} ${BOOT_INSTALLBOOT} ${VND}
+.endif
+       cd ${DESTDIR} && tar cf - `cat ${LIST}` | ( cd ${MOUNT_POINT}; \
+         tar xpf - ) && \
+       ( cd ${MOUNT_POINT} && \
+       tar cf - .??* * | ${GZIP} ${GZIPFLAGS} \
+         > /var/tmp/simpleroot${REV}.tar${GZIPEXT} )
+       @echo ""
+       @df -i ${MOUNT_POINT}
+       @echo ""
+       umount ${MOUNT_POINT}
+       vnconfig -u ${VND_DEV}
+       cat /*bin/* > /dev/null
+       cp ${REALIMAGE} ${IMAGE}
+.if (${GZIP} == "gzip")
+       ${GZIP} ${IMAGE}
+.endif
+       rm ${REALIMAGE}
+
+unconfig:
+       -umount -f ${MOUNT_POINT}
+       -vnconfig -u ${VND_DEV}
+       -/bin/rm -f ${IMAGE}
+
+clean cleandir:
+       /bin/rm -f core ${IMAGE}
+
+.endif # DESTDIR check
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>