2015-07-08 19:21:42 +00:00
|
|
|
function scan_disk {
|
|
|
|
# Scan the disk and create a menuentry to boot it if it contains a linux
|
|
|
|
# install
|
|
|
|
disk=$1
|
|
|
|
if [ -e $disk/etc/lsb-release ]; then
|
|
|
|
probe -s uuid -u $disk
|
|
|
|
source $disk/etc/lsb-release
|
|
|
|
menuentry "$DISTRIB_ID $DISTRIB_RELEASE $disk" $disk $uuid {
|
|
|
|
set root=$2
|
|
|
|
linux /vmlinuz root=UUID=$3
|
|
|
|
initrd /initrd.img
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Load modules
|
|
|
|
insmod all_video
|
|
|
|
insmod gfxterm
|
|
|
|
insmod png
|
|
|
|
insmod regexp
|
|
|
|
|
|
|
|
# Set up display
|
|
|
|
set gfxmode=auto
|
|
|
|
terminal_output gfxterm
|
|
|
|
background_image /boot/grub/splash.png
|
2015-07-08 20:09:31 +00:00
|
|
|
loadfont /boot/grub/unicode.pf2
|
2015-07-08 19:21:42 +00:00
|
|
|
|
|
|
|
# Scan all disks except for current root
|
|
|
|
for disk in (*)
|
|
|
|
do
|
|
|
|
if [ "$disk" != "(${root})" ]; then
|
|
|
|
scan_disk $disk
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Create menuentry for installer
|
|
|
|
probe -s uuid -u ${root}
|
|
|
|
menuentry "Boot Installer" $uuid {
|
|
|
|
linux /vmlinuz root=UUID=$2
|
|
|
|
initrd /initrd.img
|
|
|
|
}
|