Additional cleanup of the picobsd scripts.

Also bump Version to 0.445
This commit is contained in:
Luigi Rizzo 1999-08-23 08:33:08 +00:00
parent 279fdba6f6
commit 0b86462de0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50205
5 changed files with 223 additions and 203 deletions

View File

@ -1 +1 @@
VER=0.44
VER=0.445

View File

@ -1,11 +1,10 @@
# $Id: Makefile,v 1.4 1999/01/14 23:20:09 abial Exp $
# $Id: Makefile.conf,v 1.1 1999/08/22 21:42:29 dwhite Exp $
#
# Makefile for building PICOBSD kernels
SRC?=/usr/src
CONF?=$(SRC)/sys/i386/conf
#CONFFILE=PICOBSD${suffix}.${SIZE}
CONFFILE=PICOBSD${suffix}
COMPILE=$(SRC)/sys/compile/$(CONFFILE)
KERNFILE=$(COMPILE)/kernel
@ -15,7 +14,6 @@ all: $(KERNFILE)
$(KERNFILE): PICOBSD
cat PICOBSD | grep -v "MFS_ROOT" > ${CONF}/${CONFFILE}
echo "options MFS_ROOT" >> ${CONF}/${CONFFILE}
# echo "options MFS_ROOT_SIZE=${SIZE}" >> ${CONF}/${CONFFILE}
(cd ${CONF}; \
config ${CONFFILE}; \
cd ${COMPILE}; \

View File

@ -1,7 +1,7 @@
#!/bin/sh -
#
# $Id: build,v 1.12.2.1 1999/02/22 21:25:15 abial Exp $
# $Id: build,v 1.14 1999/08/22 21:42:30 dwhite Exp $
#
# You can set the SRC variable which points to your source tree. It's
# /usr/src by default (most people shouldn't change it).
@ -15,8 +15,6 @@ SRC=/usr/src
EDITOR=${EDITOR:-vi}
# LANGUAGE language to be used (en or pl)
LANGUAGE=en
# TYPE PicoBSD type (isp, router, net, custom)
TYPE=${1:-dial}
# SITE site-specific files
SITE=
@ -33,11 +31,11 @@ RISU=.build.reply
# abort in case of error...
set -e
# Build kernel with previously set parameters.
. ../Version
# assign default values to variables.
set_defaults() {
TYPE=${TYPE:-dial} # PicoBSD type (isp, router, net, custom, ...
while read name suff sz init mfs_in floppy_in ; do
if [ "$name" != "#" -a $name != "" ] ; then
@ -94,7 +92,7 @@ main() {
(cd ../${TYPE}; make -f ../build/Makefile.conf )
echo ""
./stage1
./stage1 2>&1 | tee stage1.out
if [ "X$?" != "X0" ] ; then
echo ""
echo "-> ERROR in \"${i}\" script. Aborting the build process."
@ -161,16 +159,8 @@ set_type() {
}
#-------------------------------------------------------------------
# Main entry of the script
set_defaults
set_type
# If $1="package", it creates a neat set of floppies
if [ X"$1" = X"package" ] ; then
shift
build_package() {
touch build.status
echo "##############################################" >>build.status
echo "## `date` ">>build.status
@ -195,121 +185,186 @@ if [ X"$1" = X"package" ] ; then
done
done
exit 0
fi
}
# Set build parameters interactively
while [ "X${ans}" != "Xn" ] ; do
main_dialog() {
while [ true ] ; do
set_msgs
dialog --menu "PicoBSD build menu -- ver 0.44 (20aug1999)" 19 70 12 \
1 "${MSG1}" \
a "init type: ${INIT}" \
e "edit kernel config file for ${TYPE}" \
c "edit crunch.conf file for ${TYPE}" \
2 "MFS size: ${SIZE}kB" \
3 "Language: ${LANGUAGE}" \
4 "Site-info: ${SITE}" \
5 "Floppy size: ${FLOPPY_SIZE}kB" \
6 "MFS bytes per inode: ${MFS_INODES}" \
7 "UFS bytes per inode: ${FLOPPY_INODES}" \
n "no change, build it" q "quit" 2> ${RISU}
dialog --menu "PicoBSD build menu -- ver ${VER} (22aug1999)" 19 70 12 \
N "No change, build it" \
T "${MSG1}" \
K "edit Kernel config file for ${TYPE}" \
E "Edit crunch.conf file for ${TYPE}" \
S "MFS Size: ${SIZE}kB" \
L "Language: ${LANGUAGE}" \
I "Init type: ${INIT}" \
F "Floppy size: ${FLOPPY_SIZE}kB" \
M "MFS bytes per inode: ${MFS_INODES}" \
U "UFS bytes per inode: ${FLOPPY_INODES}" \
$ "Site-info: ${SITE}" \
Q "Quit" \
2> ${RISU}
ans=`cat ${RISU}`
rm ${RISU}
case ${ans} in
1)
T)
dialog --menu "Setup the type of configuration" 12 70 5 \
dial "dialin (ppp etc.)" \
router "router/bridge/mrouter" \
net "net admin tool" \
isp "isp (ppp and terminal server)" \
custom "custom config (need pathname)" 2> ${RISU}
if [ $? = 0 ]; then
custom "custom config (need pathname)" 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
TYPE=`cat ${RISU}`
set_type
fi
;;
a)
I)
dialog --menu "Choose your init(8) program" \
10 70 2 init "Standard init (requires getty)" \
oinit "small init from TinyWare" 2> ${RISU}
if [ "$?" = "0" ]; then
oinit "small init from TinyWare" 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
INIT=`cat ${RISU}`
fi
;;
e) ${EDITOR} ../${TYPE}/PICOBSD ;;
c) ${EDITOR} ../${TYPE}/crunch1/crunch.conf ;;
2) dialog --title "MFS Size setup" --inputbox \
K) ${EDITOR} ../${TYPE}/PICOBSD ;;
E) ${EDITOR} ../${TYPE}/crunch1/crunch.conf ;;
S)
dialog --title "MFS Size setup" --inputbox \
"MFS size depends on what you need to put on the MFS image. Typically \
ranges between 800kB (for very small bridge/router images) to \
ranges between 820kB (for very small bridge/router images) to \
as much as 2500kB kB for a densely packed image. \
Keep in mind that this memory is \
totally lost to other programs. Usually you want to keep \
this as small as possible. " 10 70 2> ${RISU}
SIZE=`cat ${RISU}`
if [ "X${SIZE}" = "X" ] ; then
eval SIZE=${TYPE}_DFLT_SIZE
this as small as possible. " 10 70 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
SIZE=`cat ${RISU}`
if [ "${SIZE}" = "" ] ; then
eval SIZE=$"${TYPE}_DFLT_SIZE"
fi
fi
;;
3) dialog --menu "Please choose language" \
10 40 2 en English pl Polish 2> ${RISU}
LANGUAGE=`cat ${RISU}`
L)
dialog --menu "Please choose language" \
10 40 2 en English pl Polish 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
LANGUAGE=`cat ${RISU}`
fi
;;
4) dialog --title "Site info setup" --inputbox \
\$)
dialog --title "Site info setup" --inputbox \
"Please enter the full path to the directory \
containing site-specific setup. \
This directory tree must contain files that replace \
standard ones in floppy.tree/ and mfs.tree/ . " \
10 70 2> ${RISU}
SITE=`cat ${RISU}`
10 70 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
SITE=`cat ${RISU}`
fi
;;
5) dialog --menu "Set floppy size" 15 70 4 \
F)
dialog --menu "Set floppy size" 15 70 4 \
1440 "1.44MB" 1720 "1.72MB" \
2880 "2.88MB" 4096 "4MB" 2> ${RISU}
FLOPPY_SIZE=`cat ${RISU}`
2880 "2.88MB" 4096 "4MB" 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
FLOPPY_SIZE=`cat ${RISU}`
fi
;;
6) dialog --title "MFS bytes per inode:" --inputbox \
M)
dialog --title "MFS bytes per inode:" --inputbox \
"Enter MFS bytes per inode (typically 4096..65536). \
A larger value means fewer inodes but more space on MFS" \
10 70 2> ${RISU}
MFS_INODES=`cat ${RISU}`
10 70 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
MFS_INODES=`cat ${RISU}`
if [ "${MFS_INODES}" = "" ] ; then
eval MFS_INODES=$"${TYPE}_DFLT_MFS_INODES"
fi
fi
;;
7) dialog --title "Floppy bytes per inode:" --inputbox \
U)
dialog --title "Floppy bytes per inode:" --inputbox \
"Enter floppy bytes per inode (typically 3072..65536). \
A larger value means fewer inodes but more space on the floppy." \
10 70 2> ${RISU}
FLOPPY_INODES=`cat ${RISU}`
10 70 2> ${RISU} || rm ${RISU}
if [ -f ${RISU} ] ; then
FLOPPY_INODES=`cat ${RISU}`
if [ "${FLOPPY_INODES}" = "" ] ; then
eval FLOPPY_INODES=$"${TYPE}_DFLT_FLOPPY_INODES"
fi
fi
;;
n) ;;
q) exit 0 ;;
*) echo "Unknown option \"${ans}\". Try again."
N) break 2
;;
Q) exit 0 ;;
*) echo "Unknown option \"${ans}\". Try again."
sleep 2
clear
;;
esac
done
done
}
# Call the build procedure
main
# Install if it's ok.
echo ""
if [ "X$?" = "X0" ] ; then
FILENAME=picobsd.bin
echo "The build process was completed successfuly."
echo ""
echo "Now we are going to install the image on the floppy."
echo "Please insert a blank floppy in /dev/fd0."
echo "WARNING: the contents of the floppy will be permanently erased!"
echo "Your options:"
echo " * ^C to abort,"
echo " * Enter to install \"${FILENAME}\","
echo " * name of other file to install."
echo ""
read -p "Your choice: " junk
if [ "X${junk}" != "X" ] ; then
FILENAME=${junk}
# Install image
do_install() {
dialog --title "Build ${TYPE} completed" --inputbox \
"\nThe build process was completed successfuly.\n\
Now we are going to install the image on the floppy.\n\
Please insert a blank floppy in /dev/fd0.\\n
WARNING: the contents of the floppy will be permanently erased!\n\
\n\
Your options:\n\
* ^C or [Cancel] to abort,\n\
* Enter to install \"${FILENAME}\",\n\
* name of other file to install.\n\
" 20 70 2> ${RISU}
if [ "$?" = "0" ]; then
FILENAME=`cat ${RISU}`
if [ "${FILENAME}" = "" ] ; then
FILENAME=picobsd.bin
fi
echo "Writing ${FILENAME}..."
dd if=${FILENAME} of=/dev/rfd0
else
echo "Ok, the image is in picobsd.bin"
fi
echo "Writing ${FILENAME}..."
dd if=${FILENAME} of=/dev/rfd0
echo "Done."
}
#-------------------------------------------------------------------
# Main entry of the script
interactive="YES"
if [ "$1" = "-n" ] ; then
interactive="NO"
shift
fi
TYPE=$1
set_defaults
set_type
# If $1="package", it creates a neat set of floppies
if [ "$1" = "package" ] ; then
build_package
fi
if [ "$interactive" = "YES" ] ; then
main_dialog
fi
main # build ${TYPE}
do_install
exit 0

View File

@ -1,50 +1,43 @@
#! /bin/sh -
#
# $Id: clean,v 1.7.2.1 1999/02/05 12:15:00 abial Exp $
# $Id: clean,v 1.9 1999/08/22 21:42:30 dwhite Exp $
#
set -e
if [ $# -lt 1 ]
then
echo "What to clean? Possible targets are 'dial', 'net', 'isp', 'router' or 'all'"
exit 1
TARGETS="dial net isp router"
if [ $# -lt 1 ]; then
echo "What to clean? Possible targets are ${TARGETS} or 'all'"
exit 1
fi
if [ "$1" = "all" ]
then
list="dial net isp router"
if [ -f picobsd.bin ]
then
mv -f picobsd.bin picobsd.bin.old
fi
if [ "$1" = "all" ]; then
list=${TARGETS}
old="old"
else
list=$1
if [ -f picobsd.bin ]
then
mv -f picobsd.bin picobsd.bin.$1
fi
list=$1
old=$1
fi
if [ -f picobsd.bin ]; then
mv -f picobsd.bin picobsd.bin.${old}
fi
rm -f kernel kernel.kz fs.PICOBSD *.o *core *.db
rm -f kernel kernel.gz fs.PICOBSD *.o *core *.db \
.build.reply stage1.out build.status
cd ..
rm -rf help/tmp_hlp
echo "===================== $0 tools started ===================="
for i in `ls -d tinyware/[a-z]*` tools/write_mfs_in_kernel
do
for i in `ls -d tinyware/[a-z]*` tools/write_mfs_in_kernel ; do
(cd ${i}; \
if [ -f Makefile ]; \
then \
make clean && make cleandepend;\
if [ -f Makefile ]; then \
make clean && make cleandepend;\
fi)
done
for j in $list
do
for j in $list ; do
echo "===================== $0 $j started ======================"
(cd ${j}/crunch1; \
if [ -f Makefile ]; \
then \
make clean ; \
if [ -f Makefile ]; then \
make clean ; \
fi)
echo "=============== $0 $j completed successfuly =============="
done

View File

@ -1,6 +1,6 @@
#! /bin/sh -
# $Id$
# $Id: stage1,v 1.9 1999/08/22 21:42:32 dwhite Exp $
#
# stage1 -- this script fills the mfs for the picobsd kernel
@ -8,8 +8,9 @@
set -e # abort in case of untested errors
MFS_NAME=fs.PICOBSD
# fail errno errcode
# is the function used to trap errors and print msgs
# This function is used to trap errors and print msgs
#
fail() {
errno=$1
@ -17,14 +18,14 @@ fail() {
echo "--> Error $errno code $errcode"
case $errcode in
no_vnconfig)
echo "Error while doing vnconfig of fs.PICOBSD on /dev/rvn0..."
echo "Error while doing vnconfig of ${MFS_NAME} on /dev/rvn0..."
echo " Most probably your running kernel doesn't have the vn(4) device."
;;
disklabel)
echo "Error while labeling fs.PICOBSD size $SIZE"
echo "Error while labeling ${MFS_NAME} size $SIZE"
;;
no_mount)
echo "Error while mounting fs.PICOBSD (/dev/vn0c) on /mnt"
echo "Error while mounting ${MFS_NAME} (/dev/vn0c) on /mnt"
;;
mtree)
echo "Error while making hierarchy in /mnt"
@ -41,25 +42,33 @@ fail() {
disklabel)
echo "Error while doing disklabel on of floppy.img size $FLOPPY_SIZE"
;;
kernel_compress)
echo "Error while copying compressed kernel to disk"
;;
mfs_compress)
echo "Error while copying compressed mfs image to disk"
;;
missing_kernel)
echo "-> ERROR: you must build PICOBSD${suffix} kernel first"
;;
esac
echo "-> Aborting $0"
exit 10
}
echo "-> Preparing MFS filesystem..."
umount /dev/vn0 2> /dev/null || true
umount /mnt 2> /dev/null || true
vnconfig -u /dev/rvn0 2> /dev/null || true
dd of=fs.PICOBSD if=/dev/zero count=${SIZE} bs=1k 2> /dev/null
dd of=${MFS_NAME} if=/dev/zero count=${SIZE} bs=1k 2> /dev/null
awk 'BEGIN {printf "%c%c", 85, 170}' | \
dd of=fs.PICOBSD obs=1 seek=510 conv=notrunc 2> /dev/null
dd of=${MFS_NAME} obs=1 seek=510 conv=notrunc 2> /dev/null
vnconfig -s labels -c /dev/rvn0 fs.PICOBSD 2>/dev/null || fail $? no_vnconfig
vnconfig -s labels -c /dev/rvn0 ${MFS_NAME} 2>/dev/null || fail $? no_vnconfig
dd if=/boot/boot1 of=fs.PICOBSD conv=notrunc 2> /dev/null
dd if=/boot/boot1 of=${MFS_NAME} conv=notrunc 2> /dev/null
# This command does weird things on 2.2.x systems.
# For small image sizes, use std disktypes
@ -69,7 +78,7 @@ else
disklabel -rw vn0 auto || fail $? disklabel
fi
newfs -i ${MFS_INODES} -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
newfs -i ${MFS_INODES} -m 0 -p 0 -o space /dev/rvn0c
mount /dev/vn0c /mnt || fail $? no_mount
pwd=`pwd`
@ -78,15 +87,12 @@ echo "-> Populating MFS tree..."
cd ../${TYPE}
make -f Makefile.mfs || fail $? mtree
if [ X"${NO_DEVFS}" != X"" ] ; then
make -f Makefile.mfs devnodes || fail $? makedevs
make -f Makefile.mfs devnodes || fail $? makedevs
fi
# MY_ETC contains files which override the global config in DEFAULT_ETC
if [ -f floppy.tree/etc/mfs.rc ] ; then
MFS_RC=floppy.tree/etc/mfs.rc
else
MFS_RC=../floppy.tree/etc/mfs.rc
MFS_RC=floppy.tree/etc/mfs.rc
if [ ! -f ${MFS_RC} ] ; then # no private version. use generic mfs.rc
MFS_RC=../${MFS_RC}
fi
if [ "${INIT}" = "oinit" ] ; then
cat ${MFS_RC} | sed -e "s/@VER@/${VER}/g" > /mnt/etc/oinit.rc
@ -126,37 +132,19 @@ cd ${pwd}
# stage2
#if [ ! -f ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel ]; then
# echo "-> ERROR: you must build PICOBSD${suffix}.${SIZE} first"
# exit 1
#fi
if [ ! -f ${SRC}/sys/compile/PICOBSD${suffix}/kernel ]; then
echo "-> ERROR: you must build PICOBSD${suffix} first"
exit 1
fi
echo "-> Preparing kernel..."
cp -p ${SRC}/sys/compile/PICOBSD${suffix}/kernel kernel
if [ ! -f kernel ]; then
echo "-> ERROR: you must build PICOBSD${suffix} kernel first"
exit 1
fi
cp -p ${SRC}/sys/compile/PICOBSD${suffix}/kernel kernel || \
fail $? missing_kernel
echo "-> Preparing kernel with MFS filesystem inside..."
df -ik /mnt
umount /mnt 2>&1 >/dev/null
umount /mnt
fsck -p /dev/rvn0c
vnconfig -u /dev/rvn0 2>&1 >/dev/null
vnconfig -u /dev/rvn0
#if [ ! -f ../tools/write_mfs_in_kernel/wmik ]; then
# (cd ../tools/write_mfs_in_kernel; make)
#fi
#../tools/write_mfs_in_kernel/wmik kernel fs.PICOBSD
strip kernel
strip --remove-section=.note --remove-section=.comment kernel
gzip -9 -n kernel
#rm fs.PICOBSD
gzip -9 -v -n kernel
#---- stage3
@ -164,77 +152,65 @@ gzip -9 -n kernel
# by default we are in /usr/src/release/build
#
if [ ! -f kernel.gz ]; then
echo "-> ERROR: you must build kernel.gz first"
exit 1
fi
echo "-> Preparing ${FLOPPY_SIZE}kB floppy filesystem..."
umount /dev/vn0 2> /dev/null || true
umount /mnt 2> /dev/null || true
vnconfig -u /dev/rvn0 2> /dev/null || true
dd of=picobsd.bin if=/dev/zero count=${FLOPPY_SIZE} bs=1k 2> /dev/null
dd of=picobsd.bin if=/dev/zero count=${FLOPPY_SIZE} bs=1k
awk 'BEGIN {printf "%c%c", 85, 170}' | \
dd of=picobsd.bin obs=1 seek=510 conv=notrunc 2> /dev/null
#vnconfig -s labels -c /dev/rvn0 picobsd.bin 2>/dev/null
vnconfig -c /dev/rvn0 picobsd.bin 2>/dev/null || fail $? vnconfig2
vnconfig -c /dev/rvn0 picobsd.bin || fail $? vnconfig2
dd if=/boot/boot1 of=picobsd.bin conv=notrunc 2> /dev/null
# XXX todo: right floppy size!
disklabel -Brw -b /boot/boot1 -s /boot/boot2 /dev/rvn0 fd1440 2>&1 >/dev/null || fail $? disklabel
disklabel -Brw -b /boot/boot1 -s /boot/boot2 /dev/rvn0 fd1440 || \
fail $? disklabel
newfs -i ${FLOPPY_INODES} -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
newfs -i ${FLOPPY_INODES} -m 0 -p 0 -o space /dev/rvn0c
mount /dev/vn0c /mnt
echo "-> `pwd`: Populating floppy filesystem..."
echo "-> Populating floppy filesystem..."
# copy floppy tree excluding private files.
(cd ../floppy.tree ; \
tar -cvf - --exclude-from ../${TYPE}/floppy.tree.exclude . ) | \
(cd /mnt ; tar xvf - )
### copy floppy tree excluding private files.
excl=../${TYPE}/floppy.tree.exclude
if [ -f ${excl} ] ; then
excl="--exclude-from ${excl}"
echo "Exclude following files from ${excl}:\n==="
cat ${excl}
echo "===
else
excl=""
fi
(cd ../floppy.tree ; tar -cf - ${excl} . ) | (cd /mnt ; tar xvf - )
# update with private files
if [ -d ../${TYPE}/floppy.tree ] ; then
(cd ../${TYPE}/floppy.tree ; tar cvf - . ) | (cd /mnt ; tar xvf - )
echo "-> update with private files:"
(cd ../${TYPE}/floppy.tree ; tar cf - . ) | (cd /mnt ; tar xvf - )
fi
echo "-> `pwd`: Copying language dependent files..."
for i in hosts motd ; do
files="hosts motd"
echo "-> Copying language dependent files: ${files} -> /mnt/etc ..."
for i in ${files} ; do
cat ../${TYPE}/lang/${i}.${LANGUAGE} | \
sed -e "s/@VER@/${VER}/g" > /mnt/etc/${i}
done
if [ "${TYPE}" = "dial" ] ; then
cp -p /mnt/etc/master.passwd .
pwd_mkdb -d . master.passwd
mv spwd.db /mnt/etc/
rm pwd.db master.passwd
cp -p /mnt/etc/master.passwd .
pwd_mkdb -d . master.passwd
mv spwd.db /mnt/etc/
rm pwd.db master.passwd
fi
if [ "X$?" != "X0" ] ; then
echo "-> ERROR while transferring ../${TYPE}/floppy.tree to /mnt..."
echo "-> Aborting $0"
exit 10
fi
cp kernel.gz /mnt/kernel.gz || fail $? kernel_compress
cp kernel.gz /mnt/kernel.gz
if [ "X$?" != "X0" ] ; then
echo "-> ERROR while transferring kernel.gz to /mnt..."
echo "-> Aborting $0"
exit 10
fi
gzip -9cv fs.PICOBSD > /mnt/fs.PICOBSD.gz
if [ "X$?" != "X0" ] ; then
echo "\-> ERROR transferring MFS to /mnt"
echo "-> Aborting $0"
exit 10
fi
gzip -9cv ${MFS_NAME} > /mnt/${MFS_NAME}.gz || fail $? mfs_compress
mkdir /mnt/boot
mkdir /mnt/boot/defaults
@ -252,20 +228,18 @@ echo "/boot/loader" >/mnt/boot.config
cp ${SRC}/sys/boot/forth/loader.4th /mnt/boot/
cp ${SRC}/sys/boot/forth/support.4th /mnt/boot/
cp ${SRC}/sys/boot/forth/loader.conf /mnt/boot/defaults
echo "userconfig_script_load=\"YES\"">/mnt/boot/loader.conf
echo "rootfs_load=\"YES\"" >>/mnt/boot/loader.conf
echo "rootfs_name=\"fs.PICOBSD\"" >>/mnt/boot/loader.conf
echo "rootfs_type=\"mfs_root\"" >>/mnt/boot/loader.conf
for i in frames screen
do
echo "userconfig_script_load=\"YES\"" >/mnt/boot/loader.conf
echo "rootfs_load=\"YES\"" >>/mnt/boot/loader.conf
echo "rootfs_name=\"${MFS_NAME}\"" >>/mnt/boot/loader.conf
echo "rootfs_type=\"mfs_root\"" >>/mnt/boot/loader.conf
for i in frames screen ; do
cp ${SRC}/share/examples/bootforth/${i}.4th /mnt/boot/
done
cp ../forth/loader.rc /mnt/boot/loader.rc
cp ../forth/menu.4th /mnt/boot/menu.4th
(echo "-> Fixing permissions"; cd /mnt; chown -R root *)
rm kernel.gz
df -ik /mnt
umount /mnt
vnconfig -u /dev/rvn0
rm kernel.gz ${MFS_NAME}