3 # Purpose: grub-mkconfig helper script for Grml rescue systems
4 # Authors: grml-team (grml.org), (c) Andreas Gredler <jimmy@grml.org>, Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2+.
7 ################################################################################
13 bindir=${exec_prefix}/bin
14 libdir=${exec_prefix}/lib
15 . ${libdir}/grub/grub-mkconfig_lib
17 # default unless configured otherwise:
18 ISO_LOCATION="/boot/grml"
20 if [ -r /etc/default/grml-rescueboot ] ; then
21 . /etc/default/grml-rescueboot
25 for file in "${ISO_LOCATION}"/*.iso ; do
26 if grub_file_is_not_garbage "$file" ; then
27 iso_list="$iso_list $file "
31 for grmliso in $iso_list ; do
32 rel_dirname="$(make_system_path_relative_to_its_root $(dirname $grmliso))"
33 grml="$(basename $grmliso)"
34 device="$(${grub_probe} -t device ${grmliso})"
39 /dev/mapper*|/dev/md*)
40 additional_param="live-media=$device"
44 echo "Found Grml ISO image: $grmliso" >&2
45 title="Grml Rescue System ($grml)"
48 menuentry "${title}" {
49 $(prepare_grub_to_access_device "$device" | sed -e "s/^/ /")
50 iso_path="${rel_dirname}/${grml}"
52 kernelopts=" $CUSTOM_BOOTOPTIONS $additional_param "
54 loopback loop "${rel_dirname}/$grml"
56 configfile /boot/grub/loopback.cfg
61 ## END OF FILE #################################################################