diff --git a/bin/fai-cd b/bin/fai-cd index 9326c75bd..135b5f44c 100755 --- a/bin/fai-cd +++ b/bin/fai-cd @@ -189,9 +189,14 @@ create_squashfs_image() { create_grub2_image() { mkdir -p $tmp/boot + # Needs 'grub2-common' and 'fonts-dejavu-core' packages. + grub-mkfont -s 16 -o "$tmp/DejaVuSansMono.pf2" /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf if [ -d $NFSROOT/usr/lib/grub/x86_64-efi ]; then cp $grub_config $NFSROOT/tmp/grub.cfg + # Needs 'desktop-base' package. + cp /usr/share/images/desktop-base/desktop-grub.png $NFSROOT/tmp/background.png + # insert date into grub menu perl -pi -e "s/_VERSIONSTRING_/ $isoversion /" $NFSROOT/tmp/grub.cfg if [ -n "$config_space" ] || [ $configset -eq 1 ]; then @@ -202,10 +207,13 @@ create_grub2_image() { --format=x86_64-efi \ --output=/tmp/bootx64.efi \ --locales="" --fonts="" \ - "boot/grub/grub.cfg=/tmp/grub.cfg" + "boot/grub/grub.cfg=/tmp/grub.cfg" \ + "boot/grub/background.png=/tmp/background.png" \ + "boot/grub/DejaVuSansMono.pf2=/tmp/DejaVuSansMono.pf2" + mv $NFSROOT/tmp/bootx64.efi $scratch - dd if=/dev/zero of=$scratch/efiboot.img bs=1M count=3 2>/dev/null + dd if=/dev/zero of=$scratch/efiboot.img bs=1M count=5 2>/dev/null mkfs.vfat $scratch/efiboot.img mmd -i $scratch/efiboot.img efi efi/boot mcopy -i $scratch/efiboot.img $scratch/bootx64.efi ::efi/boot/ @@ -217,9 +225,11 @@ create_grub2_image() { --format=i386-pc \ --output=/tmp/core.img \ --locales="" --fonts="" \ - --install-modules="linux normal iso9660 biosdisk memdisk search ls echo test chain msdospart part_msdos part_gpt minicmd ext2 keystatus all_video font sleep gfxterm regexp" \ + --install-modules="linux normal iso9660 biosdisk memdisk search ls echo test chain msdospart part_msdos part_gpt minicmd ext2 keystatus all_video font sleep gfxterm gfxterm_background png regexp" \ --modules="linux normal iso9660 biosdisk search" \ - "boot/grub/grub.cfg=/tmp/grub.cfg" + "boot/grub/grub.cfg=/tmp/grub.cfg" \ + "boot/grub/background.png=/tmp/background.png" \ + "boot/grub/DejaVuSansMono.pf2=/tmp/DejaVuSansMono.pf2" cat $NFSROOT/usr/lib/grub/i386-pc/cdboot.img $NFSROOT/tmp/core.img > $scratch/bios.img rm $NFSROOT/tmp/core.img else