Warning: this is a htmlized version!
The original is across this link. |
####### # # 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/a/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/a/.emacs[.html]>, # <http://angg.twu.net/a/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### ####### # # syslinux # 99sep12 # ####### # «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 floppycontrol --abort=1 superformat -B /dev/fd0 hd floppycontrol --abort=3 --readtrack=1 --recalibrate=0 -reset=2 --reporting=2 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 .config a:k22conf mcopy -ot - a:bootmsg.txt <<'---' Edrx's angg boot disk, using kernels 2.0.37/2.2.12. Choose from: c622 Default is c622. --- mcopy -ot - a:syslinux.cfg <<'---' display bootmsg.txt timeout 50 prompt 1 default c622 label c622 kernel k22xx append vga=1 ro root=/dev/hdc6 --- syslinux /dev/fd0 # (find-disks218file "install.bat") ###### # # superformat # 99sep19 # ###### # «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)floppycontrol") # (find-node "(fdutils)Error handling options") # (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 # ##### # (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: # 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") # drive0: deviation=-410 # 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