echo "Dein System scheint ein 64-bit System zu sein."
set64
else
echo "Dein System scheint ein 32-bit System zu sein."
set32
fi
echo "Die weiseste Wahl sollte $bits bits mit $iso und $isoinitrd zu sein"
echo
}
#elif is not working in this grub version !?!
if test -z $bits
then
guesscpu
else
if test 64 == $bits
then
set64
else
set32
fi
fi
# Set up a loop device and start a Debian style Casper Live CD from it.
function LoadCasperLoop {
if test -z "${isodev}"
then
search -f -s isodev /${iso}
echo "Found ${iso} on (${isodev})"
echo ""
fi
if test -z "${initrd}"
then
set initrd="(loop)/casper/initrd.lz"
fi
loopback loop (${isodev})/${iso}
echo "Loading kernel (takes up to 2 minutes)"
echo ""
echo "Hint: You may need to mount the USB stick on /isodevice by hand !"
echo " Or you may need to run this:"
echo " . /scripts/casper-helpers"
echo " find_cow_device ${iso}"
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/$iso file=/cdrom/preseed/ubuntu.seed ${localeinfo} nosplash verbose --
echo "Loading initrd from iso (takes up to 5 minutes)"
initrd "${initrd}"
echo "Starting kernel"
}
#TODO: ist $root immer automatisch richtig gesetzt ?
# Man koennte search -l "Label-des-FAT32-auf-dem-Usbstick" benutzen.
# Man Kann auch 'search -f -s isodev /$iso' verwenden um das grub-device zu bekommen, auf dem $iso liegt. Man beachte dabei den absoluten Pfad mit / am Anfang! Das Ergebnis wird (falls gefunden) in der Variable $isodev abgelegt. z.b. $isodev=hd0,1
#TODO: Suche Loesung um die UUID des FAT32 an das bootende .iso weiterzugeben
menuentry "Empfohlen: Boot Ubuntu 11.10 ${bits}bit Live ISO by UUID" {
loopback loop ($root)/$iso
echo "Loading ${bits}bit kernel (takes up to 2 minutes)"
linux (loop)/casper/vmlinuz boot=casper iso-scan/uuid=C3E9-0499 iso-scan/filename=/$iso file=(loop)/preseed/ubuntu.seed --
echo "Loading ${bits}bit initrd (takes up to 5 minutes)"
initrd ($root)/$isoinitrd
echo "Starting ${bits}bit kernel"
}
menuentry "======== Bei Auswahl ab hier unbedingt Helfer hinzuziehen =======" {