[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: G5 Suddenly Can't Boot Into GRUB

On 4/18/19 00:26, John Paul Adrian Glaubitz wrote:
> On 4/18/19 12:06 AM, Frank Scheiner wrote:
>>> My guess is an update broke something, because I don't remember successfully rebooting after that, but I'm not sure.
>> Sad to hear that. Doesn't `boot hd:2,\grub` work - assuming you have a
>> single disk drive in your G5?
>> What does `printenv boot-device` give back?
> It might be that the grub2 update triggered another update to the bootloader
> which failed because the wrong "ofpathname" was used but that has to be
> tested.

Yeah, I'm afraid it sounds like that.

If it's just a wrong OF path in `boot-device`, the above boot command
should at least get Noah back into the installed OS, from where he could
"repair" things using `nvsetenv` with `ofpath`, i.e. the following
should correct the `boot-device` NVRAM var for the time being:

nvsetenv boot-device "$( ofpath /dev/sda2 ),\grub"

UPDATE: I just did an upgrade on my G5 and indeed, the `boot-device`
NVRAM var is wrong afterwards. Looks like a complete `grub-install` run
is done with every GRUB upgrade, which invokes `ofpathname`, which gives
back a wrong device to OF path translation:

root@powermac-g5:~# nvram --print-config=boot-device

root@powermac-g5:~# apt upgrade
Setting up grub2-common (2.02+dfsg1-17) ...
Setting up grub-ieee1275-bin (2.02+dfsg1-17) ...
Setting up grub-ieee1275 (2.02+dfsg1-17) ...
Installing for powerpc-ieee1275 platform.
/usr/sbin/ofpathname: line 812: warning: command substitution: ignored
null byte in input
Installation finished. No error reported.
Generating grub configuration file ...
Found linux image: /boot/vmlinux-4.19.0-4-powerpc64
Found initrd image: /boot/initrd.img-4.19.0-4-powerpc64

root@powermac-g5:~# nvram --print-config=boot-device

Also interesting: the file and path have changed from the GRUB version
on the installer ISOs I used the last time (`\\BootX` =>

As expected the following command line "corrects" it:

root@powermac-g5:~# nvsetenv boot-device "$( ofpath /dev/sda2 ),\grub"

root@powermac-g5:~# nvram --print-config=boot-device

...for now.


@Adrian, Mathieu:

We could use this opportunity to evaluate Mathieu's patches from [1] and
[2]. This will also require changes to `grub-install`, but in the end
could be the "best" solution as `grub-ofpathname` would be included in
the GRUB packages.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916830

[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916864


Reply to: