atratsevskiy
Mike Hiretsky 14 years ago
parent 296903b599
commit 93ac25d941

@ -1,6 +1,6 @@
AUX defaults 1019 RMD160 ac86956eec27bfb7f02564b94b387cda3c9fb2a5 SHA1 108b4b0aa3fb2a50c9aa6d20e4fb7c239f35feb1 SHA256 70031c9dd25afb304b5206d135292af0fe33f71e82b8bc49dae9264e177b8c40
AUX grub-1.99-chroot.patch 7430 RMD160 6f01cae9e7a89445705a9ac2c368e3905d26492a SHA1 45579618642a2c57bfb726c01e1341ae628e12c3 SHA256 8dde001253e53bf9d8ad729f5b6241432900206cdd2ab17c43a8ee465ea9cf2e
AUX grub-1.99-lvm_mapper.patch 7951 RMD160 b87e9f86f44f2c146dd2757876853115835cc435 SHA1 5b928d68c821c661b071b50664031bfb0d29689e SHA256 c7cc775bdec185382f075968f2159cc8eb13bf36a78d98f7cccf80f910c808c6
AUX grub-1.99-lvm_mapper.patch 1012 RMD160 172b26f017765ce72b2266942544f6a2198ca13b SHA1 2380431c33fea1099aa62bb81428cf137c54603f SHA256 828b25d9f58baf156240b4e3da7a8c8b8a9db74219115b70f200d4ee6f2ac819
AUX grub.conf.gentoo 627 RMD160 d90fb4373bad476f98ec9c5065d6cdfd9e3b706f SHA1 004f2fc04605ec9190de0a87e7df8bbc33daff89 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776
DIST grub-1.99.tar.gz 4652619 RMD160 63293381ac2ed2479ac65896d4744b866e6d216c SHA1 6d0536da38224e7caf94cf2531a5f921ac057b9b SHA256 b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff
EBUILD grub-1.99-r1.ebuild 2797 RMD160 24fecf3fe4bf0576c656d9a4deba2bce83c03c7e SHA1 40ef7b3d73b397257fd6ea128630858281c19289 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8

