home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 22136 < prev    next >
Encoding:
Text File  |  1992-12-30  |  2.6 KB  |  71 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!unislc!erc
  3. From: erc@unislc.uucp (Ed Carp)
  4. Subject: How to make a bootable Linux floppy
  5. X-Newsreader: TIN [version 1.1 PL6]
  6. Message-ID: <1992Dec30.080541.16947@unislc.uucp>
  7. Organization: Unisys Corporation SLC
  8. Date: Wed, 30 Dec 1992 08:05:41 GMT
  9. Lines: 60
  10.  
  11. Here's a script I hacked to make a bootable floppy.  It requires lilo 0.7,
  12. as well as the new mount (0.97) and init (the one that will do singleuser
  13. mode).  Have fun, kids... :)
  14. --------------------------------- cut here -----------------------------------
  15. #
  16. # This script makes a Linux boot floppy in $FLOPPY.
  17. #
  18. # Written 12/29/92 by Ed Carp (erc@apple.com)
  19. #
  20. # This works on my system (Linux 0.99p1) - check to make sure that
  21. # stuff is being snarfed from the correct place on your system.
  22. # This script also requires that you have the latest mount (0.97) command,
  23. # as well as an init that will boot to singleuser mode.  It also requires
  24. # that /usr/src/linux/Image exist.
  25. #
  26. FLOPPY=/dev/fd0
  27. RFLOPPY=/dev/fd0H1440
  28. # Set BLOCKS to be the number of blocks on $FLOPPY
  29. BLOCKS=1440
  30. # Set TZONE to be your timezone, AS DEFINED IN /usr/lib/zoneinfo!!
  31. TZONE=UTC
  32.  
  33. fdformat $RFLOPPY
  34. mkfs $FLOPPY $BLOCKS
  35. mount $FLOPPY /mnt
  36. (cd /mnt;mkdir bin dev etc lib tmp usr usr/tmp usr/lib usr/lib/zoneinfo)
  37. tar cf - /dev|(cd /mnt;tar xf -) > /dev/null
  38. (cd /bin;cp getty login sh /mnt/bin)
  39. cp /bin/ls /bin/fsck /bin/fdisk /bin/rdev /bin/cp /bin/date /mnt/bin
  40. cp /bin/sync /bin/rm /bin/reboot /bin/cat /bin/df /bin/mkdir /mnt/bin
  41. cp /usr/bin/tar /bin/ps /mnt/bin
  42. (cd /mnt/usr/lib/zoneinfo;cp /usr/lib/zoneinfo/$TZONE localtime;ln -s localtime posixrules)
  43. tar cf - /lib/libc* /lib/libm*|(cd /mnt;tar xf -) > /dev/null
  44. cp /usr/src/linux/Image /mnt/unix
  45. rdev /mnt/unix $FLOPPY
  46. (cd /etc;cp TZ clock fstab gettydefs group init* issue magic mount passwd profile securetty shadow swapon termcap umount update /mnt/etc)
  47. # We want to boot to singleuser
  48. touch /mnt/etc/singleboot
  49. echo "mount -t proc /proc /proc" > /mnt/etc/rc
  50. touch /mnt/etc/utmp
  51. touch /mnt/etc/wtmp
  52. /bin/rm -f /mnt/etc/inittab
  53. # This works with getty/uugetty - with other gettys, swap "tty$i" and "9600"
  54. for i in 1 2 3 4 5 6 7 8
  55. do
  56.     echo "tty$i:console:/bin/getty tty$i 9600" >> /mnt/etc/inittab
  57. done
  58. echo "$FLOPPY /" > /mnt/etc/mtab
  59. mkdir /mnt/etc/lilo
  60. cp /etc/lilo/* /mnt/etc/lilo
  61. cd /mnt/etc/lilo
  62. ./lilo -r /mnt -i /etc/lilo/boot.b -b $FLOPPY -v -v -v /unix
  63. /bin/rm -f /mnt/etc/lilo/boot.???? /mnt/etc/lilo/*.old
  64. cd /
  65. umount $FLOPPY
  66. fsck -av $RFLOPPY
  67. -- 
  68. Ed Carp            erc@apple.com, erc@saturn.upl.com    801/538-0177
  69.  
  70. Who and what would you be if you went beyond your deepest fears?
  71.