G5 Suddenly Can't Boot Into GRUB

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

G5 Suddenly Can't Boot Into GRUB

Noah Wolfe
Hey all, it is I again.

GRUB initially installed fine, and this G5 even booted off it several times, but I believe after an update to grub-ieee1275 installed, I can't boot back in. The boot selector does not display an HD with a penguin as it always did, and not even running install-grub and update-grub2 in a rescue terminal changed anything. I can't even get back in via Open Firmware.

My guess is an update broke something, because I don't remember successfully rebooting after that, but I'm not sure.

Thanks all.

Noah
Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

Frank Scheiner
Hi Noah,

On 4/16/19 19:50, Noah Wolfe wrote:
> Hey all, it is I again.
>
> GRUB initially installed fine, and this G5 even booted off it several times, but I believe after an update to grub-ieee1275 installed, I can't boot back in. The boot selector does not display an HD with a penguin as it always did, and not even running install-grub and update-grub2 in a rescue terminal changed anything. I can't even get back in via Open Firmware.
>
> 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?

Cheers,
Frank

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

John Paul Adrian Glaubitz
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.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

Frank Scheiner
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
/ht@0,f2000000/pci@9/k2-sata-root@c/@0/@0:2,\grub

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
done
[...]

root@powermac-g5:~# nvram --print-config=boot-device
/ht@0,f2000000/pci@9/k2-sata-root@c/scsi@0/sd@0,0:2,\powerpc-ieee1275\core.elf
```

Also interesting: the file and path have changed from the GRUB version
on the installer ISOs I used the last time (`\\BootX` =>
`\powerpc-ieee1275\core.elf`).

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
/ht@0,f2000000/pci@9/k2-sata-root@c/@0/@0:2,\grub
```

...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

Cheers,
Frank

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

John Paul Adrian Glaubitz
On 4/18/19 1:10 AM, Frank Scheiner wrote:
> @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.

Yes, I agree. We need to include a working ofpathname in the GRUB package.

Best would be, of course, to fix the ofpathname from the IBM utils package.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

Noah Wolfe
In reply to this post by Frank Scheiner
Hi Frank,

'printenv boot-device' replies back with:

boot-device /ht@0,f2000000/pci@9/k2-sata-
root@c/scsi@0/sd0,0:2,\powerpc-ieee1275\core.elf hd:,\\tbxi

I just tried, and indeed, 'boot hd:2,\grub' does work.

Plus, I can confirm using 'nvsetenv boot-device "$( ofpath /dev/sda2
),\grub"' then fixes it.

Thanks, Frank.

Noah

On Thu, 2019-04-18 at 00:06 +0200, Frank Scheiner wrote:

> Hi Noah,
>
> On 4/16/19 19:50, Noah Wolfe wrote:
> > Hey all, it is I again.
> >
> > GRUB initially installed fine, and this G5 even booted off it
> > several times, but I believe after an update to grub-ieee1275
> > installed, I can't boot back in. The boot selector does not display
> > an HD with a penguin as it always did, and not even running
> > install-grub and update-grub2 in a rescue terminal changed
> > anything. I can't even get back in via Open Firmware.
> >
> > 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?
>
> Cheers,
> Frank

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

Mathieu Malaterre-4
In reply to this post by John Paul Adrian Glaubitz
Hi Adrian,

On Thu, Apr 18, 2019 at 4:30 PM John Paul Adrian Glaubitz
<[hidden email]> wrote:

>
> On 4/18/19 1:10 AM, Frank Scheiner wrote:
> > @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.
>
> Yes, I agree. We need to include a working ofpathname in the GRUB package.
>
> Best would be, of course, to fix the ofpathname from the IBM utils package.

Could you give more details as to why you believe this would be 'best'
? While I never had feedback from neither IBM group nor GRUB group
about my (WIP) patches, I believe grub path is the way to go.

2cts

> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - [hidden email]
> `. `'   Freie Universitaet Berlin - [hidden email]
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

John Paul Adrian Glaubitz
Hi!

On 4/25/19 9:20 AM, Mathieu Malaterre wrote:
>> Best would be, of course, to fix the ofpathname from the IBM utils package.
>
> Could you give more details as to why you believe this would be 'best'
> ? While I never had feedback from neither IBM group nor GRUB group
> about my (WIP) patches, I believe grub path is the way to go.

I don't have a particularly strong opinion on this. We can use either of the
alternatives if they work fine or can be fixed with reasonable efforts.

I don't know what the current state of grub-path is though. Can anyone with
a PowerMac test it and report back?

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

Frank Scheiner
On 4/28/19 18:08, John Paul Adrian Glaubitz wrote:

> Hi!
>
> On 4/25/19 9:20 AM, Mathieu Malaterre wrote:
>>> Best would be, of course, to fix the ofpathname from the IBM utils package.
>>
>> Could you give more details as to why you believe this would be 'best'
>> ? While I never had feedback from neither IBM group nor GRUB group
>> about my (WIP) patches, I believe grub path is the way to go.
>
> I don't have a particularly strong opinion on this. We can use either of the
> alternatives if they work fine or can be fixed with reasonable efforts.
>
> I don't know what the current state of grub-path is though. Can anyone with
> a PowerMac test it and report back?

I'm actually on it, but still have some other things in the queue, so if
someone is quicker, no issue.

Cheers,
Frank

Reply | Threaded
Open this post in threaded view
|

Re: G5 Suddenly Can't Boot Into GRUB

Rick Thomas-14


> On Apr 28, 2019, at 12:30 PM, Frank Scheiner <[hidden email]> wrote:
>
> On 4/28/19 18:08, John Paul Adrian Glaubitz wrote:
>> Hi!
>>
>> On 4/25/19 9:20 AM, Mathieu Malaterre wrote:
>>>> Best would be, of course, to fix the ofpathname from the IBM utils package.
>>>
>>> Could you give more details as to why you believe this would be 'best'
>>> ? While I never had feedback from neither IBM group nor GRUB group
>>> about my (WIP) patches, I believe grub path is the way to go.
>>
>> I don't have a particularly strong opinion on this. We can use either of the
>> alternatives if they work fine or can be fixed with reasonable efforts.
>>
>> I don't know what the current state of grub-path is though. Can anyone with
>> a PowerMac test it and report back?
>
> I'm actually on it, but still have some other things in the queue, so if
> someone is quicker, no issue.

What is “grub path" and how do I install it?  If I can get it on my G5 and G4, I’ll be happy to test it.  Though I’ll need somebody to coach me on what features nee to be tested.

Enjoy!
Rick