home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd2.bin / suse / inst-sys / usr / lib / YaST / create_yast_bootdisk < prev    next >
Text File  |  2000-03-30  |  1KB  |  38 lines

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 1999 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
  4. #
  5. # Author: Thomas Fehr      <fehr@suse.de>, 1999
  6. #
  7. FOUND=0
  8. umount /mnt > /dev/null 2>&1
  9. while [ $FOUND -eq 0 ] 
  10. do
  11.     umount /dev/cdrom > /dev/null 2>&1
  12.     echo -n "Insert the first SuSE installation CD into your CDROM drive and press Enter."
  13.     read
  14.     mount -r -t iso9660 /dev/cdrom /mnt
  15.     if [ ! -f /mnt/disks/eide01 ]
  16.     then
  17.     echo Wrong CDROM. File /disks/eide01 does not exist.
  18.     else
  19.     FOUND=1
  20.     fi
  21. done
  22. TMPDIR=/tmp/`basename $0`.$$
  23. echo -n "Insert disk into floppy drive and press Enter."
  24. read
  25. cp -a /mnt/disks/eide01 .
  26. umount /dev/cdrom > /dev/null 2>&1
  27. echo "Copying floppy image to disk."
  28. dd if=eide01 of=/dev/fd0
  29. mount -tmsdos /dev/fd0 /mnt
  30. echo "Copying /boot/vmlinuz to disk."
  31. rm -f /mnt/*mod.gz /mnt/*mo.gz
  32. cp /boot/vmlinuz /mnt/linux
  33. cat /mnt/syslinux.cfg | sed "/^append/s/$/ linuxrc=auto yast=tape/" > tmp.cfg
  34. mv tmp.cfg /mnt/syslinux.cfg
  35. umount /mnt
  36. rm -rf $TMPDIR
  37. echo "Automated bootdisk creation complete."
  38.