diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-04-09 23:16:59 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-04-15 22:06:36 +0100 |
commit | 043333dda03be66fef493921b7e595557611e58a (patch) | |
tree | 1190e9fdff75a68072f03b8749f4e52c70a8e277 /lib/MGA | |
parent | 7c0cab87133acd7df0084f495b3d4f52fbf2dc9b (diff) | |
download | drakiso-043333dda03be66fef493921b7e595557611e58a.tar drakiso-043333dda03be66fef493921b7e595557611e58a.tar.gz drakiso-043333dda03be66fef493921b7e595557611e58a.tar.bz2 drakiso-043333dda03be66fef493921b7e595557611e58a.tar.xz drakiso-043333dda03be66fef493921b7e595557611e58a.zip |
Modified GRUB configuration to ease use on multi-boot USB sticks.
Diffstat (limited to 'lib/MGA')
-rw-r--r-- | lib/MGA/DrakISO/BuildBoot.pm | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm index 2d74d13..51b3c65 100644 --- a/lib/MGA/DrakISO/BuildBoot.pm +++ b/lib/MGA/DrakISO/BuildBoot.pm @@ -321,17 +321,17 @@ sub build_grub2_cfg { my @loadfonts; if (defined $theme_name) { - @loadfonts = map { " loadfont \$prefix/themes/$theme_name/$_" } @$theme_fonts; + @loadfonts = map { " loadfont \$grub2/themes/$theme_name/$_" } @$theme_fonts; } my $gettext = $add_lang_menu ? '$' : ''; join("\n", "if [ -z \$initialised ] ; then", - " search --no-floppy --set=root -l '" . $build->{media}{label} . "'", - " set prefix=(\$root)/boot/grub2", + " set grub2=(\$root)/boot/grub2", + " export grub2", "", - " if loadfont \$prefix/fonts/unicode.pf2 ; then", + " if loadfont \$grub2/fonts/unicode.pf2 ; then", " set gfxmode=1024x768,800x600,auto", " set gfxpayload=keep", " terminal_output gfxterm", @@ -339,9 +339,9 @@ sub build_grub2_cfg { if_($theme_name, "", " if [ x\$uefi == 'xtrue' ] ; then", - " set theme=\$prefix/themes/$theme_name/theme-uefi.txt", + " set theme=\$grub2/themes/$theme_name/theme-uefi.txt", " else", - " set theme=\$prefix/themes/$theme_name/theme.txt", + " set theme=\$grub2/themes/$theme_name/theme.txt", " fi", " export theme", @loadfonts, @@ -394,12 +394,12 @@ sub build_grub2_cfg { ), if_($add_lang_menu, "submenu \"F2: \"$gettext\"Language [\$lang]\" --id language --hotkey f2 {", - " source \$prefix/lang-menu.cfg", + " source \$grub2/lang-menu.cfg", "}", ), if_($add_kbd_menu, "submenu \"F3: \"$gettext\"Keyboard [\$kbd]\" --id keyboard --hotkey f3 {", - " source \$prefix/kbd-menu.cfg", + " source \$grub2/kbd-menu.cfg", "}", ), "", @@ -443,7 +443,7 @@ sub build_lang_menu_cfg { "function set_language {", " set lang=\$1", " set lkbd=\$2", - " configfile \$prefix/grub.cfg", + " configfile \$grub2/grub.cfg", "}", "", "set default=\$lang", @@ -468,8 +468,8 @@ sub build_kbd_menu_cfg { " fi", " set kbd=\$1", " set lkbd=", - " keymap \$prefix/layouts/\$kbd.gkb", - " configfile \$prefix/grub.cfg", + " keymap \$grub2/layouts/\$kbd.gkb", + " configfile \$grub2/grub.cfg", "}", "", "if [ -z \$kbd ] ; then", @@ -496,9 +496,8 @@ sub build_uefi_grub2_cfg { "set prefix=(\$root)/boot/grub2", "", "set uefi=true", - "export uefi", "", - "configfile \$prefix/grub.cfg", + ". \$prefix/grub.cfg", "", ); } |