#!/bin/bash # UMI - Daves script to create a ramdisk image I_FILE=initrd-game # Are we starting from scratch or editing echo -n "Create a new RAM Disk image : " read KEY if [ $KEY = 'y' ]; then if [ -e /boot/$I_FILE.img ]; then cp /boot/$I_FILE.img /boot/$I_FILE.img.bak fi echo Making new RAM Disk image in /boot/$I_FILE /sbin/mkinitrd -v -f /boot/$I_FILE.img 2.4.7-10 zcat /boot/$I_FILE.img > /tmp/$I_FILE echo Image uncompressed and ready for mount fi if [ ! -e /tmp/$I_FILE ]; then echo ERROR: /tmp/$I_FILE does not exist ...exiting exit fi echo Mounting Image on /mnt/tmp mount -o loop /tmp/$I_FILE /mnt/tmp