core/grub2/chakra_grub2_mkconfig_fixes.patch

116 lines
4.2 KiB
Diff
Raw Normal View History

diff -Naur a/util/grub-mkconfig.in b/util/grub-mkconfig.in
--- a/util/grub-mkconfig.in 2011-12-03 21:37:37.148786544 +0000
+++ b/util/grub-mkconfig.in 2011-12-03 21:37:48.445392013 +0000
@@ -252,6 +252,8 @@
GRUB_THEME \
GRUB_GFXPAYLOAD_LINUX \
GRUB_DISABLE_OS_PROBER \
+ GRUB_COLOR_NORMAL \
+ GRUB_COLOR_HIGHLIGHT \
GRUB_INIT_TUNE \
GRUB_SAVEDEFAULT \
GRUB_BADRAM
diff -Naur a/util/grub.d/00_header.in b/util/grub.d/00_header.in
--- a/util/grub.d/00_header.in 2011-12-03 21:37:37.148786544 +0000
+++ b/util/grub.d/00_header.in 2011-12-03 21:37:48.445392013 +0000
2011-06-12 21:55:37 +08:00
@@ -100,6 +100,14 @@
EOF
+if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
+ cat << EOF
+set menu_color_normal=$GRUB_COLOR_NORMAL
+set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
+
+EOF
+fi
+
serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
diff -Naur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
--- a/util/grub.d/10_linux.in 2011-12-03 21:37:37.148786544 +0000
+++ b/util/grub.d/10_linux.in 2011-12-03 21:40:36.621147593 +0000
2012-01-22 08:00:51 +08:00
@@ -31,8 +31,8 @@ CLASS="--class gnu-linux --class gnu --c
2011-08-08 19:29:08 +08:00
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
2011-06-12 21:55:37 +08:00
else
2011-08-08 19:29:08 +08:00
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
2012-01-22 08:00:51 +08:00
+ OS="${GRUB_DISTRIBUTOR} Linux"
2011-08-08 19:29:08 +08:00
+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | tr -d ' ') ${CLASS}"
2011-06-12 21:55:37 +08:00
fi
2011-08-08 19:29:08 +08:00
# loop-AES arranges things so that /dev/loop/X can be our root device, but
2012-01-23 02:28:21 +08:00
@@ -49,7 +49,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue"
|| uses_abstraction "${GRUB_DEVICE}" lvm; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
+ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
fi
if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
2012-01-22 10:36:58 +08:00
@@ -65,12 +65,19 @@ linux_entry ()
2011-06-12 21:55:37 +08:00
version="$2"
recovery="$3"
args="$4"
- if ${recovery} ; then
2012-01-22 08:00:51 +08:00
- title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
+ if [ "${version}" = "lts" ] ; then
+ _kernel=LTS
else
- title="$(gettext_quoted "%s, with Linux %s")"
+ _kernel=Standard
2012-01-22 10:36:58 +08:00
fi
- printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
2011-06-12 21:55:37 +08:00
+ if [ -n "$5" ] ; then
2012-01-22 08:17:55 +08:00
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel") $5"
2011-06-12 21:55:37 +08:00
+ elif ${recovery} ; then
2012-01-22 08:17:55 +08:00
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel (recovery mode)")"
2012-01-22 08:00:51 +08:00
+ else
2012-01-22 08:17:55 +08:00
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel")"
2012-01-22 10:36:58 +08:00
+ fi
+ printf "menuentry '${title}' ${CLASS} {\n" "${os}"
2012-01-22 08:00:51 +08:00
if ! ${recovery} ; then
2012-01-22 10:36:58 +08:00
save_default_entry | sed -e "s/^/\t/"
fi
2012-01-22 08:00:51 +08:00
@@ -132,7 +139,7 @@ EOF
2011-06-12 21:55:37 +08:00
case x`uname -m` in
xi?86 | xx86_64)
- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
2011-08-08 19:29:08 +08:00
+ list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* ; do
2011-06-12 21:55:37 +08:00
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done` ;;
*)
2012-01-22 08:00:51 +08:00
@@ -159,8 +166,11 @@ while [ "x$list" != "x" ] ; do
"initrd-${version}" "initramfs-${version}.img" \
2011-06-12 21:55:37 +08:00
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-linux-${version}" "initramfs-linux-${version}.img" \
+ "initramfs-linux-${alt_version}" "initramfs-linux-${alt_version}.img" \
2011-06-12 21:55:37 +08:00
"initramfs-genkernel-${version}" \
- "initramfs-genkernel-${alt_version}"; do
+ "initramfs-genkernel-${alt_version}" \
+ "${basename/vmlinuz/kernel}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
2012-01-22 08:00:51 +08:00
@@ -190,6 +200,15 @@ while [ "x$list" != "x" ] ; do
2011-06-12 21:55:37 +08:00
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
2011-08-08 19:29:08 +08:00
+ for i in "initramfs-${version}-fallback.img" \
2012-01-22 08:00:51 +08:00
+ "initramfs-linux-${alt_version}-fallback.img"; do
2011-08-08 19:29:08 +08:00
+ if test -e "${dirname}/${i}"; then
+ initrd="$i"
+ linux_entry "${OS}" "${version}" true \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" Fallback
+ break
+ fi
+ done
2011-06-12 21:55:37 +08:00
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"