# NeXT File System build procedure
# Build Base Floppy disk from booted file system
# Release 2.0
#
## Modified by Mike Carlton to build a single boot floppy
## Please see the README file for more information.
##
## Send comments or suggestions for modifications to carlton@cs.berkeley.edu
## The original source for this file was the initial section of the /etc/BLD.bs
## script.
## Changes:
##	Corrected file specifications that didn't give source directory
##	Added /bin/ed for convenience
## 	Added /fdmach link to /odmach for convenience
##	Modified MAKEDEV to not create so many devices (originally it ran
##		out of inodes on the floppy)
##	Modified newclient to use the new MAKEDEV
##	Removed the symbolic links between the optical and floppy
##	Modified the choice of rc scripts to produce standard boot
##	Removed the bill of materials stuff
## Changes for release 2.1 (3-Sep-91):
##	Removed commands to copy /etc/BLD.fd_to_sd, /etc/rc.bldsd100
## 	and /etc/rc.boot.ldsd100.
## To be done:
## 	This could be further condensed to copy fewer files
#
# Build a bootable floppy disk
# 
newdisk BootFloppy
#
# Build the "private" symlinks
#
symlink	a private/dev					/dev
symlink	a private/etc					/etc
symlink	a private/tmp					/tmp
#
# Put kernels on the disk
#
chmod	a 1777							/
copy	a /odmach						/odmach
strip	a /odmach
link	a /odmach						/sdmach
link	a /odmach						/fdmach
symlink	a $BOOTFILE						/mach
#
# load minimal client template
#
load	a /usr/template/client/dev
load	a /usr/template/client/tmp
chmod	a a+rwxt						/usr/template/client/tmp
load	a /usr/template/client/vm
mkdirs	a /usr/template/client/etc
copy	a /usr/template/client/etc/disktab
copy	a /usr/template/client/etc/fstab.od
copy	a /usr/template/client/etc/fstab.sd330
copy	a /usr/template/client/etc/fstab.sd660
copy	a /usr/template/client/etc/group
copy	a /usr/template/client/etc/passwd
copy	a /usr/template/client/etc/utmp
copy	a /usr/template/client/etc/mtab
symlink	a ../../usr/etc/chown				/usr/template/client/etc/chown
symlink	a ../../usr/etc/fsck				/usr/template/client/etc/fsck
symlink	a ../../usr/etc/halt				/usr/template/client/etc/halt
symlink	a ../../usr/etc/init				/usr/template/client/etc/init
symlink	a ../../usr/etc/mach_init			/usr/template/client/etc/mach_init
symlink	a ../../usr/etc/mkfile				/usr/template/client/etc/mkfile
symlink	a ../../usr/etc/mkfs				/usr/template/client/etc/mkfs
symlink	a ../../usr/etc/mknod				/usr/template/client/etc/mknod
symlink	a ../../usr/etc/mount				/usr/template/client/etc/mount
symlink	a ../../usr/etc/MAKEDEV				/usr/template/client/etc/MAKEDEV
symlink	a ../../usr/etc/newfs				/usr/template/client/etc/newfs
symlink	a ../../usr/etc/scsimodes			/usr/template/client/etc/scsimodes
symlink	a ../../usr/etc/umount				/usr/template/client/etc/umount
#
# Put down enough commands so floppy
# is "bootable" and can load hard disk
#
# /bin commands
#
mkdirs	a /bin
copy	a /bin/awk
copy	a /bin/chgrp
copy	a /bin/chmod
copy	a /bin/cp
copy	a /bin/csh
copy	a /bin/dd
copy	a /bin/df
copy	a /bin/echo
copy	a /bin/ed
copy	a /bin/expr
copy	a /bin/grep
copy	a /bin/hostname
copy	a /bin/ln
copy	a /bin/ls
copy	a /bin/mkdir
copy	a /bin/mkdirs
copy	a /bin/mv
copy	a /bin/rm
copy	a /bin/sed
copy	a /bin/sh
copy	a /bin/sync
copy	a /bin/tar
#
# /usr/bin commands
#
mkdirs	a /usr/bin
copy	a /usr/bin/touch
#
# /usr/etc commands
#
mkdirs	a /usr/etc
copy	a /usr/etc/chown
copy	a /usr/etc/fsck
copy	a /usr/etc/halt
copy	a /usr/etc/init
copy	a /usr/etc/mach_init
copy	a /usr/etc/mkfile
copy	a /usr/etc/mkfs
copy	a /usr/etc/mknod
copy	a /usr/etc/mount
copy	a /usr/etc/newfs
copy	a /usr/etc/scsimodes
copy	a /usr/etc/umount
#
# /usr/ucb commands
#
mkdirs	a /usr/ucb
copy	a /usr/ucb/whoami
#
# /usr/standalone files
#
load	a /usr/standalone
#
# /usr/shlib libraries
#
mkdirs	a /usr/shlib
copy	a /usr/shlib/libsys_s.B.shlib
#
# /usr/template/client additions
#
##copy	a /etc/BLD.fd_to_sd					/usr/template/client/etc/BLD.fd_to_sd	## removed 2.1
copy	a /etc/fstab.fd						/usr/template/client/etc/fstab.fd
##copy	a /etc/rc.bldsd100					/usr/template/client/etc/rc.bldsd100 	## removed 2.1
##copy	a /etc/rc.boot.ldsd100				/usr/template/client/etc/rc.boot.ldsd100	## removed 2.1
copy	a /etc/ttys.installer				/usr/template/client/etc/ttys.installer
copy	a /etc/rc.standard					/usr/template/client/etc/rc.standard
copy	a /etc/rc.boot.standard				/usr/template/client/etc/rc.boot.standard
copy	a /etc/rc.swap						/usr/template/client/etc/rc.swap
copy	a /etc/ttys						/usr/template/client/etc/ttys.standard
#
# /usr/etc additions
#
copy	a /usr/etc/builddisk						/usr/etc/builddisk
strip	a /usr/etc/builddisk
copy	a /usr/etc/disk							/usr/etc/disk
strip	a /usr/etc/disk
copy	a /usr/etc/getdisk						/usr/etc/getdisk
strip	a /usr/etc/getdisk
copy	a /usr/etc/MAKEDEV						/usr/etc/MAKEDEV.tmp
copy	a /usr/etc/newclient						/usr/etc/newclient.tmp
copy	a ./fixmakedev							/usr/etc/fixmakedev
exec 	a /usr/etc csh fixmakedev
rm	a /usr/etc/MAKEDEV.tmp
rm	a /usr/etc/newclient.tmp
rm	a /usr/etc/fixmakedev
copy	a /usr/etc/reboot						/usr/etc/reboot
strip	a /usr/etc/reboot
#
# /usr/bin additions
#
copy	a /usr/etc/fbshow						/usr/bin/fbshow
strip	a /usr/bin/fbshow
#
# /usr/lib/bootimages additions
#
mkdirs	a /usr/lib/bootimages
copy	a /usr/lib/bootimages/Helvetica.18					/usr/lib/bootimages/Helvetica.18
copy	a /usr/lib/bootimages/Helvetica-BoldOblique.18	/usr/lib/bootimages/Helvetica-BoldOblique.18
#
# Build minimal /private -- -P says use small swapfile
#
newclient a /usr/etc -P
#
copy	a /etc/rc.boot.standard				/etc/rc.boot
copy	a /etc/rc.standard				/etc/rc
