summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
Diffstat (limited to 'images')
-rw-r--r--images/NEWS2
-rw-r--r--images/grub2.config33
-rw-r--r--images/grub2.theme34
-rwxr-xr-ximages/make_boot_img27
4 files changed, 95 insertions, 1 deletions
diff --git a/images/NEWS b/images/NEWS
index a285a0016..8005b2f2f 100644
--- a/images/NEWS
+++ b/images/NEWS
@@ -1,3 +1,5 @@
+- create efi loader at build time
+
Version 2.18 - 6 April 2015 by Anne Nicolas
- use noiswmd as default boot option (mga#11105)
diff --git a/images/grub2.config b/images/grub2.config
new file mode 100644
index 000000000..d69e7fbff
--- /dev/null
+++ b/images/grub2.config
@@ -0,0 +1,33 @@
+
+insmod efi_gop
+insmod efi_uga
+insmod video_bochs
+insmod video_cirrus
+insmod video_fb
+
+insmod font
+if loadfont ${prefix}/fonts/unicode.pf2
+then
+ insmod gfxterm
+ set gfxmode=1024x768,800x600,640x480
+ set gfxpayload=keep
+ terminal_output gfxterm
+fi
+
+insmod png
+set theme=($root)/EFI/BOOT/themes/maggy/theme.txt
+export theme
+
+set timeout=10
+
+search --no-floppy --set=root -l 'Mageia-5-x86_64-netinstall'
+
+menuentry 'Start Mageia 5 (Cauldron) Install' {
+ linux /isolinux/x86_64/vmlinuz quiet noiswmd
+ initrd /isolinux/x86_64/all.rdz
+}
+
+menuentry 'Start Mageia 5 (Cauldron) Rescue' {
+ linux /isolinux/x86_64/vmlinuz audit=0 noiswmd rescue
+ initrd /isolinux/x86_64/all.rdz
+}
diff --git a/images/grub2.theme b/images/grub2.theme
new file mode 100644
index 000000000..116ca81ff
--- /dev/null
+++ b/images/grub2.theme
@@ -0,0 +1,34 @@
+# GRUB gfxmenu theme "maggy".
+
+title-text: ""
+title-font: "MageiaLogo Bold 28"
+title-color: "white"
+
+desktop-image: "Mageia5-grub2-1024x768.png"
+terminal-font: "Unknown Regular 16"
+
++ boot_menu {
+ left = 20%
+ top = 15%
+ width = 60%
+ height = 55%
+ item_font = "MageiaLogo Regular 20"
+ selected_item_font = "MageiaLogo Bold 20"
+ color_normal="black/black"
+ item_color = "#2397d4"
+ selected_item_color = "white"
+ item_height = 24
+ item_spacing = 10
+}
+
++ progress_bar
+{
+ id = "__timeout__"
+ left = 20%
+ top = 65%
+ width = 60%
+ height = 1%
+ fg_color = "lightskyblue"
+ bg_color = "dodgerblue"
+ border_color = "midnightblue"
+}
diff --git a/images/make_boot_img b/images/make_boot_img
index f83dc532d..13d365c14 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -345,7 +345,32 @@ sub boot_iso {
_ "sed -i 's#\\(append .*\\)\\(splash quiet\\|rescue\\)\$#\\1\\2 automatic=$ENV{BOOT_AUTOMATIC_METHOD}#' .boot_iso/isolinux/isolinux.cfg"
}
- _ "genisoimage -r -f -J -cache-inodes -V 'Mga Boot ISO' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $iso .boot_iso";
+ my $arch = arch();
+ my $options = "-J -joliet-long -r -v -T -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table";
+ my $cmd = "mkisofs -U -A 'Mageia-$ENV{DISTRIB_VERSION}-$arch-netinstall' -V 'Mageia-$ENV{DISTRIB_VERSION}-$arch-netinstall' -volset 'Mageia-$ENV{DISTRIB_VERSION}-$arch' $options";
+ # create efi stuff on the fly
+ if ($arch =~ /x86_64/) {
+ _ "mkdir -p .boot_iso/EFI/BOOT/";
+ # create efi loader
+ my $efi_core = "configfile normal boot linux linuxefi loadenv ls reboot search search_label";
+ my $efi_part_fs = "part_msdos part_gpt part_apple fat iso9660 udf";
+ my $efi_gfx = "gfxmenu gfxterm efi_gop efi_uga video video_bochs video_cirrus video_fb font png";
+ _ "/usr/bin/grub2-mkimage --prefix='/EFI/BOOT' -O x86_64-efi -o .boot_iso/EFI/BOOT/bootx64.efi $efi_core $efi_part_fs $efi_gfx";
+ _ "cp -f grub2.config .boot_iso/EFI/BOOT/grub.cfg";
+ # add theme
+ _ "cp -r /boot/grub2/{fonts,themes} .boot_iso/EFI/BOOT/";
+ _ "cp -f grub2.theme .boot_iso/EFI/BOOT/themes/maggy/theme.txt";
+ # create efiboot.img
+ my $efisize = ceil(chomp_(`du -s -k .boot_iso/EFI`) / 1024) * 1024;
+ my $efi_img = ".boot_iso/isolinux/efiboot.img";
+ _ "dd if=/dev/zero of=$efi_img bs=1k count=$efisize";
+ _ "/sbin/mkdosfs -F12 $efi_img";
+ _ "mcopy -s -i $efi_img .boot_iso/EFI ::";
+ # create iso
+ _ "$cmd -eltorito-alt-boot -b isolinux/efiboot.img -no-emul-boot -o $iso .boot_iso";
+ } else {
+ _ "$cmd -o $iso .boot_iso";
+ }
_ "isohybrid -o 1 $iso";
rm_rf('.boot_iso');
}