[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub-probe seems to be having problems
From: |
Lennart Sorensen |
Subject: |
Re: grub-probe seems to be having problems |
Date: |
Tue, 20 Mar 2012 15:11:51 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Mar 20, 2012 at 03:02:35PM -0400, Lennart Sorensen wrote:
> This is just weird.
>
> I run grub-probe and sometimes it works and sometimes it doesn't.
>
> Something is giving inconsistent results. I don't know if it is a
> problem in 2.6.32 kernel returning inconsistent data for the superblock,
> or if grub isn't correctly initializing the superblock before filling it,
> or if grub isn't actually reading the superblock properly.
>
> Sometimes /dev/sdd2 isn't being recognized as a member of /dev/md0,
> and other times it is.
Still no idea why this is happening.
> By the way, the code in grub-install that tries to check if a PReP
> partition is empty using 'cmp' doesn't work. It always fails.
> The suggestion it gives doesn't help.
Don't have a good fix for this yet.
> Forcing the partition to contain an elf header makes grub-install happy,
> but that's not so easy to do until you got grub already installed there.
>
> Also a recent change to non powerpc ieee1275 in grub-install has broken
> nvsetenv, since ofpath is no longer being set on powerpc. So boot-device
> isn't set anymore. This worked a few weeks ago.
This seems to fix the grub-install problem:
address@hidden:~/grub2-1.99+20120320# diff -u /root/grub/util/grub-install.in
./util/grub-install.in
--- /root/grub/util/grub-install.in 2012-03-20 12:12:51.276823000 -0400
+++ ./util/grub-install.in 2012-03-20 15:09:20.790385732 -0400
@@ -744,6 +744,14 @@
# If a install device is defined, copy the core.elf to PReP partition.
else
+ dev="`echo $install_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`"
+ partno="`echo $install_device | sed -e
's/.*[^0-9]\([0-9]\+\)$/\1/'`"
+ ofpath="`$ofpathname $dev`" || {
+ # TRANSLATORS: "device tree path" is the name of the device
+ # for IEEE1275
+ gettext_printf "Couldn't find IEEE1275 device tree path for
%s.\nYou will have to set \`boot-device' variable manually.\n" "$dev" 1>&2
+ exit 1
+ }
if [ "$("${grub_probe}" -m "${device_map}" -d "${install_device}"
-t msdos_parttype)" != "41" ]; then
gettext "The chosen partition is not a PReP partition." 1>&2
echo 1>&2
Somehow that piece ended up inside the if != ieee1275-powerpc section
(and modified to not work for the ibm powerpc way either).
--
Len Sorensen
- Re: grub-probe seems to be having problems, (continued)
- Message not available
- Re: grub-probe seems to be having problems, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/03/09
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/09
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/09
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/19
- Re: grub-probe seems to be having problems, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/03/20
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/20
- Re: grub-probe seems to be having problems, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/03/20
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/20
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/20
- Re: grub-probe seems to be having problems, Lennart Sorensen, 2012/03/20
- Re: grub-probe seems to be having problems,
Lennart Sorensen <=
- Re: grub-probe seems to be having problems, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/03/08