You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
51 lines
1.5 KiB
# Super Grub Disk - diskpartchainboot.cfg
|
|
# Copyright (C) 2009,2010,2011,2012,2013,2014,2015 Adrian Gibanel Lopez.
|
|
#
|
|
# Super Grub Disk is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Super Grub Disk is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with Super Grub Disk. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
set option_title=$"Disks and Partitions (Chainload)"
|
|
|
|
function run_option {
|
|
|
|
source "${prefix}/tools.cfg"
|
|
insmod regexp
|
|
|
|
for dev in (*); do
|
|
# $device: parenthesis removed from $dev
|
|
regexp -s device '\((.*)\)' $dev
|
|
# Discard floppy and cdrom devices in search
|
|
# But search them if their search has been inforced
|
|
|
|
if searchindevice "$device"; then
|
|
|
|
probe -s fstype -f $dev
|
|
probe -s uuid -u $dev
|
|
probe -s label -l $dev
|
|
probe -s partmap -p $dev
|
|
if [ ! -z $label ]; then
|
|
set label="\"$label\""
|
|
fi
|
|
if strcontains "$device" ","; then
|
|
extra_tab_str="${finaloption_tab_str}"
|
|
else
|
|
extra_tab_str=""
|
|
fi
|
|
menuentry "${finaloption_tab_str}${extra_tab_str}$dev $label" $dev {
|
|
set root="$2"
|
|
chainloader +1
|
|
}
|
|
|
|
fi
|
|
done
|
|
}
|
|
|