summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-02-27 18:55:40 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-02-27 18:55:40 +0000
commitd246f6f02d038645b430b5acd600999c5757c550 (patch)
tree8cb799056dccdeb472175c623946d00ab964e7a5
parentb76e684c70754c6fd558017034a9f2eac05f4f0d (diff)
Build a small miniroot filesystem which can be dumped on a new disk or an
existing swap partition for an easier initial installation.
-rw-r--r--distrib/luna88k/Makefile4
-rw-r--r--distrib/luna88k/miniroot/Makefile62
-rw-r--r--distrib/notes/luna88k/contents17
-rw-r--r--distrib/notes/luna88k/install32
-rw-r--r--distrib/notes/luna88k/prep3
-rw-r--r--distrib/notes/luna88k/upgrade4
-rw-r--r--etc/etc.luna88k/Makefile.inc3
-rw-r--r--etc/etc.luna88k/disktab8
8 files changed, 112 insertions, 21 deletions
diff --git a/distrib/luna88k/Makefile b/distrib/luna88k/Makefile
index 3c9cba45eea..bd378050e84 100644
--- a/distrib/luna88k/Makefile
+++ b/distrib/luna88k/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.1 2004/04/21 18:40:18 miod Exp $
+# $OpenBSD: Makefile,v 1.2 2014/02/27 18:55:39 miod Exp $
-SUBDIR=ramdisk
+SUBDIR=ramdisk miniroot
.include <bsd.subdir.mk>
diff --git a/distrib/luna88k/miniroot/Makefile b/distrib/luna88k/miniroot/Makefile
new file mode 100644
index 00000000000..99276cea344
--- /dev/null
+++ b/distrib/luna88k/miniroot/Makefile
@@ -0,0 +1,62 @@
+# $OpenBSD: Makefile,v 1.1 2014/02/27 18:55:39 miod Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+
+TARGET=miniroot${REV}.fs
+
+.ifndef DESTDIR
+all ${TARGET}:
+ @echo setenv DESTDIR before creating a miniroot!
+ @false
+.else
+
+all: ${TARGET}
+
+${TARGET}: vn_up install_files showit vn_down
+
+vn_up: blank_filesystem
+ vnconfig vnd0 ${TARGET}
+ disklabel -w vnd0 miniroot
+ newfs -m 0 -f 1024 -b 8192 /dev/rvnd0a
+ mount /dev/vnd0a /mnt
+
+showit:
+ df -ki /mnt
+
+vn_down:
+ -umount /mnt
+ -vnconfig -u vnd0
+
+install_files: bsd.rd boot
+
+bsd.rd:
+ install -c -m 555 -o root -g wheel \
+ ${.OBJDIR}/../../ramdisk/bsd.rd /mnt/bsd
+
+boot:
+ install -c -m 555 -o root -g wheel \
+ ${DESTDIR}/usr/mdec/boot /mnt/boot
+ ln /mnt/boot /mnt/vmunix
+
+blank_filesystem:
+ dd if=/dev/zero of=${TARGET} bs=32k count=128 # 4MB
+
+.endif
+
+unconfig:
+ -umount -f /mnt
+ -vnconfig -u /dev/vnd0a
+
+.ifdef RELEASEDIR
+install:
+ cp ${TARGET} ${RELEASEDIR}
+.endif
+
+clean:
+ rm -f ${TARGET}
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff --git a/distrib/notes/luna88k/contents b/distrib/notes/luna88k/contents
index 9ba100ab8cc..28e5b0acc62 100644
--- a/distrib/notes/luna88k/contents
+++ b/distrib/notes/luna88k/contents
@@ -1,6 +1,12 @@
-dnl $OpenBSD: contents,v 1.12 2013/10/30 22:06:36 miod Exp $
+dnl $OpenBSD: contents,v 1.13 2014/02/27 18:55:39 miod Exp $
TopPart
+OpenBSDminiroot
+ It can be copied to the swap partition of an existing
+ UniOS or OpenBSD installation, or to the beginning of
+ a disk, to allow installing or upgrading to OpenBSD
+ OSREV.
+
OpenBSDdistsets
OpenBSDbsd
@@ -11,11 +17,10 @@ OpenBSDrd
boot The OpenBSD/MACHINE boot block.
-These files can be used to make a bootable tape suitable for installation.
-They can also be used to configure an NFS server to support installation
-over the network. See the section "Getting the OpenBSD system onto Useful
-Media" for more information.
-
+dnl These files can be used to make a bootable tape suitable for installation.
+dnl See the section "Getting the OpenBSD system onto Useful Media" for more
+dnl information.
+dnl
DistributionDescription(ten)
OpenBSDbase(63446514,182505582)
diff --git a/distrib/notes/luna88k/install b/distrib/notes/luna88k/install
index 0f7fdaf20f2..4bff24b65af 100644
--- a/distrib/notes/luna88k/install
+++ b/distrib/notes/luna88k/install
@@ -1,9 +1,11 @@
-dnl $OpenBSD: install,v 1.10 2013/10/30 22:06:36 miod Exp $
+dnl $OpenBSD: install,v 1.11 2014/02/27 18:55:39 miod Exp $
OpenBSDInstallPrelude
There are several ways to install OpenBSD onto a disk. The easiest way
-in terms of preliminary setup is to use the OpenBSD ramdisk kernel, bsd.rd,
-which can be booted from tape, or an existing Mach partition.
+in terms of preliminary setup is to use the OpenBSD miniroot that can be
+booted off your local disk's swap partition. Alternatively, you can
+use the OpenBSD bootblocks and the ramdisk kernel, bsd.rd, copied to an
+existing UniOS partition.
Booting from the Installation Media:
@@ -14,7 +16,7 @@ wipe out all the partitions on the hard disk, errors during the install
process can have unforeseen consequences and will probably leave the system
unbootable if the installation process is not completed. Availability
of the installation media for the prior installation, such as a Luna-88K
-Mach tape, is always a good insurance, should it be necessary to "go back"
+UniOS tape, is always a good insurance, should it be necessary to "go back"
for some reason.
After taking care of all that, the system should be brought down gracefully
@@ -70,7 +72,27 @@ Booting from an existing partition:
Then, boot the installation kernel from the same partition:
- b sd(n,p)bsd.rd
+ boot sd(n,p)bsd.rd
+
+Booting from the miniroot:
+
+ Copy the OpenBSD/MACHINE miniroot to the swap partition (assuming your
+ disk is sd0):
+
+ dd if=miniroot{:--:}OSrev.fs of=/dev/sd0b
+
+ After halting the system, at the PROM prompt, enter
+
+ b sd(n,1)
+
+ to boot the OpenBSD bootloader from the swap partition.
+
+ Once the OpenBSD bootloader starts, press any key to stop the countdown
+ if the ``boot>'' prompt does not appear.
+
+ Then, boot the installation kernel from the same partition:
+
+ boot sd(n,1)
Installing the system:
diff --git a/distrib/notes/luna88k/prep b/distrib/notes/luna88k/prep
index dc8f5a004c0..bacdb9c8ff7 100644
--- a/distrib/notes/luna88k/prep
+++ b/distrib/notes/luna88k/prep
@@ -1,4 +1,4 @@
-dnl $OpenBSD: prep,v 1.5 2013/10/30 22:06:36 miod Exp $
+dnl $OpenBSD: prep,v 1.6 2014/02/27 18:55:39 miod Exp $
dnl Need to provide a short monitor description. Start from
dnl http://www.nk-home.net/~aoyama/luna88k/monitor.txt
dnl and also document NVRAM?
@@ -21,6 +21,7 @@ Setting up the boot device and filename:
``boot_filename'' variable stores the name of the file to boot, and
defaults to ``vmunix''. To boot OpenBSD, this variable should be
changed to ``boot'', as in:
+
0> nvram boot_filename boot
The ``boot_unit'' value is an encoding of the device SCSI identifier.
diff --git a/distrib/notes/luna88k/upgrade b/distrib/notes/luna88k/upgrade
index 65777053f0c..aa748c7d8a9 100644
--- a/distrib/notes/luna88k/upgrade
+++ b/distrib/notes/luna88k/upgrade
@@ -1,4 +1,4 @@
-dnl $OpenBSD: upgrade,v 1.3 2013/10/30 22:06:36 miod Exp $
+dnl $OpenBSD: upgrade,v 1.4 2014/02/27 18:55:39 miod Exp $
dnl Not until tape boot works again
dnl OpenBSDUpgrade({:-an installation tape, or a bsd.rd file on the root file system-:})
-OpenBSDUpgrade({:-bsd.rd on the root file system-:})
+OpenBSDUpgrade({:-bsd.rd, or the miniroot-:})
diff --git a/etc/etc.luna88k/Makefile.inc b/etc/etc.luna88k/Makefile.inc
index f21e96a5fbf..720c62acb4f 100644
--- a/etc/etc.luna88k/Makefile.inc
+++ b/etc/etc.luna88k/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.8 2013/12/01 20:41:25 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2014/02/27 18:55:39 miod Exp $
KERNELS += GENERIC.MP bsd.mp
@@ -6,4 +6,5 @@ bootblocks:
cp ${DESTDIR}/usr/mdec/* ${RELEASEDIR}/
MDEXT= bsd.rd \
+ miniroot${OSrev}.fs \
boot
diff --git a/etc/etc.luna88k/disktab b/etc/etc.luna88k/disktab
index 9fce6bfec2a..3f28666e385 100644
--- a/etc/etc.luna88k/disktab
+++ b/etc/etc.luna88k/disktab
@@ -1,4 +1,4 @@
-# $OpenBSD: disktab,v 1.2 2010/07/02 20:33:54 tedu Exp $
+# $OpenBSD: disktab,v 1.3 2014/02/27 18:55:39 miod Exp $
# XXX - Would like :ba#4096:fa#512: but that panics...
# Leave nc=16; adjust size using: ns
@@ -7,7 +7,7 @@ rdroot|ramdiskroot|RAM-disk root FS image:\
:ta=4.2BSD:oa#0:pa#4096:fa#512:ba#4096\
:ob#0:pb#0:oc#0:pc#4096:
miniroot|Installation root-on-swap FS image:\
- :ty=simulated:se#512:ns#32:nt#8:nc#64:\
- :ta=4.2BSD:oa#0:pa#16384:\
- :ob#0:pb#0:oc#0:pc#16384:
+ :ty=simulated:se#512:ns#32:nt#8:nc#32:\
+ :ta=4.2BSD:oa#0:pa#8192:\
+ :ob#0:pb#0:oc#0:pc#8192: