Create the following script with a text editor and save it as
~/staging/bin/more.sh
#!/bin/sh
#
# more.sh - emulates the basic functions of the "more" binary without
# requiring ncurses or termcap libraries.
#
# Assume input is coming from STDIN unless a valid file is given as
# a command-line argument.
if [ -f $1 ]; then
INPUT="$1"
else
INPUT="/dev/stdin"
fi
#
# Set IFS to newline only. See BASH(1) manpage for details on IFS.
IFS=$'\n'
#
# If terminal dimensions are not already set as shell variables, take
# a guess of 80x25.
if [ "$COLUMNS" = "" ]; then
let COLUMNS=80;
fi
if [ "$LINES" = "" ]; then
let LINES=25;
fi
#
# Initialize line counter variable
let LINE_COUNTER=$LINES
#
# Read the input file one line at a time and display on STDOUT until
# the page fills up. Display "Press <Enter>" message on STDERR and wait
# for keypress from STDERR. Continue until the end of the input file.
# Any input line greater than $COLUMNS characters in length is wrapped
# and counts as multiple lines.
#
while read -n $COLUMNS LINE_BUFFER; do
echo "$LINE_BUFFER"
let LINE_COUNTER=$LINE_COUNTER-1
if [ $LINE_COUNTER -le 1 ]; then
echo "Press <ENTER> for next page or <CTRL>+C to quit.">/dev/stderr
read</dev/stderr
let LINE_COUNTER=$LINES
fi
done<$INPUT
#
# end of more.shCreate a symbolic link for more
bash# ln -s more.sh ~/staging/bin/morebash#ln -s /proc/self/fd ~/staging/dev/fdbash#ln -s fd/0 ~/staging/dev/stdinbash#ln -s fd/1 ~/staging/dev/stdoutbash#ln -s fd/2 ~/staging/dev/stderr bash# mknod -m644 ~/staging/dev/zero c 1 5
Get the latest procps source package from http://procps.sourceforge.net/
bash#cd /usr/src/procps-3.2.3bash#make SHARED=0 CC="gcc -mcpu=i386"bash#cd psbash#cp ps ~/staging/bin
Download GNU's sed from ftp://ftp.gnu.org/gnu/sed/
bash#cd /usr/src/sed-4.1.2bash#export CC="gcc -mcpu=i386"bash#./configure --host=i386-pc-linux-gnubash#makebash#cd sedbash#cp sed ~/staging/bin
The ed package also comes from GNU at ftp://ftp.gnu.org/gnu/ed/
bash#cd /usr/src/ed-0.2bash#./configure --host=i386-pc-linux-gnubash#makebash#cp ed ~/staging/bin
bash#chown 0:0 ~/staging/bin/*bash#chmod -R 755 ~/staging/binbash#chmod 4750 ~/staging/bin/su
bash#cd /bash#dd if=/dev/zero of=/dev/ram7 bs=1k count=4096bash#mke2fs -m0 /dev/ram7 4096bash#mount /dev/ram7 /mntbash#cp -dpR ~/staging/* /mntbash#umount /dev/ram7bash#dd if=/dev/ram7 of=~/phase7-image bs=1kbash#gzip -9 ~/phase7-image