Hello,
I have made a couple of improvements to my simple boot menu. Now if
you choose exit, it will start the telnet daemon and you can just
press enter to load the default choice.
Enjoy!
#!/bin/bash
#
# AppleTV Simple Boot Menu
# Version 0.2
# selection timeout in seconds. set to 0 to wait forever.
TIMEOUT=3
# default selection
DEFAULT=1
VALID=0
while [ $VALID -ne 1 ]; do
echo
echo " Apple TV Boot Menu"
echo
echo " 1. Boot from USB (default)"
echo " 2. Exit"
echo
CHOICE=$DEFAULT
if [ $TIMEOUT -ne 0 ]; then
read -n 1 -p " Selection: " -t $TIMEOUT CHOICE
else
read -n 1 -p " Selection: " CHOICE
fi
if [ "$CHOICE" == '' ]; then
CHOICE=$DEFAULT
fi
case $CHOICE in
[1-2])
VALID=1
echo
;;
esac
done
case $CHOICE in
1)
echo
echo " Booting from USB..."
echo
if [ ! -d /mnt ]; then
mkdir /mnt
fi
mount /dev/sdb1 /mnt
kexec --load /mnt/casper/vmlinuz --initrd=/mnt/casper/initrd.gz
--
command-line="preseed/xubuntu.seed initrd=casper/initrd.gz boot=casper
quiet splash video=vesafb"
#kexec --load /mnt/boot/vmlinuz --initrd=/mnt/boot/initrd.gz --
command-line="root=/dev/ram0 rw rdinit=linuxrc boot=cdrom lang=en
remote=atiusb receiver=atiusb keymap=qwerty splash=silent vga=789
video=vesafb:ywrap,mtrr"
#kexec --load /mnt/vmlinuz --initrd=/mnt/initrd0.img --command-
line="initrd=initrd0.img boot=usb xbmc=nvidia video=vesafb"
kexec -e
;;
2)
echo
echo " Exiting..."
echo
exit 1
;;
esac
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
For more options, visit this group at
http://groups.google.com/group/atv-bootloader?hl=en
-~----------~----~----~----~------~----~------~--~---