#!/bin/bash #create_grub_cd #Run as root in root's home directory #Create an enpty file floppy sized dd if=/dev/zero of=fd_file bs=512 count=2880 #Write an MSDOS file system to the file mkfs -t msdos fd_file #Check for a mount point if ([ ! -d /mnt/zip ]);then mkdir /mnt/zip;fi #Mount the file as a loopback devive (/dev/loop0 by default) mount -o loop fd_file /mnt/zip #Create the directory structure for grub mkdir /mnt/zip/boot mkdir /mnt/zip/boot/grub #Copy the essential grub files cp /usr/share/grub/i386-redhat/* /mnt/zip/boot/grub #Create a prototype grub.conf file #Uncomment and modify if require #The cd will boot to a grub> prompt if left commented out #cat > /mnt/zip/boot/grub/grub.conf<