Package: grub-common Version: 2.04-7 Severity: important Dear Maintainer,
I am trying to dual-boot Debian and FreeBSD. It seems update-grub ignores os- prober when adding options to the boot menu. FreeBSD is correctly detected by os-prober. ``` % sudo update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-5.6.0-1-amd64 Found initrd image: /boot/initrd.img-5.6.0-1-amd64 Found FreeBSD 13.0-CURRENT on /dev/sda6 Adding boot menu entry for EFI firmware configuration done ``` However, even after a 'grub-install', there is no FreeBSD menu entry in GRUB... I have already checked /etc/default/grub, and there is no mention to "GRUB_DISABLE_OS_PROBER"... ``` % more /etc/default/grub |grep DISABLE #GRUB_DISABLE_LINUX_UUID=true #GRUB_DISABLE_RECOVERY="true" ``` I have already read https://wiki.debian.org/Grub#Dual_Boot_FreeBSD_with_GPT_partition. However, I think that the manual modification of `/etc/grub.d/40_custom` specified there implies an unnecessary nuisance... Shouldn't dual boot functionality work 'out-of-the-box' for any detected other system? For instance, when a Microsoft Windows system is detected, it is added by default to the GRUB menu. Why not applying the same logic to FreeBSD? (or any other system) Thank you for considering my request, dear Maintainer. Sincerely, Leandro Doctors -- Package-specific info: *********************** BEGIN /proc/mounts /dev/mapper/debian-root / ext4 rw,relatime,errors=remount-ro 0 0 /dev/sda2 /boot ext4 rw,relatime 0 0 /dev/sda4 /home ext4 rw,relatime 0 0 /dev/sda1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0 /dev/mapper/debian-tmp /tmp ext4 rw,relatime 0 0 /dev/mapper/debian-var /var ext4 rw,relatime 0 0 *********************** END /proc/mounts *********************** BEGIN /boot/grub/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then set have_grubenv=true load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="0" fi if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } if [ x$feature_default_font_path = xy ] ; then font=unicode else insmod part_gpt insmod lvm insmod ext2 set root='lvmid/CE2WTY-k9fS-EGVC-HXzs-ikxS-yHeC-vwOV0w/gSSeTD-j1Tk-d1EP-nDMI-8u4p-mB9s-ie4m3m' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='lvmid/CE2WTY-k9fS-EGVC-HXzs-ikxS-yHeC-vwOV0w/gSSeTD-j1Tk-d1EP-nDMI-8u4p-mB9s-ie4m3m' 0bf5ca7c-3b95-4e98-9da0-b3c1582c1398 else search --no-floppy --fs-uuid --set=root 0bf5ca7c-3b95-4e98-9da0-b3c1582c1398 fi font="/usr/share/grub/unicode.pf2" fi if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_IE insmod gettext fi terminal_output gfxterm if [ "${recordfail}" = 1 ] ; then set timeout=30 else if [ x$feature_timeout_style = xy ] ; then set timeout_style=menu set timeout=2 # Fallback normal timeout code in case the timeout_style feature is # unavailable. else set timeout=2 fi fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### insmod part_gpt insmod lvm insmod ext2 set root='lvmid/CE2WTY-k9fS-EGVC-HXzs-ikxS-yHeC-vwOV0w/gSSeTD-j1Tk-d1EP-nDMI-8u4p-mB9s-ie4m3m' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='lvmid/CE2WTY-k9fS-EGVC-HXzs-ikxS-yHeC-vwOV0w/gSSeTD-j1Tk-d1EP-nDMI-8u4p-mB9s-ie4m3m' 0bf5ca7c-3b95-4e98-9da0-b3c1582c1398 else search --no-floppy --fs-uuid --set=root 0bf5ca7c-3b95-4e98-9da0-b3c1582c1398 fi insmod png if background_image /usr/share/desktop-base/futureprototype-theme/grub/grub-16x9.png; then set color_normal=white/black set color_highlight=black/white else set menu_color_normal=cyan/blue set menu_color_highlight=white/blue fi ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### function gfxmode { set gfxpayload="${1}" } set linux_gfx_mode= export linux_gfx_mode menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0bf5ca7c-3b95-4e98-9da0-b3c1582c1398' { load_video insmod gzio if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_gpt insmod ext2 set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7d7fca75-1d45-49b4-9258-99dedfb49fc6 else search --no-floppy --fs-uuid --set=root 7d7fca75-1d45-49b4-9258-99dedfb49fc6 fi echo 'Loading Linux 5.6.0-1-amd64 ...' linux /vmlinuz-5.6.0-1-amd64 root=/dev/mapper/debian-root ro quiet echo 'Loading initial ramdisk ...' initrd /initrd.img-5.6.0-1-amd64 } submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-0bf5ca7c-3b95-4e98-9da0-b3c1582c1398' { menuentry 'Debian GNU/Linux, with Linux 5.6.0-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.6.0-1-amd64-advanced-0bf5ca7c-3b95-4e98-9da0-b3c1582c1398' { load_video insmod gzio if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_gpt insmod ext2 set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7d7fca75-1d45-49b4-9258-99dedfb49fc6 else search --no-floppy --fs-uuid --set=root 7d7fca75-1d45-49b4-9258-99dedfb49fc6 fi echo 'Loading Linux 5.6.0-1-amd64 ...' linux /vmlinuz-5.6.0-1-amd64 root=/dev/mapper/debian-root ro quiet echo 'Loading initial ramdisk ...' initrd /initrd.img-5.6.0-1-amd64 } menuentry 'Debian GNU/Linux, with Linux 5.6.0-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.6.0-1-amd64-recovery-0bf5ca7c-3b95-4e98-9da0-b3c1582c1398' { load_video insmod gzio if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_gpt insmod ext2 set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7d7fca75-1d45-49b4-9258-99dedfb49fc6 else search --no-floppy --fs-uuid --set=root 7d7fca75-1d45-49b4-9258-99dedfb49fc6 fi echo 'Loading Linux 5.6.0-1-amd64 ...' linux /vmlinuz-5.6.0-1-amd64 root=/dev/mapper/debian-root ro single echo 'Loading initial ramdisk ...' initrd /initrd.img-5.6.0-1-amd64 } } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/30_os-prober ### ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/30_uefi-firmware ### menuentry 'System setup' $menuentry_id_option 'uefi-firmware' { fwsetup } ### END /etc/grub.d/30_uefi-firmware ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### *********************** END /boot/grub/grub.cfg *********************** BEGIN /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] unused devices: <none> *********************** END /proc/mdstat *********************** BEGIN LVM *********************** END LVM *********************** BEGIN /dev/disk/by-id total 0 lrwxrwxrwx 1 root root 9 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876 -> ../../sda lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part4 -> ../../sda4 lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part5 -> ../../sda5 lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part6 -> ../../sda6 lrwxrwxrwx 1 root root 10 May 13 21:52 ata-SAMSUNG_SSD_SM841N_mSATA_512GB_S1JZNYAF608876-part7 -> ../../sda7 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-name-debian-root -> ../../dm-0 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-name-debian-swap -> ../../dm-1 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-name-debian-tmp -> ../../dm-3 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-name-debian-var -> ../../dm-2 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-uuid-LVM-CE2WTYk9fSEGVCHXzsikxSyHeCvwOV0wDnTVKks4vL4TcpR5qBsbNoxa9VP2opSE -> ../../dm-1 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-uuid-LVM-CE2WTYk9fSEGVCHXzsikxSyHeCvwOV0wad7KYEf105PCJRp9jOCUzUnobsca8yQV -> ../../dm-2 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-uuid-LVM-CE2WTYk9fSEGVCHXzsikxSyHeCvwOV0wc34TtU78c5vJdl7oNQJ9F2mYXBrfLAHQ -> ../../dm-3 lrwxrwxrwx 1 root root 10 May 13 21:52 dm-uuid-LVM-CE2WTYk9fSEGVCHXzsikxSyHeCvwOV0wgSSeTDj1Tkd1EPnDMI8u4pmB9sie4m3m -> ../../dm-0 lrwxrwxrwx 1 root root 10 May 13 21:52 lvm-pv-uuid-MahmDQ-frLo-hE3P-eiQC-xQZo-3eDP-rSexy2 -> ../../sda3 lrwxrwxrwx 1 root root 9 May 13 21:52 wwn-0x50025385001fdd15 -> ../../sda lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part4 -> ../../sda4 lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part5 -> ../../sda5 lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part6 -> ../../sda6 lrwxrwxrwx 1 root root 10 May 13 21:52 wwn-0x50025385001fdd15-part7 -> ../../sda7 *********************** END /dev/disk/by-id *********************** BEGIN /dev/disk/by-uuid total 0 lrwxrwxrwx 1 root root 10 May 13 21:52 0bf5ca7c-3b95-4e98-9da0-b3c1582c1398 -> ../../dm-0 lrwxrwxrwx 1 root root 10 May 13 21:52 5b94c943-c68d-4a06-b735-da85645692a4 -> ../../sda4 lrwxrwxrwx 1 root root 10 May 13 21:52 5ebc8d2bee22b6c3 -> ../../sda6 lrwxrwxrwx 1 root root 10 May 13 21:52 765a9a13-5844-443b-992d-90f6787cb8b4 -> ../../dm-1 lrwxrwxrwx 1 root root 10 May 13 21:52 7d7fca75-1d45-49b4-9258-99dedfb49fc6 -> ../../sda2 lrwxrwxrwx 1 root root 10 May 13 21:52 92f21c45-9dcd-4377-acd5-8c6a40dabd30 -> ../../dm-3 lrwxrwxrwx 1 root root 10 May 13 21:52 C50C-E0C8 -> ../../sda1 lrwxrwxrwx 1 root root 10 May 13 21:52 F221-07F2 -> ../../sda5 lrwxrwxrwx 1 root root 10 May 13 21:52 e7b117d0-b915-47dc-a9ff-d7bad647ea96 -> ../../dm-2 *********************** END /dev/disk/by-uuid -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.6.0-1-amd64 (SMP w/8 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages grub-common depends on: ii gettext-base 0.19.8.1-10 ii libc6 2.30-7 ii libdevmapper1.02.1 2:1.02.167-1+b1 ii libefiboot1 37-2 ii libefivar1 37-2 ii libfreetype6 2.10.1-2 ii libfuse2 2.9.9-3 ii liblzma5 5.2.4-1+b1 Versions of packages grub-common recommends: ii os-prober 1.77 Versions of packages grub-common suggests: ii console-setup 1.195 ii desktop-base 10.0.3 pn grub-emu <none> pn multiboot-doc <none> pn xorriso <none> -- Configuration Files: /etc/grub.d/00_header changed: set -e prefix="/usr" exec_prefix="/usr" datarootdir="/usr/share" grub_lang=`echo $LANG | cut -d . -f 1` grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`" quick_boot="0" export TEXTDOMAIN=grub export TEXTDOMAINDIR="${datarootdir}/locale" . "$pkgdatadir/grub-mkconfig_lib" for i in ${GRUB_PRELOAD_MODULES} ; do echo "insmod $i" done if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi cat << EOF if [ -s \$prefix/grubenv ]; then set have_grubenv=true load_env fi EOF if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then cat <<EOF if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then set default="${GRUB_DEFAULT_BUTTON}" elif [ "\${next_entry}" ] ; then set default="\${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${GRUB_DEFAULT}" fi EOF else cat <<EOF if [ "\${next_entry}" ] ; then set default="\${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${GRUB_DEFAULT}" fi EOF fi cat <<EOF if [ x"\${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "\${prev_saved_entry}" ]; then set saved_entry="\${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "\${boot_once}" ]; then saved_entry="\${chosen}" save_env saved_entry fi } EOF if [ "$quick_boot" = 1 ]; then cat <<EOF function recordfail { set recordfail=1 EOF check_writable () { abstractions="$(grub-probe --target=abstraction "${grubdir}")" for abstraction in $abstractions; do case "$abstraction" in diskfilter | lvm) cat <<EOF # GRUB lacks write support for $abstraction, so recordfail support is disabled. EOF return 1 ;; esac done FS="$(grub-probe --target=fs "${grubdir}")" case "$FS" in btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs) cat <<EOF # GRUB lacks write support for $FS, so recordfail support is disabled. EOF return 1 ;; esac cat <<EOF if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi EOF } if ! check_writable; then recordfail_broken=1 fi cat <<EOF } EOF fi cat <<EOF function load_video { EOF if [ -n "${GRUB_VIDEO_BACKEND}" ]; then cat <<EOF insmod ${GRUB_VIDEO_BACKEND} EOF else cat <<EOF if [ x\$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi EOF fi cat <<EOF } EOF serial=0; gfxterm=0; for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do if [ xserial = "x$x" ]; then serial=1; fi if [ xgfxterm = "x$x" ]; then gfxterm=1; fi done if [ "x$serial" = x1 ]; then if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")" GRUB_SERIAL_COMMAND=serial fi echo "${GRUB_SERIAL_COMMAND}" fi if [ "x$gfxterm" = x1 ]; then if [ -n "$GRUB_FONT" ] ; then # Make the font accessible prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"` cat << EOF if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then EOF else for dir in "${pkgdatadir}" "`echo '/boot/grub' | sed "s,//*,/,g"`" /usr/share/grub ; do for basename in unicode unifont ascii; do path="${dir}/${basename}.pf2" if is_path_readable_by_grub "${path}" > /dev/null ; then font_path="${path}" else continue fi break 2 done done if [ -n "${font_path}" ] ; then cat << EOF if [ x\$feature_default_font_path = xy ] ; then font=unicode else EOF # Make the font accessible prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"` cat << EOF font="`make_system_path_relative_to_its_root "${font_path}"`" fi if loadfont \$font ; then EOF else cat << EOF if loadfont unicode ; then EOF fi fi cat << EOF set gfxmode=${GRUB_GFXMODE} load_video insmod gfxterm EOF if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "x" ]; then cat << EOF set locale_dir=\$prefix/locale set lang=${grub_lang} insmod gettext EOF fi cat <<EOF fi EOF fi case x${GRUB_TERMINAL_INPUT} in x) # Just use the native terminal ;; x*) cat << EOF terminal_input ${GRUB_TERMINAL_INPUT} EOF ;; esac case x${GRUB_TERMINAL_OUTPUT} in x) # Just use the native terminal ;; x*) cat << EOF terminal_output ${GRUB_TERMINAL_OUTPUT} EOF ;; esac if [ "x$gfxterm" = x1 ]; then if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \ && is_path_readable_by_grub "$GRUB_THEME"; then gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2 prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` cat << EOF insmod gfxmenu EOF themedir="`dirname "$GRUB_THEME"`" for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do if [ -f "$x" ]; then cat << EOF loadfont (\$root)`make_system_path_relative_to_its_root $x` EOF fi done if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then cat << EOF insmod jpeg EOF fi if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then cat << EOF insmod png EOF fi if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then cat << EOF insmod tga EOF fi cat << EOF set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME` export theme EOF elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \ && is_path_readable_by_grub "$GRUB_BACKGROUND"; then gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2 case "$GRUB_BACKGROUND" in *.png) reader=png ;; *.tga) reader=tga ;; *.jpg|*.jpeg) reader=jpeg ;; *) gettext "Unsupported image format" >&2; echo >&2; exit 1 ;; esac prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` cat << EOF insmod $reader background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"` EOF fi fi make_timeout () { cat << EOF if [ "\${recordfail}" = 1 ] ; then set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30} else EOF if [ "x${3}" != "x" ] ; then timeout="${2}" style="${3}" elif [ "x${1}" != "x" ] && \ ([ "$quick_boot" = 1 ] || [ "x${1}" != "x0" ]) ; then # Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme. timeout="${1}" if [ "x${2}" != "x0" ] ; then grub_warn "$(gettext "Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.")" fi if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then style="hidden" verbose= else style="countdown" verbose=" --verbose" fi else # No hidden timeout, so treat as GRUB_TIMEOUT_STYLE=menu timeout="${2}" style="menu" fi cat << EOF if [ x\$feature_timeout_style = xy ] ; then set timeout_style=${style} set timeout=${timeout} EOF if [ "x${style}" = "xmenu" ] ; then cat << EOF # Fallback normal timeout code in case the timeout_style feature is # unavailable. else set timeout=${timeout} EOF else cat << EOF # Fallback hidden-timeout code in case the timeout_style feature is # unavailable. elif sleep${verbose} --interruptible ${timeout} ; then set timeout=0 EOF fi cat << EOF fi fi EOF if [ "$recordfail_broken" = 1 ]; then cat << EOF if [ \$grub_platform = efi ]; then set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30} if [ x\$feature_timeout_style = xy ] ; then set timeout_style=menu fi fi EOF fi } if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then cat <<EOF if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then EOF make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}" echo else make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}" echo fi else make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}" fi if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then cat <<EOF cmosclean $GRUB_BUTTON_CMOS_ADDRESS EOF fi if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then echo "play ${GRUB_INIT_TUNE}" fi if [ "x${GRUB_BADRAM}" != "x" ] ; then echo "badram ${GRUB_BADRAM}" fi -- no debconf information