diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-03-24 01:17:51 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-03-24 01:17:51 +0000 |
commit | 271e086322388b87818e1405356f4cd3ef2ada4e (patch) | |
tree | 863f1729a3f6af090328c99fee8833405eb14da9 /distrib/powerpc/ramdisk | |
parent | 9d9784c31019210801cc267708263918ede55fe1 (diff) |
First cut at HFS shared parition capable ramdisk.
Documentation needs to be enhanced to reflect how to use this
properly.
Still one major issue with kernel recognizing new disklabel after
disk is modified with pdisk.
MD label handing in the install.md still needs to be cleaned up.
Diffstat (limited to 'distrib/powerpc/ramdisk')
-rw-r--r-- | distrib/powerpc/ramdisk/install.md | 74 | ||||
-rw-r--r-- | distrib/powerpc/ramdisk/instbin.conf | 10 | ||||
-rw-r--r-- | distrib/powerpc/ramdisk/list | 11 |
3 files changed, 71 insertions, 24 deletions
diff --git a/distrib/powerpc/ramdisk/install.md b/distrib/powerpc/ramdisk/install.md index e383ccb54d3..35153513eb9 100644 --- a/distrib/powerpc/ramdisk/install.md +++ b/distrib/powerpc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2001/03/03 21:23:49 deraadt Exp $ +# $OpenBSD: install.md,v 1.19 2001/03/24 01:17:50 drahn Exp $ # # # Copyright rc) 1996 The NetBSD Foundation, Inc. @@ -108,7 +108,7 @@ md_init_mbr() { echo echo "If you choose to manually setup the MSDOS partition, " echo "consult your PowerPC OpenFirmware manual -and- the" - echo "PowerPC BSD Installation Guide for doing setup this way." + echo "PowerPC OpenBSD Installation Guide for doing setup this way." echo echo -n "Do you want to init the MBR and the MSDOS partition? [y]" getresp "y" @@ -138,18 +138,56 @@ md_init_mbr() { esac } +md_init_hfs() { + pdisk /dev/${1}c +} md_checkfordisklabel() { # $1 is the disk to check local rval echo - echo "Power.4e systems need an MBR and MSDOS partition on the boot disk." - echo "This is necessary because the OpenFirmware doesn't know about" - echo "OpenBSD, or how to boot the system from a BSD partition." - echo - echo "Install will put a boot program with the name 'ofwboot' " - echo "that you will configure OpenFirmware to use when booting OpenBSD." - echo + echo "Apple systems have two methods to label/partition a boot disk." + echo "Either the disk can be partitioned with apple HFS partition" + echo "tools to contain an \"Unused\" partition, or without any any" + echo "macos tools, the disk can be labled using an MBR partition table" + echo "If the HFS (DPME) partition table is used, after the disk is" + echo "partitioned with the apple software, the \"Unused\" section" + echo "must be changed to type \"OpenBSD\" name \"OpenBSD\" using the" + echo "pdisk tool contained on this ramdisk. The disklabel can" + echo "then be edited normally" + echo "WARNING: the MBR partitioning code will HAPPILY overwrite/destroy" + echo "any HFS partitions on the disk, including the partition table." + echo "Choose the MBR option carefully, knowing this fact." + + echo "Do you want to choose (H)FS labeling or (M)BR labeling [H]" + getresp "h" + case "$resp" in + m*|M*) + disklabeltype=MBR + md_checkforMBRdisklabel $1 + rval=$? + ;; + *) + disklabeltype=HFS + md_init_hfs $1;; + rval=$? + ;; + esac + return $rval +} +md_checkforMBRdisklabel() { + + echo "You have chosen to put a MBR disklabel on the disk. + echo -n "Is this correct [n] + getresp "n" + case "$resp" in + n*|N*) + echo "aborting install" + exit 0;; + *) + ;; + esac + echo -n "Have you initialized an MSDOS partition using OpenFirmware? [n]" getresp "n" case "$resp" in @@ -322,11 +360,19 @@ Do not change any parameters except the partition layout and the label name. __md_prep_disklabel_1 echo -n "Press [Enter] to continue " getresp "" - disklabel -W ${_disk} - disklabel ${_disk} >/tmp/label.$$ - disklabel -r -R ${_disk} /tmp/label.$$ - rm -f /tmp/label.$$ - disklabel -f /tmp/fstab.${_disk} -E ${_disk} + if [[ $disklabeltype = "HFS" ]] + then + disklabel -f /tmp/fstab.${_disk} -E ${_disk} + elif [[ $disklabeltype = "MBR" ]] + then + disklabel -W ${_disk} + disklabel ${_disk} >/tmp/label.$$ + disklabel -r -R ${_disk} /tmp/label.$$ + rm -f /tmp/label.$$ + disklabel -f /tmp/fstab.${_disk} -E ${_disk} + else + echo "unknown disk label type" + fi } md_welcome_banner() { diff --git a/distrib/powerpc/ramdisk/instbin.conf b/distrib/powerpc/ramdisk/instbin.conf index 4e855efeca7..ed749864b7f 100644 --- a/distrib/powerpc/ramdisk/instbin.conf +++ b/distrib/powerpc/ramdisk/instbin.conf @@ -1,19 +1,19 @@ -# $OpenBSD: instbin.conf,v 1.1 2000/06/15 02:49:00 rahnds Exp $ +# $OpenBSD: instbin.conf,v 1.2 2001/03/24 01:17:50 drahn Exp $ # # instbin.conf - unified binary for the inst/upgr floppies # srcdirs distrib/special srcdirs usr.bin bin sbin usr.sbin gnu/usr.bin -srcdirs usr.sbin/pppd -progs dd mount_cd9660 df mount mount_ext2fs sync restore newfs_msdos +progs dd mount_cd9660 df dhclient mount mount_ext2fs sync restore newfs_msdos progs stty ln disklabel pax ping cat ifconfig ls -progs less mount_nfs fdisk grep umount mount_msdos rsh fsck +progs less mount_nfs pdisk fdisk grep umount mount_msdos rsh fsck progs scsi chat mknod route ftp mount_ffs reboot ed progs cp gzip chmod fsck_ffs sort init newfs mount_kernfs -progs tip rm mt mkdir pppd sed ksh sleep +progs tip rm mt mkdir sed ksh sleep progs mv expr test hostname +progs mg ln chmod chgrp ln chmod chown diff --git a/distrib/powerpc/ramdisk/list b/distrib/powerpc/ramdisk/list index d0646b2d4de..5d72984e93c 100644 --- a/distrib/powerpc/ramdisk/list +++ b/distrib/powerpc/ramdisk/list @@ -1,8 +1,7 @@ -# $OpenBSD: list,v 1.17 2000/10/13 12:21:17 deraadt Exp $ +# $OpenBSD: list,v 1.18 2001/03/24 01:17:50 drahn Exp $ SRCDIRS distrib/special SRCDIRS usr.bin bin sbin usr.sbin gnu/usr.bin -SRCDIRS usr.sbin/pppd #SRCDIRS usr.bin/vi # copy the crunched binary, link to it, and kill it @@ -29,12 +28,14 @@ LINK instbin bin/stty LINK instbin bin/sync LINK instbin bin/test bin/[ LINK instbin sbin/disklabel +LINK instbin sbin/pdisk LINK instbin sbin/fdisk LINK instbin sbin/fsck LINK instbin sbin/fsck_ffs LINK instbin sbin/reboot sbin/halt LINK instbin sbin/ifconfig LINK instbin sbin/init +LINK instbin sbin/dhclient LINK instbin sbin/mknod LINK instbin sbin/mount LINK instbin sbin/mount_cd9660 @@ -52,6 +53,7 @@ LINK instbin sbin/route LINK instbin sbin/scsi LINK instbin sbin/umount LINK instbin usr/bin/grep usr/bin/fgrep usr/bin/egrep +LINK instbin usr/bin/mg LINK instbin usr/bin/ftp LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat LINK instbin usr/bin/less usr/bin/more @@ -60,7 +62,6 @@ LINK instbin usr/bin/sed LINK instbin usr/bin/sort LINK instbin usr/bin/tip LINK instbin usr/sbin/chat -LINK instbin usr/sbin/pppd #SYMLINK ../../instbin usr/bin/build usr/bin/vi # copy the MAKEDEV script and make some devices @@ -84,8 +85,8 @@ SYMLINK /tmp/fstab.shadow etc/fstab SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf SYMLINK /tmp/hosts etc/hosts - -COPYDIR ${DESTDIR}/etc/ppp etc/ppp +# dhcp things +COPY ${DESTDIR}/sbin/dhclient-script sbin/dhclient-script # and the common installation tools COPY ${TOPDIR}/common/termcap.vt usr/share/misc/termcap |