Autorun sysrescuecd scripts grub2 custom

#!/bin/bash

mkdir /mnt/sda5
sleep 1
mount /dev/sda5 /mnt/sda5
sleep 1

echo "Please see if you have enough space in mnt-sda6 and then press enter"
cd /mnt/sda5
ls -l
echo
echo
echo "Please see if you have enough space in mnt-sda5 and then press enter"
echo
du -msh *
echo
echo "Please see if you have enough space in mnt-sda5 and then press enter"
echo
df -h
echo
echo "Are you sure, Type Y or y to continue, type N or n to return to a root shell"
ans="n"
read ans


case $ans in
y|yes|Y)
echo "Now going to image the partition inside folder"
date=$(date +%Y-%m-%d-%H-%M)
echo "/mnt/sda5/"$date
echo "The operation will begin in 3 seconds"
sleep 1
echo "The operation will begin in 2 seconds"
sleep 1
echo "The operation will begin in 1 second"
sleep 1
mkdir -p /mnt/sda5/$date

#partimage -d -V 314 -b -f1 save  /dev/sda6 /mnt/sda5/$date/sda6-root.partimg.gz
fsarchiver savefs -v -s 400 /mnt/sda5/$date/sda6-root.fsa /dev/sda6
sleep 2
echo "syncing..."
sync
#chmod -R 755  /mnt/sda5/$date
sleep 2
echo "syncing..."
sync
sleep 2
echo "syncing..."
sync
cd /
umount /mnt/sda5
shutdown -h now

;;
*)
echo "No backup"
echo "Returning you to root shell"
;;
esac

exit 0


40_custom

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Auto Microsoft Windows XP Professional (on /dev/sda2)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set=root D45E68BF5E689BCC
        drivemap -s (hd0) ${root}
        chainloader +1
}

menuentry "Custom Microsoft Windows XP Professional (on /dev/sda2)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set=root D45E68BF5E689BCC
        drivemap -s (hd0) ${root}
        chainloader +1
}

submenu "Rescue system" {
# This is a sample menu.lst file for SystemRescueCd
menuentry "fsa backup autorun Local SDA1 System Rescue CD 2.5.1" {
    set root=(hd0,1)
    linux   /sysrcd/rescuecd subdir=sysrcd setkmap=de
    initrd  /sysrcd/initram.igz
}

# This is a sample menu.lst file for SystemRescueCd
menuentry "Disable Autorun Local SDA1 System Rescue CD 2.5.1" {
    set root=(hd0,1)
    linux   /sysrcd/rescuecd subdir=sysrcd setkmap=de ar_disable
    initrd  /sysrcd/initram.igz
}


# This is a sample menu.lst file for SystemRescueCd
menuentry "noautorun hd01 ISO System Rescue CD " {
    set root=(hd0,1)
    loopback loop /systemrescuecd-x86-2.5.1.iso
    linux (loop)/isolinux/rescuecd isoloop=systemrescuecd-x86-2.5.1.iso setkmap=de
    initrd  (loop)/isolinux/initram.igz
}
}