Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on using very small Linux systems to connect to Dos boxes.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/mini.e>
#           or at <http://angg.twu.net/e/mini.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.plin»		(to "plin")
# «.lrp-source»		(to "lrp-source")
# «.potato-plip-docs»	(to "potato-plip-docs")

# «.plip.initrd»	(to "plip.initrd")




#####
#
# allowing nfs export
#
#####

# (find-fline "/etc/hosts.allow")
# (find-fline "/etc/hosts.deny")

man 5 hosts_access
man 5 hosts_options




#####
#
# ne + nfs
#
#####

# (find-esfile "hardware.e" "isa ne2000")

# At angg:
#
cd /boot/angg/
insmod 8390.o
function ne () {
  echo "\nne $1"
  grep ne /proc/modules > /dev/null && rmmod ne
  insmod ne.o io=0x3a0 irq=$1
}
function ne+ () {
  ifconfig eth0 down
  ne $1
  # ifconfig eth0 10.0.1.1 up pointopoint 10.0.1.3
  ifconfig eth0 10.0.1.1 up
  # ifconfig eth0 10.0.1.1 up netmask 255.0.0.0
  ifconfig eth0
  route add 10.0.1.3 dev eth0
  ping -v 10.0.1.3
  ifconfig eth0
}

ne+ 3
ne+ 5
ne+ 6
ne+ 7
ne+ 9
ne+ 10
ne+ 11
ne+ 12
ne+ 14


# Escolha um desses:
ne 3
# ne 5
# ne 6
# ne 7
# ne 9
# ne 10
# ne 11
# ne 12
# ne 14

ifconfig eth0 10.0.1.1 up pointopoint 10.0.1.3
ifconfig
route add 10.0.1.3 dev eth0



# At smil:
#
mkdir /C
mount /dev/hda1 /C
insmod /C/boot/plip.o
ifconfig plip1 10.0.1.2 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev plip1
mkdir /a
mount -t nfs 10.0.1.1:/ /a
ls /a






#####
#
# plip + nfs
# 2001oct17
#
#####

# «plipnfs»

# Standard way: rtfHOWTO!
# (find-htetfile "NFS-HOWTO.txt.gz" "3.4")
# (find-fline "/etc/init.d/netstd_nfs")

#*
# At angg:
# (find-man "5 exports")
# (find-fline "/etc/exports")
cat > /etc/exports <<'---'
# (find-es "mini" "plipnfs")
/	(rw,no_root_squash)
---
# (find-fline "/etc/init.d/" "nfs")
/etc/init.d/nfs-server start
# (find-man "8 pmap_dump")
pmap_dump

#*
cd /C/plin/
echo '#!/bin/sh -v'	> nfs-on
echo 'mount #!/bin/sh -v'	> nfs-on




rpcinfo -p 0.0.0.0

ifconfig plip1 down
rmmod plip

# At angg:
#
insmod /boot/angg/plip.o
ifconfig plip1 10.0.1.1 up pointopoint 10.0.1.2
ifconfig
route add 10.0.1.2 dev plip1

# At tosh:
#
mkdir /C
mount /dev/hda1 /C
insmod /C/boot/plip.o
ifconfig plip1 10.0.1.2 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev plip1
mkdir /a
mount -t nfs 10.0.1.1:/ /a
ls /a

# At tosh (2001):
mkdir /a
insmod /edrx/nfs.o
mount -t nfs 10.0.1.1:/ /a
export EE=/a/home/root/bin/ee.sh
alias ee=". $EE"

cp /a/tmp/nfs-up /C/edrx/nfs-up

#*
mkdir /a/var/tosh/
cd /C/
# cp -diPpvR plin /a/var/tosh/
cp -r plin /a/var/tosh/
#*
cd
umount /L
zcat /var/tosh/plin/plinroot.gz > /tmp/plinroot
mount -o loop /tmp/plinroot /L
# (find-fline "/L/etc/")

