home *** CD-ROM | disk | FTP | other *** search
/ Login Magazine 68 / LoginMagazineNo68.bin / kernels / makedisks.144 < prev    next >
Text File  |  1999-11-07  |  721b  |  31 lines

  1. #!/bin/sh
  2. # This makes a bootkernel disk in /dev/fd0 from a kernel image.
  3. #
  4. # Run this in a directory containing the kernels you're gonna use, and a
  5. # subdirectory with a master image of the bootkernel disk.
  6. #
  7. # This is the command to use:
  8. #
  9. # makedisk kernel_image disk_size
  10. #          ^^           ^^^^^^^^^ This is 1440 or 1200
  11. #          ^^^^^ This is the name (and maybe path to) the kernel you're going
  12. #                to use, such as scsinet/zImage.
  13. #
  14.  
  15. mkdisk() {
  16.  if [ -r $1/zImage ]; then
  17.    ./makedisk $1/zImage 1440
  18.  elif [ -r $1/bzImage ]; then
  19.    ./makedisk $1/bzImage 1440
  20.  elif [ -r $1/vmlinuz ]; then
  21.    ./makedisk $1/vmlinuz 1440
  22.  fi
  23. }
  24.  
  25. for dir in * ; do
  26.  if [ -d $dir ]; then
  27.   mkdisk $dir
  28.  fi
  29. done
  30.