#!/bin/bash # # Original File # -------------- # http://www.rocklinux.org/sources/misc/old-subdist/read-only/README # http://www.Linux-Sec.net/CDRW/scripts/boot.fd.lilo.txt # http://www.Linux-Sec.net/CDRW/scripts/lilo.loop.conf # # # Create a boot floppy Image # -------------------------- # # # 19-Nov-02 amo Date-of-Birth Cleanup original from RockLinux.org # # # Create working area ( exact 1.44MB floppy disk ) # dd if=/dev/zero of=boot.fd.img bs=1k count=1440 # # # Mount it as a loop device losetup /dev/loop1 boot.fd.img # # Format it mke2fs -q -m0 /dev/loop1 # # mount it mount /dev/loop1 /mnt/loop # # # # Get the lilo.conf needed # cd /mnt/loop wget http://www.Linux-1u.net/CDRW/scripts/lilo.fd.conf # # # Copy the kernel for booting cp -p /boot/boot.b /boot/map /boot/vmlinuz-2.4.19t lilo.fd.conf /mnt/loop # # lilo -C /mnt/loop/lilo.fd.conf # cd umount /mnt/loop losetup -d /dev/loop1 # # # Now copy and save the bootable floppy image to permanent file # ------------------------------------------------------------- cp boot.fd.img /boot/boot.fd.img # # # Free the memory used for boot.fd.img # ------------------------------------ # # # To view the contents of the bootable image boot.fd.img # ------------------------------------------ # mount it someplace different ( loop2 this time ) mount -t ext2 -o loop=/dev/loop2 boot.fd.img /mnt/floppy/ ls -laR /mnt/floppy umount /mnt/floppy # # # # Now prepare the ISO image # ------------------------- # mkisofs -b boot.fd.img -l -R -V 'ROCK Read-Only Linux' -v -o /rock-ro-linux.iso /rock-ro-linux # # # Now Write the cdrom # ------------------- # cdrecord dev=/dev/cdwriter speed=4 -v /rock-ro-linux.iso # # # End of file