#*
mkdir /tmp/plin-edrx
cp -av /L/edrx/* /tmp/plin-edrx/
# (find-fline "/tmp/plin-edrx/0")
#    mount -t msdos /dev/hda1 /C
# -> mount -t msdos /dev/hda1 /mnt/C

#*
chroot /L bin/sh
#*
cat > $EEG <<'---'
star 
chroot /L bin/sh

#*
cd /C/
tar -cvf /a/var/tosh/lacan.tar lacan
#*
cd /lib/
ls -lAF
#*
LD_LIBRARY_PATH=/a/lib:/a/usr/lib /a/bin/tar
#*

# (find-fline "/var/tosh/plin/nfs-up")

mkdir /mnt/a
mount -t nfs 10.0.1.1:/ /mnt/a
cd /mnt/
ln -s a/dev dev
ln -s a/bin bin
ln -s a/etc etc
ln -s a/lib lib
ln -s a/proc proc
ln -s a/sbin sbin
ln -s a/tmp tmp
ln -s a/usr usr
ln -s a/var var

# umount /C
# mkdir /mnt/C
# mount /dev/hda1 /mnt/C

cd /mnt

chroot /mnt bin/ls


cp -v /var/_potato1/rescue.bin /tmp/rescue.bin
cp -v /var/_potato1/rescue.bin /tmp/rescue.bin.orig



#####
#
# Prepare the modified initrd that has the plip scripts
# 2001oct18
#
#####

# «plip.initrd»  (to ".plip.initrd")
#*
cd
umount /L
mount -o loop /var/_potato1/rescue.bin /L
zcat /L/root.bin > /tmp/root.bin.ext2
umount /L
mount -o loop /tmp/root.bin.ext2 /L

cd /L
mkdir mnt/C
mkdir mnt/a
ln -s mnt/C C
ln -s mnt/a a
cd mnt
ln -s a/dev dev
ln -s a/bin bin
ln -s a/etc etc
ln -s a/lib lib
ln -s a/proc proc
ln -s a/sbin sbin
ln -s a/tmp tmp
ln -s a/usr usr
ln -s a/var var

mkdir /L/edrx/
cp -av /tmp/plin-edrx/* /L/edrx/

cat > /L/edrx/0 <<'---'
#!/bin/ash -v
mount -t msdos /dev/hda1 /mnt/C
mount
insmod /edrx/plip.o
ifconfig plip1 10.0.1.4 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev plip1
route
---
chmod 755 /L/edrx/0

cat > /L/edrx/nfs-up <<'---'
#!/bin/sh -v
insmod /edrx/nfs.o
mount -t nfs 10.0.1.1:/ /mnt/a
echo export EE=/a/home/root/bin/ee.sh > /tmp/o
echo 'alias=". $EE"' >> /tmp/o
#
# Now do ". /tmp/o"...
# The alias trick is broken,
# but you can use ". $EE" instead.
---
chmod 755 /L/edrx/nfs-up

#*

# We also need to add some kernel modules: at least plip.o and nfs.o
# (this minimal list is for 2.0.xx; newer kernels may need many
# modules more). I don't have an universal way to do that now...

cd /tmp/plin-edrx/
cp -v plip.o nfs.o /L/edrx/

#*
# Now umount the loop device and compress the filesystem to make an
# initrd. "plinptrt" means "plin potato root", where "plin" is "plip
# linux".

umount /L
gzip -c9 < /tmp/root.bin.ext2 > /tmp/plinptrt.gz

echo "smartdrv /C\nloadlin k20xx root=/dev/ram rw initrd=plinptrt.gz vga=1" \
  | crlf \
  > /tmp/plinpt.bat

#*
cp /a/tmp/plinptrt.gz /C/plin/
cp /a/tmp/plinpt.bat  /C/plin/

#*

chroot /mnt /bin/tar --help
chroot /mnt /bin/tar -cvzf /a/tmp/freud.tgz C/freud
chroot /mnt /usr/bin/du -c /C > /a/var/tosh/Odu
chroot /mnt /bin/tar -cvzf /a/var/tosh/ALL.tgz /C/*

# (find-fline "/var/tosh/")
du -c /C > /a/var/tosh/Odu







# (find-es "debian-chroot")
# (find-es "debian-chroot" "rescue.bin")
# (find-es "debian-chroot" "rescue.bin_scripts")
# (find-es "debian")
# (find-es "potato")





mkdir /a/var/tosh/$PWD


tar -tvzf $S/http/www.tux.org/pub/distributions/tinylinux/tomsrtbt/tomsrtbt-1.7.361.tar.gz





#####
#
# root.bin with plip+nfs
#
#####

gzip -cd /big/deb20/debian/main/disks-i386/2.0.10_1998-07-21/root.bin > image
insmod $MODULES/loop.o
mountloop0L `pwd`/image

cat > /L/sbin/plip+nfs <<'---'
#!/bin/sh
mkdir /C
mount /dev/hda1 /C
insmod /C/boot/plip.o
ifconfig plip1 10.0.1.2 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev plip1
mkdir /a
mount -t nfs 10.0.1.1:/ /a
ls /a
---
chmod 777 /L/sbin/plip+nfs

cat > /L/sbin/ne+nfs <<'---'
#!/bin/sh
mkdir /C
mount /dev/hda1 /C
insmod /C/boot/8390.o
insmod /C/boot/ne.o
ifconfig eth0 10.0.1.3 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev eth0
mkdir /a
mount -t nfs 10.0.1.1:/ /a
ls /a
---
chmod 777 /L/sbin/ne+nfs

cat > /L/sbin/ne+nfs0 <<'---'
#!/bin/sh
mkdir /C
mount /dev/hda1 /C
insmod /C/boot/8390.o
insmod /C/boot/ne.o
ifconfig eth0 10.0.1.3 up netmask 255.255.255.0
ifconfig
sh /C/boot/neup
---
chmod 777 /L/sbin/ne+nfs

umountloop0
gzip -c6 image > root.bin

echo "loadlin.exe linux root=/dev/ram ro initrd=root.bin vga=1\n" > root.bat




#####
#
# dosemu
#
#####

# (find-fline "/usr/doc/dosemu/")
# (find-fline "/usr/lib/dosemu/")
# (find-fline "/usr/doc/dosemu/README.txt.gz" 1383)
# (find-fline "/usr/doc/dosemu/README.txt.gz")
# (find-esfile "dos.e")

umount /dev/loop0
losetup -d /dev/loop0
losetup /dev/loop0 /big/nonfree/dos622-1.cqmi
mount -o ro /dev/loop0 /S

setup-hdimage
# then...






#####
#
# Monkey distribution
#
#####

# 1ª parte: rodar o dosemu pra desarjar a distribuição; na mão.
# 2ª parte: tirar uns pedaços que eu não quero.

cd
umount /dev/hdd2
mkdosfs /dev/hdd2
mount -t msdos /dev/hdd2 /S
tar -xvzf /home/dos/monkey0.tgz -C /S

umount /dev/hdd2
mount -t umsdos /dev/hdd2 /S
rm -Rv /S/usr/X11R6 /S/var/X11R6

umount /dev/hdd2
mount -t umsdos /dev/hdd2 /S


mkdir /S
mount -t umsdos /dev/hdd2 /S
umssync /S
tar -xvzf /root/rootnfs.tgz -C /S

cd
umount /S
mount -t msdos /dev/hdd2 /S
cd /S
zip -9 -r /root/rootnfs.zip .





#####
#
# Lea - null modem
#
#####

/snarf/ftp/ftp.simtel.net/pub/simtelnet/msdos/sysinfo/snoop342.zip
/snarf/ftp/ftp.simtel.net/pub/simtelnet/msdos/sysinfo/stat_com.zip
/snarf/ftp/ftp.simtel.net/pub/simtelnet/msdos/telix/telix351.zip

# (find-fline "/home/root/SIMTEL/disc1/telix/tlx322_1.zip")
# (find-fline "/snarf/ftp/ftp.simtel.net/pub/simtelnet/msdos/telix/telix351.zip")

cd /snarf/ftp/ftp.simtel.net/pub/simtelnet/msdos/sysinfo/
mcopy * a:

snooper
alt-D

Lea: Porta serial externa: com1, 0x03F8, 16450, irq4.
     Mouse: ?

Angg: tty00 at 0x03f8 (irq = 4) is a 16550A
      tty01 at 0x02f8 (irq = 3) is a 16550A
      tty02 at 0x03e8 (irq = 4) is a 16550A
  Como o mouse é ttyS0 e o modem é cua2, a externa deve ser o ttyS1.

setserial -a /dev/ttyS1
setserial /dev/ttyS1 baud_rate 56800
setserial -a /dev/ttyS1

stty -a < /dev/ttyS1
# 8N1:
stty cs8 -parenb -cstopb < /dev/ttyS1
stty -a < /dev/ttyS1


# (find-fline "/usr/doc/setserial")
# (find-fline "/usr/doc/lrzsz")

dpkg -i ~/HASH/lrzsz

# (find-fline "/usr/doc/HOWTO/Busmouse-HOWTO.gz" "Travelmate")





#####
#
# plip + nfs, dec98 notes.
#
#####

# Standard way: rtfHOWTO!
# (find-fline "/usr/doc/HOWTO/NFS-HOWTO.gz" "3.4")
# (find-fline "/etc/init.d/netstd_nfs")
# (find-fline "/etc/exports")
#	/	(rw,no_root_squash)

/etc/init.d/netstd_nfs start
pmap_dump
rpcinfo -p 0.0.0.0

ifconfig plip1 down
rmmod plip

# No angg:
#
insmod /boot/angg/plip.o
ifconfig plip1 10.0.1.1 up pointopoint 10.0.1.2
ifconfig
route add 10.0.1.2 dev plip1

# No tosh:
#
mkdir /C
mount /dev/hda1 /C
insmod /C/boot/plip.o
ifconfig plip1 10.0.1.2 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev plip1
mkdir /a
mount -t nfs 10.0.1.1:/ /a
ls /a

# (find-bffile "utilities/busybox/")
# (find-bffile "utilities/busybox/cp.c")
# (find-fline "/home/eet")

cd /C
/a/bin/tar -cvf - w* | gzip -c6 /a/home/root/TOSH/w.tgz




mountloop0L /big/deb20/debian/main/disks-i386/2.0.10_1998-07-21/drv1440.bin
mkdir /boot/hamm
cd /boot/hamm
tar -xvzf

cd /tmp

mountloop0L /big/deb20/debian/main/disks-i386/2.0.10_1998-07-21/resc1440.bin




# (find-k2file "drivers/net/plip.c" "insmod")
# (find-k2file "drivers/char/lp.c" "0x378")

# O plip no angg tem que o usar o endereço da lp1, que é 0x378. Será
# que ele é esperto? (Sim).

# (find-k2tag "icmp_echo")



# (find-fline "/usr/doc/HOWTO/NFS-HOWTO.gz" " 4.")

insmod /boot/angg/nfs.o
# mount -t nfs -o hard,intr 0.0.0.0:/ /L
# NFS: Error passed unconnected socket and no address
# mount: wrong fs type, bad option, bad superblock on 0.0.0.0:/,
#        or too many mounted file systems
#
# (find-fline "/usr/doc/HOWTO/NFS-HOWTO.gz" "127.0.0.1")
# Moral: não é pra tentar usar NFS com uma máquina só.




#####
#
# netbase/netstd sources
#
#####

pdsc /debian/main/source/net/netbase_3.11-1.dsc
pdsc /debian/main/source/net/netstd_3.07-2.dsc



#####
#
# telnetd
#
#####

pdsc /debian/main/source/net/netstd_3.07-2.dsc
debian/rules |& tee odrb

# (code-c-d "netstd" "/usr/src/netstd-3.07/")
# (code-c-d "telnetd" "/usr/src/netstd-3.07/netkit-telnet-0.10/telnetd/")
# (find-fline "/usr/src/netstd-3.07/netkit-telnet-0.10/telnetd/")
# (find-telnetdfile "")
# (find-netstdfile "odrb")
# (find-netstdfile "odrb" "telnetd")
# (find-node "(binutils)Top")
# (find-node "(ld)Top")
# (find-node "(textutils)Top")

cd /usr/src/netstd-3.07/netkit-telnet-0.10/telnetd/
nm *.o > o
# (find-telnetdfile "o")
gcc -o tudo.o authenc.o global.o logout.o logwtmp.o setproctitle.o	\
	      slc.o state.o sys_term.o telnetd.o termstat.o utility.o

# (find-telnetdfile "defs.h")
# (find-telnetdfile "ext.h")
# (find-telnetdfile "logout.h")
# (find-telnetdfile "logwtmp.h")
# (find-telnetdfile "pathnames.h")
# (find-telnetdfile "setproctitle.h")
# (find-telnetdfile "telnetd.h")

# (find-telnetdfile "authenc.c")
# (find-telnetdfile "global.c")
# (find-telnetdfile "logout.c")
# (find-telnetdfile "logwtmp.c")
# (find-telnetdfile "setproctitle.c")
# (find-telnetdfile "slc.c")
# (find-telnetdfile "state.c")
# (find-telnetdfile "sys_term.c")
# (find-telnetdfile "telnetd.c")
# (find-telnetdfile "termstat.c")
# (find-telnetdfile "utility.c")

# (find-telnetdfile "Makefile")
# (find-telnetdfile "issue.net.5")
# (find-telnetdfile "login.3")
# (find-telnetdfile "telnetd.8")

man issue.net
man login
man telnetd

#if	defined(ENCRYPT) || defined(AUTHENTICATE)
#if	defined(SecurID)






# (find-fline "/usr/doc/HOWTO/NET-3-HOWTO.gz")
# (find-fline "/usr/doc/HOWTO/NET-3-HOWTO.gz" "NFS and other Sun RPC")

# (find-fline "/usr/doc/HOWTO/NFS-HOWTO.gz")
# (find-fline "/etc/init.d/")
# (find-fline "/etc/init.d/netstd_nfs")

/etc/init.d/netstd_nfs stop
/etc/init.d/netstd_nfs start

strace -f -o s \
  mount -t nfs 0.0.0.0:/ /S
# "mount: RPC: Program not registered"

strace -f -o s2 -p $(pidof inetd) &
mount -t nfs 0.0.0.0:/ /S
sleep 1
jobs
kill -s HUP %2



rpc error

rpcinfo -p
portmap

# (find-fline "/usr/man/man8/rpc.nfsd.8.gz" "nfs/2")

# (find-fline "/etc/inetd.conf")
nfs/2 dgram  rpc/udp wait root /usr/sbin/rpc.nfsd rpc.nfsd
nfs/2 stream rpc/tcp wait root /usr/sbin/rpc.nfsd rpc.nfsd

A=(
info/mount.list
info/sysvinit.list
info/sysvinit.postinst
info/sysvinit.conffiles
info/netbase.postinst
info/kernel-headers-2.0.32.list
info/libc6-dev.list
info/manpages-dev.list
info/netstd.postinst
info/netstd.list
info/netstd.preinst
info/netstd.prerm
info/netstd.postrm
info/netstd.conffiles
info/doc-linux-text.list
methods/disk/shvar.harddisk
)
mycat $A





#####
#
# PLIP: low level tests
#
#####

# (find-k2file "drivers/net/plip.c" "insmod")
# (find-k2file "drivers/char/lp.c" "0x378")
# (find-k2file "drivers/char/lp_intern.c")
# (find-k2file "drivers/net/plip.c" "insmod")

# (find-k2tag "LPGETIRQ")
man 4 lp
 0x0606

# (find-pl5pod "func" "=item ioctl")
# (find-pl5pod "func" "=item pack")
# (find-pl5pod "func" "=item unpack")

perl -e '
  use Data::Dumper;
  print Dumper(open(F, "/dev/lp1"));
  $irq = "abcd";
  print Dumper(ioctl(F, 0x0606, $irq));
  print Dumper(unpack("i", $irq));
'

insmod $MODULES/plip.o io=0x3bc irq=7

insmod $MODULES/lp.o
chardev 6 lp  no irq  0378-037f : lp




#####
#
# PLIP on a root.bin
#
#####

ifconfig plip1 10.0.1.1 up pointopoint 10.0.1.2
ifconfig

# (find-esfile "debian0.e" "root.bin")

umount /dev/loop0
losetup -d /dev/loop0

insmod $MODULES/loop.o
mkdir /L
gzip -cd /big/deb20/debian/main/disks-i386/2.0.10_1998-07-21/root.bin \
  > /home/rootdisk
losetup /dev/loop0 /home/rootdisk
mount /dev/loop0 /L

man exports
man rpc.nfsd

agrep nfsd $HAI/../../Contents
dpkg -L netstd
ldd /usr/sbin/rpc.nfsd
pdsc /debian/main/source/net/netstd_3.07-2.dsc

cd /usr/src/netstd-3.07/
debian/rules binary |& tee odrb

A=(
/lib/ld-2.0.7.so
/lib/libc-2.0.7.so
/lib/libcrypt-2.0.7.so
/lib/libnsl-2.0.7.so

/lib/ld-linux.so.2
/lib/libc.so.6
/lib/libcrypt.so.1
/lib/libnsl.so.1
/usr/sbin/rpc.nfsd

/bin/setserial
/usr/bin/rz
/usr/bin/sz

/sbin/ifconfig
)
du -c $A

dpkg -L lrzsz




#####
#
# rz/sz on a root.bin
#
#####

# (find-esfile "debian0.e" "root.bin")





#####
#
# root.bin with nfsd
#
#####

umount /d2/proc
umount /dev/hdd2
# mke2fs -c /dev/hdd2
mke2fs /dev/hdd2

mount /d2
rm -Rv /d2
tar -C /d2 -xvzf /root/rootdisk.tgz

A=(
/bin/setserial
/lib/libc-2.0.7.so
/lib/libcrypt-2.0.7.so
/lib/libcrypt.so.1
/lib/libnsl-2.0.7.so
/lib/libnsl.so.1
/usr/bin/rz
/usr/bin/strace
/usr/bin/sz
/usr/sbin/rpc.nfsd
/etc/nsswitch.conf
)
for i in $A; do cp -diPv $i /d2; done
# /lib/libnss*

A=(
/lib/ld-2.0.7.so
/lib/ld-linux.so.2
/lib/libc.so.6
/sbin/ifconfig
)
for i in $A; do laf $i /d2/$i; done
for i in $A; do rm /d2$i; cp -diPv $i /d2; done

echo '/ *(rw,no_root_squash)' > /d2/etc/exports

cd /d2
tar -cvzf /root/rootnfs.tgz *

# mount -t proc proc2 /d2/proc
# cd /d2
# chroot /d2 bin/sh

# (find-node "(libc)NSS Basics")
# (find-fline "/etc/nsswitch.conf")

cd
umount /dev/hdd2
mkdosfs /dev/hdd2
mkdir /S
mount -t umsdos /dev/hdd2 /S
umssync /S
tar -xvzf /root/rootnfs.tgz -C /S

cd
umount /S
mount -t msdos /dev/hdd2 /S
cd /S
zip -9 -r /root/rootnfs.zip .

A=(
/bin/setserial
/usr/bin/rz
/usr/bin/sz
)
for i in $A; do cp $i /L/$i -v; done




# Depende de: libreadlineg2-dev g++ libstdc++2.8-dev

# Tirar uns lixos (até talvez os instaladores), colocar nfsd, inetd
# (?), ifconfig, ping, e talvez route. Reempacotar esse disco, pôr em
# disquete num arquivo, fazer um script de loadlin que leia o kernel
# que já está no hd com vga=1 e root=a:myroot.bin. Antes de rodar tudo
# isso ver se os programas novos ficam felizes com as libs que já
# estão no disco, usando um chroot. É preciso montar uma cópia do proc
# no /L. Ver se eu posso pôr também um telnetd. Os programas que eu
# vou copiar pra esse disco têm que ir stripados.




#####
#
# boot-floppies source
#
#####

# (find-enode "Version Control")
# (find-efile "vc.el")
# (find-efile "vc-hooks.el")

pdsc /debian/main/source/admin/boot-floppies_2.0.11.dsc
cd /usr/src/boot-floppies-2.0.11/
rm -Rv CVS
chmod 666 Makefile

# (set-file-modes (bfsrcfile "Makefile") 438)
# (find-bfsrcfile "Makefile")

dpkg -iE libc6-pic newt0.21-dev popt slang0.99.38-dev slang0.99.38-pic sysutils
dpkg -iE boot-floppies






#####
#
# Lea, telix + minicom
#
#####

dir /a/f/s > odirafs
pz -Pro -Jhrs

tr -d \\r < odirafs > odirafs.u

del /f/s/y \freud\dos
# (find-fline "~/LEA/odirafs.u")

pz -Pro -Jhrs x.zip 4dos\*.* 4dosold\*.* edrx\*.* lotus2\*.* mu\*.*




#####
#
# boot-floppies
#
#####

insmod /boot/angg/loop.o

rm -Rv /usr/src/boot-floppies
dpkg -i ~/HASH/boot-floppies
cd /usr/src/boot-floppies/

(cd documentation
 cat install.sgml > install.txt
)

make archive=/big/deb20/debian/main/binary-i386		\
     incoming=/home/incoming		|& tee om

# (find-bffile "Makefile")


# (find-fline "/snarf/ftp/ftp.pathname.com/pub/fhs-2.0.tar.gz")

rm -Rv /usr/src/fhs/
cd /usr/src/
tar -xvzf /snarf/ftp/ftp.pathname.com/pub/fhs-2.0.tar.gz
cd /usr/src/fhs/





#####
#
# kernel NFS server
#
#####

# (find-k21file "scripts/kconfig.tk" "NFS server support")
# (find-k21file "Documentation/Configure.help" "CONFIG_NFSD")
# (find-k21file "fs/nfsd/")

# (find-fline "/snarf/ftp/ftp.mathematik.th-darmstadt.de/pub/linux/okir/nfs-server-2.2beta37.tar.gz")

rm -Rv /usr/src/nfs-server-2.2beta37/
cd /usr/src/
tar -xvzf /snarf/ftp/ftp.mathematik.th-darmstadt.de/pub/linux/okir/nfs-server-2.2beta37.tar.gz
cd /usr/src/nfs-server-2.2beta37/

# (code-c-d "nfss" "/usr/src/nfs-server-2.2beta37/")
# (find-nfssfile "")





#####
#
# TinyLinux CD
#
#####

# (find-fline "~/CB/stp-ls-lR.i" "idiot")
# (find-k2file "Documentation/initrd.txt")
# (find-k2file "drivers/block/rd.c")
# (find-k2file "fs/minix/")
# (find-fline "/cdrom/TinyLinux/")
# (find-fline "/cdrom/TinyLinux/LRP/dists/stable/kernel/kernel-36pre2-1.tar.gz")

insmod $MODULES/loop.o
# mountloop0L /cdrom/TinyLinux/LRP/dists/stable/idiot.image-2.9.3-1.44MB
mountloop0L  /debian/TinyLinux/LRP/dists/stable/idiot.image-2.9.3-1.44MB
tar -tvzf /L/root.lrp
tar -tvzf /L/etc.lrp
tar -tvzf /L/log.lrp
tar -tvzf /L/modules.lrp

# (find-fline "/cdrom/TinyLinux/LRP/dists/stable/")
# (find-fline "/L/")

# Writing to a floppy (and testing)
#
cat /cdrom/TinyLinux/LRP/dists/stable/idiot.image-2.9.3-1.44MB > /dev/fd0
mount /dev/fd0 /A
diff -qrs /L /A



# (find-fline "/L/syslinux.cfg")
#
# display syslinux.dpy
# timeout 0
# default linux
# append=load_ramdisk=1 initrd=root.lrp initrd_archive=minix ramdisk_size=4096 root=/dev/ram0 boot=/dev/fd0,msdos LRP=etc,log,modules


umountloop0
umount /cdrom


# (find-fline "/usr/doc/syslinux/")
# (find-fline "/usr/doc/loadlin/")
# (find-fline "/usr/doc/loadlin/quicksta.rt.gz")

loadlin 

# (find-k2file "Documentation/")
# (find-k2file "Documentation/ramdisk.txt")
# (find-k2file "Documentation/initrd.txt")
# (find-k2file "drivers/block/rd.c")





######
#
# LRP on the net
# 2000jul03
#
######

# (code-c-d "ftplrp" "$S/ftp/ftp.linuxrouter.org/linux-router/")
# (find-ftplrpfile "dists/2.9.6/")
# (find-ftplrpfile "dists/2.9.6/packages/")

#*

umount /L
cd $S/ftp/ftp.linuxrouter.org/linux-router/dists/2.9.6/
mount -t msdos -o loop idiot-image_1440KB_2.9.6 /L

rm -Rv /tmp/lrp/
mkdir  /tmp/lrp/
cp -v /L/* /tmp/lrp/

cd /tmp/lrp/
for i in *.lrp; do cp -v $i $(basename $i .lrp).tgz; done
# (find-fline "/tmp/lrp/")

rm -Rv /tmp/lrproot/
mkdir  /tmp/lrproot/
cd     /tmp/lrproot/
tar -xvzf /tmp/lrp/root.lrp
# (find-fline "/tmp/lrproot/")

#*

unsetall chroot /tmp/lrproot bin/login
unsetall chroot /tmp/lrproot sbin/init S

# How do I start it?




#####
#
# LRP (the Linux Router Project)
# 2000dec25
#
#####

# «lrp-source»  (to ".lrp-source")
# Copy from the TinyLinux/Stampede CD (ed. 3):
# (find-fline "/cdrom/")
# (find-fline "/cdrom/TinyLinux/LRP/dists/stable/source/")

rm -Rv /tmp/TinyLinux/
cd /cdrom/
cp -diPpvR TinyLinux/LRP/dists/stable/source/ /tmp/

# (find-fline "/tmp/TinyLinux/LRP/dists/stable/source/")

rm -Rv /usr/src/router-source/
cd /usr/src/
tar -xvzf /tmp/TinyLinux/LRP/dists/stable/source/2.9.3-sourcesnapshot.tar.gz
cd /usr/src/router-source/

# Hm, no building instructions?...





#####
#
# initrd-archive
#
#####

psne ftp://ftp.psychosis.com/linux/initrd-arch/
psne ftp://ftp.psychosis.com/linux/initrd-arch/README
psne ftp://ftp.psychosis.com/linux/initrd-arch/linuxrc-always_2-2.0-diff.gz
psne ftp://ftp.psychosis.com/linux/initrd-arch/initrd-archive_2.1_2.0.37pre8.diff.gz

# (find-fline "$S/ftp/ftp.psychosis.com/linux/initrd-arch/")





#####
#
# plin: plip Linux
# 00jan31
#
#####

# «plin»  (to ".plin")

# This is a modified Slink rescue floppy that can be used to connect
# tosh, a 486 laptop (ip 10.0.1.4), to angg (ip 10.0.1.1) using plip.

# Note that this only works because tosh's kernel is configured for
# 486, without APM, and with minix, fat, msdos, ramdisk, initrd, lp,
# plip, maybe loop... what more? Where can I find the full list? On
# Tom Fawcett's bootdisk howto?

# (find-k2file ".config")
# (find-es "hw-parport" "plip_from_angg")



# (find-es "slink" "rescue_floppy_files")
# (find-fline "/big/slinkb1/dists/slink/main/disks-i386/current/")

mountloop0L /big/slinkb1/dists/slink/main/disks-i386/current/resc1440.bin
rm -Rv /tmp/resc1440/
mkdir /tmp/resc1440/
cd /L
cp -dipvR * /tmp/resc1440/
cd /tmp/resc1440/
laf

cd /tmp/resc1440/
zcat < root.bin > rootbin
mountloop0L /tmp/resc1440/rootbin
mkdir /L/edrx/
mkdir /L/A /L/C /L/nfs

cd /boot/angg/
cp -iv plip.o lp.o nfs.o /L/edrx/
cp -iv k2038 /tmp/resc1440/k20xx


# My scripts

# (find-angg ".zshrc" "heredoc")
# (find-fline "$ES/mini.e" "At smil:")

heredoc /L/edrx/0 -m 777 <<'---'
#!/bin/ash -v
mount -t msdos /dev/hda1 /C
mount
insmod /edrx/plip.o
ifconfig plip1 10.0.1.4 up pointopoint 10.0.1.1
ifconfig
route add 10.0.1.1 dev plip1
route
---

umountloop0
cd /tmp/resc1440/
gzip -c6 rootbin > plinroot.gz
laf
rm -v root.bin rootbin



## loadlin
##

# (find-vldifile "loadlin.list")
# (find-fline "/usr/doc/loadlin/")
# (find-fline "/usr/doc/loadlin/quicksta.rt.gz" "/dev/ram")
# (find-fline "/tmp/resc1440/")
crlf > /tmp/resc1440/plin.bat <<'---'
smartdrv /C
loadlin k20xx root=/dev/ram rw initrd=plinroot.gz vga=1
---
gzip -cd /usr/lib/loadlin/loadlin.exe.gz > /tmp/resc1440/loadlin.exe


## syslinux
##

cd /tmp/resc1440/
rm -v debian.txt f1.txt f10.txt f2.txt f3.txt f4.txt f5.txt f9.txt
rm -v readme.txt type.txt
rm -v rdev.sh install.sh
rm -v ldlinux.sys syslinux.cfg linux

# (find-es "floppy" "syslinux")
#
crlf > bootmsg.txt <<'---'
Plip Linux boot disk, using kernel 2.0.38.
Choose from: plin
Default is plin.
---
crlf > syslinux.cfg <<'---'
display bootmsg.txt
timeout 50
prompt 1
default plin
label plin
  kernel k20xx
  append root=/dev/ram rw initrd=plinroot.gz vga=1
---

cd /tmp/resc1440/
mcopy -ov * a:
syslinux /dev/fd0



# How to use: boot tosh with this floppy, or copy all files from the
# floppy to some tosh directory, then boot DOS, chdir to the directory
# and run plin.bat; you'll enter the Debian install program. Switch to
# vt 2 and enter the ash shell available from there; switch to /edrx
# and run "./0", and you're done on tosh. On angg, run the e-script
# referred below, to set up plip and ping tosh. On 00feb16 it worked.

# (find-es "hw-parport" "plip_from_angg")

# Next plans: use boa to serve tosh's files; mount angg on tosh using
# nfs; define an "eevtosh" in my .emacs; discover how to send
# compressed directories from tosh using star/gzip/busybox.





#####
#
# Potato PLIP docs
# 2000dec25
#
#####

# «potato-plip-docs»  (to ".potato-plip-docs")
# (find-htetfile "PLIP-Install-HOWTO.txt.gz")
# (find-htetfile "mini/PLIP.txt.gz")
# (eeman "8 plipconfig")






#  Local Variables:
#  coding:               utf-8-unix
#  End: