Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts for floppy things
#
# 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.
#
# 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/floppy.e>
#           or at <http://angg.twu.net/e/floppy.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/>.
#
#######




# «.syslinux»  (to "syslinux")
# «.superformat»  (to "superformat")
# «.floppycontrol»  (to "floppycontrol")
# «.fdutils»  (to "fdutils")



#######
#
# syslinux
# 99sep12
#
#######

# «syslinux»  (to ".syslinux")

# (find-fline "/usr/doc/syslinux/")
# (find-fline "/usr/doc/syslinux/syslinux.doc.gz")
# (find-fline "/usr/doc/syslinux/syslinux.doc.gz" "label mylabel")

# mkdosfs -c /dev/fd0
# (eeman "mtools" "MTOOLS_SKIP_CHECK")
# (find-fline "~/.zshrc" "MTOOLS_SKIP_CHECK")
# export MTOOLS_SKIP_CHECK=1

# Try to be very paranoid with bad sectors.
# (But I don't know if this trick really works).
# (find-es "floppy" "floppycontrol")
floppycontrol --abort=1
#superformat -B /dev/fd0 hd
floppycontrol --abort=3 --readtrack=1 --recalibrate=0 -reset=2 --reporting=2

# Or:
superformat -V /dev/fd0 hd


#cd /usr/src/linux-2.0/
#mcopy arch/i386/boot/zImage	a:k20xx
#mcopy .config			a:k20conf
# mcopy modules/*.o		a:

cd /usr/src/linux-2.2/
mcopy arch/i386/boot/bzImage	a:k22xx
mcopy arch/i386/boot/bzImage	a:k22xxbup
mcopy .config a:k22conf

cd /boot/
mcopy vmlinuz-2.2.15		a:k22xx
mcopy vmlinuz-2.2.15		a:k22xxbup

#*
cd /boot/
mcopy vmlinuz-2.2.16-edrx	a:k22xx
mcopy config-2.2.16-edrx	a:k22conf

#*
# (find-node "(mtools)Common features")
# (find-node "(mtools)mcopy" "`t'")
# (find-node "(mtools)name clashes" "`-o'")

mcopy -o -t - a:bootmsg.txt <<'---'
Edrx's angg boot disk, using two kernels 2.2.15 (k22xx, k22xxbup).
Choose from: d8 d8bup
Default is:     d8bup
---
#
# «syslinux.cfg»
mcopy -o -t - a:syslinux.cfg <<'---'
display bootmsg.txt
timeout 50
prompt 1
default d8bup
label d8
  kernel k22xx
  append vga=1 ro root=/dev/hdd8
label d8bup
  kernel k22xxbup
  append vga=1 ro root=/dev/hdd8
---
syslinux /dev/fd0
#*

# (find-disks218file "install.bat")




#####
#
# mtools
# 2000may25
#
#####

# (find-vldifile "mtools.list")

# (find-fline	"/usr/doc/mtools/")
# (find-node	"(mtools)Top")
# (find-vldifile "mtools.list" "/usr/share/man/man1/")
# (eeman	"5 mtools")
# (find-fline	"/etc/mtools.conf")




######
#
# superformat
# 99sep19
#
######

# «superformat»  (to ".superformat")

# (find-vldifile "fdutils.list")
# (find-node "(fdutils)Top")
# (find-node "(fdutils)superformat")
# (find-node "(fdutils)Examples" "hd")
# (find-node "(fdutils)Common options" "`-B'")

# (find-node "(fdutils)setfdprm")
# (find-node "(mtools)mbadblocks")

# To format a floppy being completely paranoid
# about bad sectors, aborting immediately:
# (Does this really work? It is mbadblocks that
# must get the I/O errors...)
#
floppycontrol --abort=1
superformat -B /dev/fd0 hd

# floppycontrol --abort=2 --reset=1 --recalibrate=1 --reporting=1






#####
#
# floppycontrol
# 99sep19
#
#####

# «floppycontrol»  (to ".floppycontrol")
# (find-node "(fdutils)floppycontrol")
# (find-node "(fdutils)Error handling options")
# (find-k22file "drivers/block/floppy.c" "drive_params")


# (find-k2file "drivers/block/floppy.c" "drive_params")
# (find-k2file "drivers/block/floppy.c" "floppy_max_errors")
# (find-k2file "include/linux/fd.h" "struct floppy_max_errors")
# (find-k2file "include/linux/fd.h" "struct floppy_drive_params")
# (find-k2file "drivers/block/floppy.c" ">= DP->max_errors.reporting")
# (find-k2file "drivers/block/floppy.c" "> DP->max_errors.abort")
# (find-k2file "drivers/block/floppy.c" "> DP->max_errors.reset")
# (find-k2file "drivers/block/floppy.c" "> DP->max_errors.recal")
# (find-k2file "drivers/block/floppy.c" "< DP->max_errors.read_track")
# (find-k2file "drivers/block/floppy.c" "UDP->max_errors.reporting =")

# (gdb "gdb /usr/src/linux-2.0/vmlinux /proc/kcore")

floppycontrol -p
# Boot defaults (old notes):
# abort=           3
# readtrack=       1
# recalibrate=     0
# reset=           2
# reporting=       2