@ -1,5 +1,11 @@
commit d0868853121fa1110949125e9015caae16325d03
Author: Mike Hiretsky <mh@calculate.ru>
Date: Tue Jul 26 18:20:55 2011 +0400
Fix detect filesystem for lvm.
diff --git a/util/grub-install.in b/util/grub-install.in
index ff8bea8..7ebbb50 100644
index 16236ba..7ebbb50 100644
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -466,6 +466,10 @@ fi
@ -13,163 +19,3 @@ index ff8bea8..7ebbb50 100644
echo "Auto-detection of a filesystem of ${grub_device} failed." 1>&2
echo "Try with --recheck." 1>&2
echo "If the problem persists please report this together with the output of \"$grub_probe --device-map=\"${device_map}\" --target=fs -v ${grubdir}\" to <bug-grub@gnu.org>" 1>&2
@@ -580,6 +584,8 @@ fi
# Perform the platform-dependent install
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
+ # sync filesystem before grub_setup
+ sync
# Now perform the installation.
"$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} --directory="${grubdir}" \
--device-map="${device_map}" "${install_device}" || exit 1
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index afc66f8..1586ad7 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -141,19 +141,19 @@ if test -e ${GRUB_PREFIX}/device.map ; then : ; else
fi
# Device containing our userland. Typically used for root= parameter.
-GRUB_DEVICE="`${grub_probe} --target=device /`"
+GRUB_DEVICE="`${grub_probe} --target=device /${CHROOT_PATH#/}`"
GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
-GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
+GRUB_DEVICE_BOOT="`${grub_probe} --target=device ${CHROOT_PATH%/}/boot`"
GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
# Filesystem for the device containing our userland. Used for stuff like
# choosing Hurd filesystem module.
GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
-if test -f ${sysconfdir}/default/grub ; then
- . ${sysconfdir}/default/grub
+if test -f ${CHROOT_PATH}${sysconfdir}/default/grub ; then
+ . ${CHROOT_PATH}${sysconfdir}/default/grub
fi
# XXX: should this be deprecated at some point?
@@ -171,7 +171,7 @@ fi
for x in ${GRUB_TERMINAL_OUTPUT}; do
if [ "x${x}" = "xgfxterm" ]; then
if [ -n "$GRUB_FONT" ] ; then
- if is_path_readable_by_grub ${GRUB_FONT} > /dev/null ; then
+ if is_path_readable_by_grub ${CHROOT_PATH%/}${GRUB_FONT} > /dev/null ; then
GRUB_FONT_PATH=${GRUB_FONT}
else
echo "No such font or not readable by grub: ${GRUB_FONT}" >&2
@@ -181,7 +181,7 @@ for x in ${GRUB_TERMINAL_OUTPUT}; do
for dir in ${pkgdatadir} ${GRUB_PREFIX} /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
+ if is_path_readable_by_grub ${CHROOT_PATH%/}${path} > /dev/null ; then
GRUB_FONT_PATH=${path}
else
continue
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index 9da1511..5d54f1c 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -125,7 +125,7 @@ fi
if [ "x$gfxterm" = x1 ]; then
# Make the font accessible
- prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`
+ prepare_grub_to_access_device `${grub_probe} --target=device "${CHROOT_PATH%/}${GRUB_FONT_PATH}"`
cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
@@ -136,7 +136,7 @@ EOF
# Gettext variables and module
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
- prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/ /"
+ prepare_grub_to_access_device $(${grub_probe} --target=device ${CHROOT_PATH%/}${locale_dir}) | sed -e "s/^/ /"
cat << EOF
set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
set lang=${grub_lang}
@@ -175,7 +175,7 @@ if [ "x$gfxterm" = x1 ]; then
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
&& is_path_readable_by_grub "$GRUB_THEME"; then
echo "Found theme: $GRUB_THEME" >&2
- prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
+ prepare_grub_to_access_device `${grub_probe} --target=device "${CHROOT_PATH%/}$GRUB_THEME"`
cat << EOF
insmod gfxmenu
EOF
@@ -206,8 +206,8 @@ EOF
cat << EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
EOF
- elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
- && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
+ elif [ "x${CHROOT_PATH}$GRUB_BACKGROUND" != x ] && [ -f "${CHROOT_PATH%/}$GRUB_BACKGROUND" ] \
+ && is_path_readable_by_grub "${CHROOT_PATH%/}$GRUB_BACKGROUND"; then
echo "Found background: $GRUB_BACKGROUND" >&2
case "$GRUB_BACKGROUND" in
*.png) reader=png ;;
@@ -215,7 +215,7 @@ EOF
*.jpg|*.jpeg) reader=jpeg ;;
*) echo "Unsupported image format" >&2; exit 1 ;;
esac
- prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
+ prepare_grub_to_access_device `${grub_probe} --target=device "${CHROOT_PATH%/}$GRUB_BACKGROUND"`
cat << EOF
insmod $reader
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 1d1eb40..505aac6 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -31,7 +31,7 @@ CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
fi
@@ -132,12 +132,18 @@ EOF
case x`uname -m` in
xi?86 | xx86_64)
- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+ list=`for i in ${CHROOT_PATH%/}/boot/vmlinuz-* \
+ ${CHROOT_PATH%/}/vmlinuz-* \
+ ${CHROOT_PATH%/}/boot/kernel-* ; do
+ if grub_file_is_not_garbage "$i" && ! [[ -L $i ]] ; then echo -n "$i " ; fi
done` ;;
*)
- list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+ list=`for i in ${CHROOT_PATH%/}/boot/vmlinuz-* \
+ ${CHROOT_PATH%/}/boot/vmlinux-* \
+ ${CHROOT_PATH%/}/vmlinuz-* \
+ ${CHROOT_PATH%/}/vmlinux-* \
+ ${CHROOT_PATH%/}/boot/kernel-* ; do
+ if grub_file_is_not_garbage "$i" && ! [[ -L $i ]] ; then echo -n "$i " ; fi
done` ;;
esac
@@ -150,6 +156,7 @@ while [ "x$list" != "x" ] ; do
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
+ rel_dirname=${rel_dirname#/workspace}
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
@@ -160,7 +167,8 @@ while [ "x$list" != "x" ] ; do
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
- "initramfs-genkernel-${alt_version}"; do
+ "initramfs-genkernel-${alt_version}" \
+ "initramfs-${version}"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break

Loading…
Cancel
Save