Control: tag -1 patch * Steve Graham <[email protected]> [2014-08-16 13:27 +0100]:
> I also have a system with no LVM requirement.
>
> The lines "/proc/devices: No entry for device-mapper found" are emitted by
> grub-probe. In general, the grub scripts redirect grub-probe's stderr to
> /dev/null to suppress these, but the subroutines in
> /usr/share/grub/grub-mkconfig_lib aren't completely consistent in doing so.
>
> I quickly hacked /usr/share/grub/grub-mkconfig_lib to add the redirection on
> every invocation of grub-probe and the messages have gone away.
>
> For example, the original line
> partmap="`"${grub_probe}" --device $@ --target=partmap`"
> was changed to
> partmap="`"${grub_probe}" --device $@ --target=partmap`" 2> /dev/null
>
> (I'm not supplying an actual diff because I haven't checked the full logic
> and may have broken something. It was just a quick experiment.)
Attached patch I've successfully tested on i386_soft-raid,
amd64_one-disk, amd64_LVM_soft-raid and ppc_one-disk
Elimar
--
Learned men are the cisterns of knowledge,
not the fountainheads ;-)
--- grub-mkconfig_lib.orig 2014-12-14 11:07:59.045290582 +0100
+++ grub-mkconfig_lib 2014-12-14 11:14:01.040853930 +0100
@@ -68,7 +68,7 @@
# ... or if we can't figure out the abstraction module, for example if
# memberlist fails on an LVM volume group.
- if abstractions="`"${grub_probe}" -t abstraction "$path"`" 2> /dev/null ; then
+ if abstractions="`"${grub_probe}" -t abstraction "$path" 2> /dev/null`"; then
:
else
return 1
@@ -98,7 +98,7 @@
return 1
fi
- if drive="`"${grub_probe}" -t drive "$path"`" ; then : ; else
+ if drive="`"${grub_probe}" -t drive "$path" 2> /dev/null`" ; then : ; else
return 1
fi
@@ -123,7 +123,7 @@
old_ifs="$IFS"
IFS='
'
- partmap="`"${grub_probe}" --device $@ --target=partmap`"
+ partmap="`"${grub_probe}" --device $@ --target=partmap 2> /dev/null`"
for module in ${partmap} ; do
case "${module}" in
netbsd | openbsd)
@@ -150,12 +150,12 @@
esac
# Abstraction modules aren't auto-loaded.
- abstraction="`"${grub_probe}" --device $@ --target=abstraction`"
+ abstraction="`"${grub_probe}" --device $@ --target=abstraction 2> /dev/null`"
for module in ${abstraction} ; do
echo "insmod ${module}"
done
- fs="`"${grub_probe}" --device $@ --target=fs`"
+ fs="`"${grub_probe}" --device $@ --target=fs 2> /dev/null`"
for module in ${fs} ; do
echo "insmod ${module}"
done
@@ -168,7 +168,7 @@
# If there's a filesystem UUID that GRUB is capable of identifying, use it;
# otherwise set root as per value in device.map.
- fs_hint="`"${grub_probe}" --device $@ --target=compatibility_hint`"
+ fs_hint="`"${grub_probe}" --device $@ --target=compatibility_hint 2> /dev/null`"
if [ "x$fs_hint" != x ]; then
echo "set root='$fs_hint'"
fi
@@ -314,7 +314,7 @@
IFS='
'
- abstraction="`"${grub_probe}" --device ${device} --target=abstraction`"
+ abstraction="`"${grub_probe}" --device ${device} --target=abstraction 2> /dev/null`"
for module in ${abstraction}; do
if test "x${module}" = "x$2"; then
IFS="$old_ifs"
signature.asc
Description: Digital signature

