]> git.pld-linux.org Git - packages/efi-boot-update.git/blob - grub.conf
Reasonable default boot order defined
[packages/efi-boot-update.git] / grub.conf
1 #
2 # This is disabled by default, as GRUB does good job by itself
3 #
4 # This is rather a proof-of-concept example how such things can be implemented
5 # here.
6 #
7
8 ENABLED=no
9 LABEL=GRUB
10 ARCH=x86_64
11 BINARY=grub.efi
12
13 GRUB_EXTRA_MODULES=""
14
15 install_files() {
16     local target
17     local module
18     local modules
19     local final_modules
20     local drive
21     local prefix
22
23     modules=""
24     modules="$modules $(/sbin/grub-probe --target=fs /boot)"
25     modules="$modules $(/sbin/grub-probe --target=abstraction /boot)"
26     modules="$modules part_$(/sbin/grub-probe --target=partmap /boot)"
27     modules="$modules search_fs_file search_fs_uuid"
28     modules="$modules $GRUB_EXTRA_MODULES"
29     drive="$(/sbin/grub-probe --target=drive /boot)"
30
31     if [ "$ARCH" = "x86_64" ] ; then
32         target="x86_64-efi"
33     else
34         target="i386-efi"
35     fi
36
37     if /bin/mountpoint -q /boot  ; then
38         prefix="$drive/grub"
39     else
40         prefix="$drive/boot/grub"
41     fi
42
43     final_modules=""
44     for module in $modules ; do
45         [ -e "/lib/grub/$target/$module.mod" ] && final_modules="$final_modules $module"
46     done
47
48     is_yes $VERBOSE && set -x
49     /sbin/grub-mkimage -O "$target" -d /lib/grub/$target \
50                 --output=$DESTDIR/grub.efi \
51                 --prefix="$prefix" $final_modules
52 }
53
54 # vi: ft=sh
This page took 0.05227 seconds and 3 git commands to generate.