# Resetting:
floppycontrol --abort=3 --readtrack=1 --recalibrate=0 -reset=2 --reporting=2




#####
#
# floppymeter
# 99sep19
#
#####

# (find-node "(fdutils)floppymeter")

# (find-fline "/etc/driveprm")
echo 'drive0: deviation=-720' \
  > /etc/driveprm

# floppymeter output, angg 99sep19:
#  _____________________________________________
# |rotations  |average    |sliding    |missed   |
# |since start|time per   |average of |rotations|
# |of test    |rotation   |the last   |         |
# |           |since start|10         |         |
# |           |of test    |rotations  |         |
# |===========|===========|===========|=========|
# |  1000     |  199902   |  199904   |  0      |
# |___________|___________|___________|_________|
# 
# capacity=199918 half bits (should be 200000 half bits)
# time_per_rotation=199902 microseconds (should be 200000)
# data transfer rate=500040 bits per second (should be 500000)
# 
# deviation on capacity: -410 ppm
# deviation on time_per_rotation: -490 ppm
# deviation on data transfer rate: +80 ppm
# 
# Insert the following line to your /etc/driveprm file:
# drive0: deviation=-410




#####
#
# mtools and bad blocks
#
#####

pdsc /big/slinks2/dists/slink/main/source/otherosfs/mtools_3.9.1-2.dsc
cd /usr/src/mtools-3.9.1/
agrep -i 'bad blocks' $(find *)
agrep MTOOLS_SKIP_CHECK $(find *)
agrep mtools_skip_check $(find *)




#########
#
# Making a bootable floppy (with lilo)
# (old)
#
#########

mke2fs -c /dev/fd0
dumpe2fs /dev/fd0
mount -t ext2 /dev/fd0 /A
cd /usr/src/linux-2.0/
cp -v arch/i386/boot/zImage modules/*.o .config /A
cp -v /boot/boot.b /A
#
# standard Debian kernel (huge):
cp -v /dest/vmlinuz /A/vml29deb
umount /A

mount -t ext2 /dev/fd0 /A
#
# man lilo.conf
lilo -C - -v <<'EOF'
boot=/dev/fd0
map=/A/map
install=/A/boot.b
compact
prompt
timeout=50
image=/A/zImage
	label=debian
	vga=1
	root=/dev/hdc1
image=/A/zImage
	label=redhat
	vga=1
	root=/dev/hdc2
image=/A/zImage
	label=S
	vga=1
	read-write
	root=/dev/hdd2
#
# This one is for the "clean" Debian installation;
# it uses the original, huge (623K) 2.0.29 kernel to be compatible
# with the standard distributed modules.
image=/A/vml29deb
	label=clean
	vga=1
	root=/dev/hdc5
EOF
#
umount /A


# (find-fline "/big/rpmcontents" "boot.b")
# (find-fline "$RBU/lilo/Makefile" "boot.b")
# (find-fline "/usr/doc/lilo-0.19-1/README")
# (find-fline "/usr/doc/lilo-0.19-1/README" "  lilo/boot.b")
# (find-fline "/usr/doc/lilo-0.19-1/README" "echo image")
# (find-fline "/usr/doc/lilo-0.19-1/README" "/sbin/mke2fs /dev/fd0")

# It seems that I can only install lilo on ext2fs/minix floppies... Why?





#####
#
# Floppies: mtools
# (old)
#
#####

# (find-node "(mtools)Top")
# (find-node "(mtools)mformat")
# (find-node "(mtools)mbadblocks")
# (find-fline "/usr/doc/mtools/")
# (find-fline "/etc/mtools.conf")
# (find-vldifile "mtools.list")

mkdosfs -c /dev/fd0
# minfo a:
mformat -t 80 -h 2 -s 18 a:




#####
#
# Making a floppy with a copy of 4dos and my init files
#
#####

# (find-node "(fdutils)floppycontrol")
# (find-node "(fdutils)Error handling options")

floppycontrol -p
floppycontrol --abort=1 --reset=2 --reporting=1
superformat -B /dev/fd0 hd

locate 4.zip
locate pu.exe
# (find-fline "/hdc6/home/root/4.zip")

mcopy /hdc6/home/root/4.zip \
      /big/home/4dos/pu.exe a:




#####
#
# mbadblocks
#
#####

# (eeman "mbadblocks")
# (find-node "(mtools)Top")
# (find-node "(mtools)mbadblocks")
# (eeman "fsck.msdos")

mdel a:'*'
(mdir a:
mbadblocks a:
) |& tee ~/o


No files
                          1 457 664 bytes free

end_request: I/O error, dev 02:00, sector 1025
end_request: I/O error, dev 02:00, sector 1025
plain_io: Input/output error
Bad cluster 993 found




#####
#
# fdutils source (potato)
# 2000oct15
#
#####

# «fdutils»  (to ".fdutils")

# (find-status "fdutils")
# (find-vldifile "fdutils.list")
# (find-fline "/usr/doc/fdutils/")

pdsc $SDEBIAN/dists/potato/main/source/utils/fdutils_5.3-3.dsc
cd /usr/src/fdutils-5.3/







#  Local Variables:
#  coding:               no-conversion
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  ee-charset-indicator: "Ñ"
#  End: