mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
more grub2 changes for beta0
This commit is contained in:
parent
620b9b8e35
commit
6edc93a3ea
8 changed files with 127 additions and 71 deletions
|
@ -2,15 +2,14 @@
|
||||||
|
|
||||||
build ()
|
build ()
|
||||||
{
|
{
|
||||||
BINARIES="/usr/bin/grub-editenv /usr/bin/grub-fstest /usr/bin/grub-menulst2cfg /usr/bin/grub-mkfont /usr/bin/grub-mkimage /usr/bin/grub-mklayout /usr/bin/grub-mkpasswd-pbkdf2 /usr/bin/grub-mkrelpath /usr/bin/grub-mount /usr/bin/grub-script-check /usr/sbin/grub-probe /usr/sbin/grub-setup"
|
BINARIES="/usr/bin/grub-editenv /usr/bin/grub-fstest /usr/bin/grub-menulst2cfg /usr/bin/grub-mkfont /usr/bin/grub-mkimage /usr/bin/grub-mklayout /usr/bin/grub-mkpasswd-pbkdf2 /usr/bin/grub-mkrelpath /usr/bin/grub-mount /usr/bin/grub-ntldr-img /usr/bin/grub-script-check /usr/sbin/grub-bios-setup /usr/sbin/grub-ofpathname /usr/sbin/grub-probe"
|
||||||
FILES="/usr/bin/grub-kbdcomp /usr/bin/grub-mkrescue /usr/bin/grub-mkstandalone /usr/sbin/grub_bios-install /usr/sbin/grub_efi_x86_64-install /usr/sbin/grub-install /usr/sbin/grub-mkconfig /usr/sbin/grub-mknetdir /usr/sbin/grub-reboot /usr/sbin/grub-set-default"
|
FILES="/usr/bin/grub-kbdcomp /usr/bin/grub-mkrescue /usr/bin/grub-mkstandalone /usr/sbin/grub-install /usr/sbin/grub-mkconfig /usr/sbin/grub-mknetdir /usr/sbin/grub-reboot /usr/sbin/grub-set-default"
|
||||||
|
|
||||||
## add grub2 config file
|
## add grub2 config file
|
||||||
add_file "/boot/grub/grub.cfg"
|
add_file "/boot/grub/grub.cfg"
|
||||||
|
|
||||||
## add grub-mkconfig helper scripts
|
## add grub-mkconfig helper scripts
|
||||||
add_file "/usr/lib/grub/grub-mkconfig_lib"
|
add_file "/usr/share/grub/grub-mkconfig_lib"
|
||||||
add_file "/usr/lib/grub/update-grub_lib"
|
|
||||||
add_file "/etc/default/grub"
|
add_file "/etc/default/grub"
|
||||||
|
|
||||||
for i in $(find /etc/grub.d/* ! -type d); do
|
for i in $(find /etc/grub.d/* ! -type d); do
|
||||||
|
|
|
@ -283,7 +283,8 @@ _prepare_grub2_uefi_iso_files() {
|
||||||
umount "${grub2_uefi_mp}"
|
umount "${grub2_uefi_mp}"
|
||||||
losetup --detach "${LOOP_DEVICE}"
|
losetup --detach "${LOOP_DEVICE}"
|
||||||
|
|
||||||
cp "/usr/share/grub/unicode.pf2" "${ALLINONE}/efi/grub2/"
|
mkdir -p "${ALLINONE}/efi/grub2/fonts"
|
||||||
|
cp "/usr/share/grub/unicode.pf2" "${ALLINONE}/efi/grub2/fonts/"
|
||||||
|
|
||||||
mkdir -p "${ALLINONE}/efi/grub2/locale/"
|
mkdir -p "${ALLINONE}/efi/grub2/locale/"
|
||||||
|
|
||||||
|
@ -331,16 +332,20 @@ set pager="1"
|
||||||
|
|
||||||
set locale_dir="(\${archboot})/efi/grub2/locale"
|
set locale_dir="(\${archboot})/efi/grub2/locale"
|
||||||
|
|
||||||
if [ "\${grub_platform}" == "efi" ]; then
|
if [ -e "\${prefix}/\${grub_cpu}-\${grub_platform}/all_video.mod" ]; then
|
||||||
|
insmod all_video
|
||||||
|
else
|
||||||
insmod efi_gop
|
insmod efi_gop
|
||||||
insmod efi_uga
|
insmod efi_uga
|
||||||
|
# insmod vbe
|
||||||
|
# insmod vga
|
||||||
insmod video_bochs
|
insmod video_bochs
|
||||||
insmod video_cirrus
|
insmod video_cirrus
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insmod font
|
insmod font
|
||||||
|
|
||||||
if loadfont "(\${archboot})/efi/grub2/unicode.pf2" ; then
|
if loadfont "(\${archboot})/efi/grub2/fonts/unicode.pf2" ; then
|
||||||
insmod gfxterm
|
insmod gfxterm
|
||||||
set gfxmode="auto"
|
set gfxmode="auto"
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,8 @@ _update_grub2_uefi_iso_files() {
|
||||||
rm -f "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2//efi/grub2/grub_standalone_archboot.cfg" || true
|
rm -f "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2//efi/grub2/grub_standalone_archboot.cfg" || true
|
||||||
echo
|
echo
|
||||||
|
|
||||||
cp "/usr/share/grub/unicode.pf2" "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/"
|
mkdir -p "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/fonts/"
|
||||||
|
cp "/usr/share/grub/unicode.pf2" "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/fonts/"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
rm -rf "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/locale/" || true
|
rm -rf "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/locale/" || true
|
||||||
|
@ -418,16 +419,20 @@ set pager="1"
|
||||||
|
|
||||||
set locale_dir="(\${archboot})/efi/grub2/locale"
|
set locale_dir="(\${archboot})/efi/grub2/locale"
|
||||||
|
|
||||||
if [ "\${grub_platform}" == "efi" ]; then
|
if [ -e "\${prefix}/\${grub_cpu}-\${grub_platform}/all_video.mod" ]; then
|
||||||
|
insmod all_video
|
||||||
|
else
|
||||||
insmod efi_gop
|
insmod efi_gop
|
||||||
insmod efi_uga
|
insmod efi_uga
|
||||||
|
# insmod vbe
|
||||||
|
# insmod vga
|
||||||
insmod video_bochs
|
insmod video_bochs
|
||||||
insmod video_cirrus
|
insmod video_cirrus
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insmod font
|
insmod font
|
||||||
|
|
||||||
if loadfont "(\${archboot})/efi/grub2/unicode.pf2" ; then
|
if loadfont "(\${archboot})/efi/grub2/fonts/unicode.pf2" ; then
|
||||||
insmod gfxterm
|
insmod gfxterm
|
||||||
set gfxmode="auto"
|
set gfxmode="auto"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ GRUB_CMDLINE_LINUX=""
|
||||||
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
|
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
|
||||||
|
|
||||||
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
|
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
|
||||||
GRUB_HIDDEN_TIMEOUT=5
|
#GRUB_HIDDEN_TIMEOUT=5
|
||||||
#GRUB_HIDDEN_TIMEOUT_QUIET=true
|
#GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||||
|
|
||||||
# Uncomment to use basic console
|
# Uncomment to use basic console
|
||||||
|
@ -34,8 +34,8 @@ GRUB_DISABLE_RECOVERY=true
|
||||||
|
|
||||||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
||||||
# modes only. Entries specified as foreground/background.
|
# modes only. Entries specified as foreground/background.
|
||||||
GRUB_COLOR_NORMAL="light-blue/black"
|
#GRUB_COLOR_NORMAL="light-blue/black"
|
||||||
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
||||||
|
|
||||||
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
|
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
|
||||||
#GRUB_BACKGROUND="/path/to/wallpaper"
|
#GRUB_BACKGROUND="/path/to/wallpaper"
|
||||||
|
|
|
@ -22,7 +22,6 @@ transform="s&^&&"
|
||||||
prefix="/usr"
|
prefix="/usr"
|
||||||
exec_prefix="${prefix}"
|
exec_prefix="${prefix}"
|
||||||
datarootdir="/usr/share"
|
datarootdir="/usr/share"
|
||||||
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
|
|
||||||
grub_lang=`echo $LANG | cut -d . -f 1`
|
grub_lang=`echo $LANG | cut -d . -f 1`
|
||||||
|
|
||||||
. "${datarootdir}/grub/grub-mkconfig_lib"
|
. "${datarootdir}/grub/grub-mkconfig_lib"
|
||||||
|
@ -83,28 +82,21 @@ if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
|
||||||
insmod ${GRUB_VIDEO_BACKEND}
|
insmod ${GRUB_VIDEO_BACKEND}
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
# Insert all available backends; GRUB will use the most appropriate.
|
# If all_video.mod isn't available load all modules available
|
||||||
have_video=0;
|
# with versions prior to introduction of all_video.mod
|
||||||
for modinfo in $(ls "${GRUB_PREFIX}"/*/modinfo.sh) ; do
|
cat <<EOF
|
||||||
. "${modinfo}"
|
if [ x\$feature_all_video_module = xy ]; then
|
||||||
cat <<EOF
|
insmod all_video
|
||||||
if [ "\${grub_platform}" == "${grub_modinfo_platform}" ]; then
|
else
|
||||||
EOF
|
insmod efi_gop
|
||||||
video_lst="$(echo ${modinfo} | sed 's|modinfo.sh||g')/video.lst"
|
insmod efi_uga
|
||||||
for backend in $(cat "${video_lst}"); do
|
insmod ieee1275_fb
|
||||||
have_video=1;
|
insmod vbe
|
||||||
cat <<EOF
|
insmod vga
|
||||||
insmod ${backend}
|
insmod video_bochs
|
||||||
EOF
|
insmod video_cirrus
|
||||||
done
|
|
||||||
cat <<EOF
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
done
|
|
||||||
if [ x$have_video = x0 ]; then
|
|
||||||
echo "true"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
}
|
}
|
||||||
|
@ -131,10 +123,6 @@ for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "x$serial" = x1 ]; then
|
if [ "x$serial" = x1 ]; then
|
||||||
if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
|
|
||||||
gettext "Serial terminal not available on this platform." >&2 ; echo >&2; exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; 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_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
|
||||||
GRUB_SERIAL_COMMAND=serial
|
GRUB_SERIAL_COMMAND=serial
|
||||||
|
@ -143,21 +131,55 @@ if [ "x$serial" = x1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$gfxterm" = x1 ]; then
|
if [ "x$gfxterm" = x1 ]; then
|
||||||
# Make the font accessible
|
if [ -n "$GRUB_FONT" ] ; then
|
||||||
prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`
|
# 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
|
cat << EOF
|
||||||
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
|
|
||||||
set gfxmode=${GRUB_GFXMODE}
|
set gfxmode=${GRUB_GFXMODE}
|
||||||
load_video
|
load_video
|
||||||
insmod gfxterm
|
insmod gfxterm
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Gettext variables and module
|
# Gettext variables and module
|
||||||
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
|
if [ "x${LANG}" != "xC" ] ; then
|
||||||
prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/ /"
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
|
set locale_dir=\$prefix/locale
|
||||||
set lang=${grub_lang}
|
set lang=${grub_lang}
|
||||||
insmod gettext
|
insmod gettext
|
||||||
EOF
|
EOF
|
||||||
|
@ -225,6 +247,7 @@ EOF
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
|
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
|
||||||
|
export theme
|
||||||
EOF
|
EOF
|
||||||
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
|
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
|
||||||
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then
|
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then
|
||||||
|
|
|
@ -51,13 +51,20 @@ else
|
||||||
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
|
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
|
GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`"
|
||||||
rootsubvol="`make_system_path_relative_to_its_root /`"
|
|
||||||
rootsubvol="${rootsubvol#/}"
|
case x"$GRUBFS" in
|
||||||
if [ "x${rootsubvol}" != x ]; then
|
xbtrfs)
|
||||||
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
|
rootsubvol="`make_system_path_relative_to_its_root /`"
|
||||||
fi
|
rootsubvol="${rootsubvol#/}"
|
||||||
fi
|
if [ "x${rootsubvol}" != x ]; then
|
||||||
|
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
|
||||||
|
fi;;
|
||||||
|
xzfs)
|
||||||
|
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
|
||||||
|
LINUX_ROOT_DEVICE="ZFS=${RPOOL}${bootfs}"
|
||||||
|
GRUB_CMDLINE_LINUX="boot=zfs rpool=${RPOOL} bootfs=${RPOOL}${bootfs} ${cmdline} ${GRUB_CMDLINE_LINUX}";;
|
||||||
|
esac
|
||||||
|
|
||||||
linux_entry ()
|
linux_entry ()
|
||||||
{
|
{
|
||||||
|
@ -123,6 +130,7 @@ EOF
|
||||||
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||||
EOF
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
|
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
||||||
message="$(gettext_printf "Loading initial ramdisk ...")"
|
message="$(gettext_printf "Loading initial ramdisk ...")"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo '$message'
|
echo '$message'
|
||||||
|
@ -190,7 +198,7 @@ while [ "x$list" != "x" ] ; do
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
|
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
|
||||||
elif test -z "${initramfs}" ; then
|
elif test -z "${initramfs}" ; then
|
||||||
# "UUID=" magic is parsed by initrd or initramfs. Since there's
|
# "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
|
||||||
# no initrd or builtin initramfs, it can't work here.
|
# no initrd or builtin initramfs, it can't work here.
|
||||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -59,13 +59,20 @@ if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
|
||||||
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
|
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
|
GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`"
|
||||||
rootsubvol="`make_system_path_relative_to_its_root /`"
|
|
||||||
rootsubvol="${rootsubvol#/}"
|
case x"$GRUBFS" in
|
||||||
if [ "x${rootsubvol}" != x ]; then
|
xbtrfs)
|
||||||
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
|
rootsubvol="`make_system_path_relative_to_its_root /`"
|
||||||
fi
|
rootsubvol="${rootsubvol#/}"
|
||||||
fi
|
if [ "x${rootsubvol}" != x ]; then
|
||||||
|
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
|
||||||
|
fi;;
|
||||||
|
xzfs)
|
||||||
|
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
|
||||||
|
LINUX_ROOT_DEVICE="ZFS=${RPOOL}${bootfs}"
|
||||||
|
GRUB_CMDLINE_LINUX="boot=zfs rpool=${RPOOL} bootfs=${RPOOL}${bootfs} ${cmdline} ${GRUB_CMDLINE_LINUX}";;
|
||||||
|
esac
|
||||||
|
|
||||||
linux_entry ()
|
linux_entry ()
|
||||||
{
|
{
|
||||||
|
@ -98,6 +105,7 @@ linux_entry ()
|
||||||
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
|
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
|
||||||
EOF
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
|
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
||||||
message="$(gettext_printf "Loading initial ramdisk ...")"
|
message="$(gettext_printf "Loading initial ramdisk ...")"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo '$message'
|
echo '$message'
|
||||||
|
|
|
@ -3950,14 +3950,11 @@ EOF
|
||||||
|
|
||||||
cat << EOF >> "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg"
|
cat << EOF >> "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg"
|
||||||
|
|
||||||
if [ "\${grub_platform}" == "efi" ]; then
|
if [ -e "\${prefix}/\${grub_cpu}-\${grub_platform}/all_video.mod" ]; then
|
||||||
|
insmod all_video
|
||||||
|
else
|
||||||
insmod efi_gop
|
insmod efi_gop
|
||||||
insmod efi_uga
|
insmod efi_uga
|
||||||
insmod video_bochs
|
|
||||||
insmod video_cirrus
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "\${grub_platform}" == "pc" ]; then
|
|
||||||
insmod vbe
|
insmod vbe
|
||||||
insmod vga
|
insmod vga
|
||||||
insmod video_bochs
|
insmod video_bochs
|
||||||
|
@ -3976,7 +3973,7 @@ else
|
||||||
set _fontfile="(\${root_part})/usr/share/grub/unicode.pf2"
|
set _fontfile="(\${root_part})/usr/share/grub/unicode.pf2"
|
||||||
else
|
else
|
||||||
if [ -e "\${prefix}/unicode.pf2" ]; then
|
if [ -e "\${prefix}/unicode.pf2" ]; then
|
||||||
set _fontfile="\${prefix}/unicode.pf2"
|
set _fontfile="\${prefix}/fonts/unicode.pf2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -4269,7 +4266,15 @@ dogrub2_bios() {
|
||||||
# freeze and unfreeze xfs filesystems to enable grub2 installation on xfs filesystems
|
# freeze and unfreeze xfs filesystems to enable grub2 installation on xfs filesystems
|
||||||
freeze_xfs
|
freeze_xfs
|
||||||
chroot_mount
|
chroot_mount
|
||||||
chroot "${DESTDIR}" /usr/sbin/grub_bios-install --boot-directory="/boot" --no-floppy --recheck "${bootdev}" >> /tmp/grub2.log
|
|
||||||
|
chroot "${DESTDIR}" "/usr/sbin/grub-install" \
|
||||||
|
--directory="/usr/lib/grub/i386-pc" \
|
||||||
|
--target="i386-pc" \
|
||||||
|
--boot-directory="/boot" \
|
||||||
|
--no-floppy \
|
||||||
|
--recheck \
|
||||||
|
"${bootdev}" >> "/tmp/grub2_bios.log"
|
||||||
|
|
||||||
chroot_umount
|
chroot_umount
|
||||||
cat /tmp/grub2.log > "${LOG}"
|
cat /tmp/grub2.log > "${LOG}"
|
||||||
|
|
||||||
|
@ -4410,11 +4415,14 @@ dogrub2_uefi_common() {
|
||||||
|
|
||||||
chroot_mount
|
chroot_mount
|
||||||
|
|
||||||
chroot "${DESTDIR}" "/usr/sbin/grub_efi_${UEFI_ARCH}-install" \
|
chroot "${DESTDIR}" "/usr/sbin/grub-install" \
|
||||||
|
--directory="/usr/lib/grub/${UEFI_ARCH}-efi" \
|
||||||
|
--target="${UEFI_ARCH}-efi" \
|
||||||
--root-directory="/boot/efi" \
|
--root-directory="/boot/efi" \
|
||||||
--bootloader-id="arch_grub" \
|
--bootloader-id="arch_grub" \
|
||||||
--boot-directory="/boot" \
|
--boot-directory="/boot" \
|
||||||
--no-floppy --recheck >> "/tmp/grub2_${UEFI_ARCH}_uefi.log"
|
--no-floppy \
|
||||||
|
--recheck >> "/tmp/grub2_uefi_${UEFI_ARCH}.log"
|
||||||
|
|
||||||
chroot_umount
|
chroot_umount
|
||||||
|
|
||||||
|
@ -4483,9 +4491,9 @@ EOF
|
||||||
|
|
||||||
[[ -e "${DESTDIR}/boot/grub/grub.cfg.save" ]] && mv "${DESTDIR}/boot/grub/grub.cfg.save" "${DESTDIR}/boot/grub/grub.cfg"
|
[[ -e "${DESTDIR}/boot/grub/grub.cfg.save" ]] && mv "${DESTDIR}/boot/grub/grub.cfg.save" "${DESTDIR}/boot/grub/grub.cfg"
|
||||||
|
|
||||||
cat "/tmp/grub2_${UEFI_ARCH}_uefi.log" > "${LOG}"
|
cat "/tmp/grub2_uefi_${UEFI_ARCH}.log" > "${LOG}"
|
||||||
|
|
||||||
if ! [[ -s "/tmp/grub2_${UEFI_ARCH}_uefi.log" ]]; then
|
if ! [[ -s "/tmp/grub2_uefi_${UEFI_ARCH}.log" ]]; then
|
||||||
DIALOG --msgbox "Error installing GRUB2.\n\nYou probably need to install it manually by chrooting into ${DESTDIR}.\nDon't forget to bind /dev, /sys and /proc into ${DESTDIR} before chrooting." 0 0
|
DIALOG --msgbox "Error installing GRUB2.\n\nYou probably need to install it manually by chrooting into ${DESTDIR}.\nDon't forget to bind /dev, /sys and /proc into ${DESTDIR} before chrooting." 0 0
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue