Failed install attempt - GRUB issue - hfsprogs missing?

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

Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
Hi!

I got extra a new (well.. used) PowerBook G4 to develop on, so I
proceeded with a fresh install. It shall serve me together with my iBook
G3 and iBook G4!

I got the PowerPC image from here:

https://cdimage.debian.org/cdimage/ports/2019-05-24/

is that the best one?

The CD is bootable and boots using Grub! yay! I could partition, install
up to the point where GRUB needs to be installed on the target system,
but that step fails.
In the log console I see a message that says
"Unable to locate package hfsprogs"
while grub-common is already the newest version

Could that be the issue, a failed dependency on hfsprogs?

Is there any "working" iso right now, without resorting to yaboot?

Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

John Paul Adrian Glaubitz
Hello!

On 6/21/19 1:05 AM, Riccardo Mottola wrote:
> I got the PowerPC image from here:
>
> https://cdimage.debian.org/cdimage/ports/2019-05-24/
>
> is that the best one?

If you want something that is stable and working, use the Yaboot-only
image in the "10.0" folder unless you have an IBM power machine where
GRUB works without problems.

> The CD is bootable and boots using Grub! yay! I could partition, install
> up to the point where GRUB needs to be installed on the target system, but that step fails.
> In the log console I see a message that says
> "Unable to locate package hfsprogs"
> while grub-common is already the newest version
>
> Could that be the issue, a failed dependency on hfsprogs?

No, the primary issue that we need to solve is to develop a workaround
for Apple's broken implementation of Open Firmware which uses a non-standard
OF path scheme which is not 100% compatible with what POWER and SPARC
servers use.

So, we need to patch grub-ofpathname to be able to return paths that
PowerMacs understand while not breaking the tool for IBM POWER or
SPARC.

I understand that the installer situation for PowerMacs is a bit
frustrating at the moment, but we can't blame anyone but Apple who
implemented Open Firmware not 100% according to spec so that we
have to use workarounds.

> Is there any "working" iso right now, without resorting to yaboot?

Unless you know how to fix GRUB manually, no. Use the Yaboot image.

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: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
Hi Adrian,

John Paul Adrian Glaubitz wrote:
> I understand that the installer situation for PowerMacs is a bit
> frustrating at the moment, but we can't blame anyone but Apple who
> implemented Open Firmware not 100% according to spec so that we
> have to use workarounds.

A little bit confusing, yes... but no

>
>> Is there any "working" iso right now, without resorting to yaboot?
> Unless you know how to fix GRUB manually, no. Use the Yaboot image.

can it be done inside the installer cd.. or e.g. by booting somehow the
hard disk using the grub form the CD and then fixing it afterwards?


I just wonder how people tested GRUB, I was just eager to test on this
setup too, since there is no critical data on the hard disk.


Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

John Paul Adrian Glaubitz
Hi!

On 6/21/19 5:34 PM, Riccardo Mottola wrote:
>> I understand that the installer situation for PowerMacs is a bit
>> frustrating at the moment, but we can't blame anyone but Apple who
>> implemented Open Firmware not 100% according to spec so that we
>> have to use workarounds.
>
> A little bit confusing, yes... but no

Sure it's confusing. But it was Apple who ignored the standard, not
Debian or GRUB upstream.

>>> Is there any "working" iso right now, without resorting to yaboot?
>> Unless you know how to fix GRUB manually, no. Use the Yaboot image.
>
> can it be done inside the installer cd.. or e.g. by booting somehow the hard disk using the grub form the CD and then fixing it afterwards?

Yes, Frank Scheiner has posted on this list how that's done. Let's just
wait for him to chime in.

> I just wonder how people tested GRUB, I was just eager to test on this setup too, since there is no critical data on the hard disk.

It worked for a while until the grub-installer was updated. It will work
in the foreseeable future and then without regressions. Just be patient :).

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: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
Hi Adrian,

John Paul Adrian Glaubitz wrote:
>> I just wonder how people tested GRUB, I was just eager to test on this setup too, since there is no critical data on the hard disk.
> It worked for a while until the grub-installer was updated. It will work
> in the foreseeable future and then without regressions. Just be patient:).

maybe you remember the date and I can pick-up an image with grub, but
before breakage, if one was released and archived?

Then, once the bare-bone machines is installed, I can update debian inside.

Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Rick Thomas-14
In reply to this post by John Paul Adrian Glaubitz
Here’s the URL for the yaboot-only installer:

https://cdimage.debian.org/cdimage/ports/10.0/powerpc/iso-cd/debian-10.0-powerpc-NETINST-1.iso

It has worked for me, but I had to do a little work to get it to accept the ports repo without having the certificate for it on the CD.

I’ll try to reproduce what I did and post a report here.

Rick

> On Jun 21, 2019, at 4:05 AM, John Paul Adrian Glaubitz <[hidden email]> wrote:
>
> If you want something that is stable and working, use the Yaboot-only
> image in the "10.0" folder unless you have an IBM power machine where
> GRUB works without problems.

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Dennis Clarke-2
On 6/21/19 11:22 PM, Rick Thomas wrote:
> Here’s the URL for the yaboot-only installer:
>
> https://cdimage.debian.org/cdimage/ports/10.0/powerpc/iso-cd/debian-10.0-powerpc-NETINST-1.iso
>

What is the last known good grub based installer ?

Dennis

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
Hi,

Dennis Clarke wrote:
>> Here’s the URL for the yaboot-only installer:
>>
>> https://cdimage.debian.org/cdimage/ports/10.0/powerpc/iso-cd/debian-10.0-powerpc-NETINST-1.iso 
>>
>>
>
> What is the last known good grub based installer ?

that was my same question. Reading Frank's comments, apparently onnce it
is isntalled and ugraded wrongly you can fix the ofpath, but I don't
know if it can be done from the installed CD to fix what just was installed?

Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

John Paul Adrian Glaubitz
On 6/24/19 11:45 PM, Riccardo Mottola wrote:
>> What is the last known good grub based installer ?
>
> that was my same question. Reading Frank's comments, apparently onnce it is isntalled and ugraded wrongly you can fix the ofpath, but I don't know if it can be done from the installed CD to fix what just was installed?

It can be done from any running system, it doesn't really matter whether
it's been booted off a CD-ROM or from any other medium.

But I will be looking into this issue soonish. Please bear with me.

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: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
Hi Adrian,


John Paul Adrian Glaubitz wrote:
> It can be done from any running system, it doesn't really matter whether
> it's been booted off a CD-ROM or from any other medium.
>
> But I will be looking into this issue soonish. Please bear with me.

in the meanwhile I did not stand still, but I tried:

1) boot with rescue CD as Frank suggested
2) mount root
3) get and install yaboot
3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION> ),\grub"

but reboot... still shows me the blinking folder and using "option" does
not show the hard disk.

So I wonder what could be "Missing" if only the boot loader installation
failed during install
perhaps grub itself.

Perhaps I can in the rescue shell try to reinstall and reconfigure grub?
how?

Riccardo

PS: I noticed that the CD still has the wrong mirrors source list, as a
long time ago. What should be the correct one to use currently and can
itbe fixed too?

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

userm57
Hi Riccardo,

On 6/25/19 3:50 PM, Riccardo Mottola wrote:

> Hi Adrian,
>
>
> John Paul Adrian Glaubitz wrote:
>> It can be done from any running system, it doesn't really matter whether
>> it's been booted off a CD-ROM or from any other medium.
>>
>> But I will be looking into this issue soonish. Please bear with me.
>
> in the meanwhile I did not stand still, but I tried:
>
> 1) boot with rescue CD as Frank suggested
> 2) mount root
> 3) get and install yaboot
> 3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION> ),\grub"
>
> but reboot... still shows me the blinking folder and using "option" does
> not show the hard disk.

I think I had this same problem installing Debian 9 on a G5 system.  The
workaround was to boot the rescue CD, open a shell and chroot into the
new installation, then run "ybin -v".  I think I also entered
"set-defaults" first at the firmware prompt, but that may not have been
required.

>
> So I wonder what could be "Missing" if only the boot loader installation
> failed during install
> perhaps grub itself.
>
> Perhaps I can in the rescue shell try to reinstall and reconfigure grub?
> how?
>
> Riccardo
>
> PS: I noticed that the CD still has the wrong mirrors source list, as a
> long time ago. What should be the correct one to use currently and can
> itbe fixed too?
>

-Stan

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

John Paul Adrian Glaubitz
In reply to this post by Riccardo Mottola
On 6/25/19 11:50 PM, Riccardo Mottola wrote:
> in the meanwhile I did not stand still, but I tried:
>
> 1) boot with rescue CD as Frank suggested
> 2) mount root

Did you bind-mount /dev, /proc and /sys as well?

> 3) get and install yaboot
> 3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION> ),\grub"

Does ofpath /dev/sda1 show a correct path?

> PS: I noticed that the CD still has the wrong mirrors source list, as a long time ago. What should be the correct one to use currently and can itbe fixed too?

This is something I cannot influence as this is blocked here [1].

Adrian

> [1] https://salsa.debian.org/mirror-team/masterlist/merge_requests/5

--
 .''`.  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: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
Hi,

John Paul Adrian Glaubitz wrote:
> On 6/25/19 11:50 PM, Riccardo Mottola wrote:
>> in the meanwhile I did not stand still, but I tried:
>>
>> 1) boot with rescue CD as Frank suggested
>> 2) mount root
> Did you bind-mount /dev, /proc and /sys as well?

I did not - I though rescue would do that for me.

>
>> 3) get and install yaboot
>> 3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION> ),\grub"
> Does ofpath /dev/sda1 show a correct path?

it does print a reasonable OpenFirmware path:

should actually sda1 (the minimal partition at the beginning) or sda2
(the 20MB partition) be used?

my question is if everything is partitioned and installed correctly.
If I boot holding down "option", shouldn't all bootable disks be shown?
boot-device is only the setting with tells OF where to automatically
boot from, but if a good disk is found, it should be found: can somebody
try on his GRUB mac?
On my iBook which still has yaboot, I see a Hard Disk Icon with a small
penguin. On the PowerBook I don't see it.

parted shows me 4 partitions

1) 32KB "no file system", named Apple, no flags
2) 20MB "no file system", untitled, flagged as boot
3) 96GB ext4, untitled, no flags
4) 4GB linux-swap, swap, swap

is that fine?

I wonder if inside the chrooted environment, if I configure network and
sources, I can "reinstall" something and fix the situation so at least
OF recognizes this as a bootable disk?

>
>> PS: I noticed that the CD still has the wrong mirrors source list, as a long time ago. What should be the correct one to use currently and can itbe fixed too?
> This is something I cannot influence as this is blocked here [1].

do we have a page which shows the current advised settings?

Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
In reply to this post by userm57
Hi,

[hidden email] wrote:
> I think I had this same problem installing Debian 9 on a G5 system.  The
> workaround was to boot the rescue CD, open a shell and chroot into the
> new installation, then run "ybin -v".  I think I also entered
> "set-defaults" first at the firmware prompt, but that may not have been
> required.

that is needed for yaboot, but I am trying to get GRUB running!

Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Riccardo Mottola
In reply to this post by Riccardo Mottola
Hi.

sorry to ping - but someone has a clue here? amd I on the right path o
assume that not just bood-device is the issue (which should be fixed)
but something in the partitions or anyway other stup of the boot load is
missing, since the disk is not recognized as bootable?

Thanks - Riccardo

Riccardo Mottola wrote:

> Hi,
>
> John Paul Adrian Glaubitz wrote:
>> On 6/25/19 11:50 PM, Riccardo Mottola wrote:
>>> in the meanwhile I did not stand still, but I tried:
>>>
>>> 1) boot with rescue CD as Frank suggested
>>> 2) mount root
>> Did you bind-mount /dev, /proc and /sys as well?
>
> I did not - I though rescue would do that for me.
>
>>
>>> 3) get and install yaboot
>>> 3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION>
>>> ),\grub"
>> Does ofpath /dev/sda1 show a correct path?
>
> it does print a reasonable OpenFirmware path:
>
> should actually sda1 (the minimal partition at the beginning) or sda2
> (the 20MB partition) be used?
>
> my question is if everything is partitioned and installed correctly.
> If I boot holding down "option", shouldn't all bootable disks be
> shown? boot-device is only the setting with tells OF where to
> automatically boot from, but if a good disk is found, it should be
> found: can somebody try on his GRUB mac?
> On my iBook which still has yaboot, I see a Hard Disk Icon with a
> small penguin. On the PowerBook I don't see it.
>
> parted shows me 4 partitions
>
> 1) 32KB "no file system", named Apple, no flags
> 2) 20MB "no file system", untitled, flagged as boot
> 3) 96GB ext4, untitled, no flags
> 4) 4GB linux-swap, swap, swap
>
> is that fine?
>
> I wonder if inside the chrooted environment, if I configure network
> and sources, I can "reinstall" something and fix the situation so at
> least OF recognizes this as a bootable disk?
>
>>
>>> PS: I noticed that the CD still has the wrong mirrors source list,
>>> as a long time ago. What should be the correct one to use currently
>>> and can itbe fixed too?
>> This is something I cannot influence as this is blocked here [1].
>
> do we have a page which shows the current advised settings?
>
> Riccardo
>

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Frank Scheiner
In reply to this post by Riccardo Mottola
Hi Riccardo,

sorry for being so late, but I was occupied by other things the last weeks.

On 6/26/19 20:22, Riccardo Mottola wrote:

> Hi,
>
> John Paul Adrian Glaubitz wrote:
>> On 6/25/19 11:50 PM, Riccardo Mottola wrote:
>>> in the meanwhile I did not stand still, but I tried:
>>>
>>> 1) boot with rescue CD as Frank suggested
>>> 2) mount root
>> Did you bind-mount /dev, /proc and /sys as well?
>
> I did not - I though rescue would do that for me.

I think it actually does when you start a shell in the root FS from the
installer menu in rescue mode.

>
>>
>>> 3) get and install yaboot
>>> 3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION>
>>> ),\grub"
>> Does ofpath /dev/sda1 show a correct path?
>
> it does print a reasonable OpenFirmware path:

Then at least `/sys` was mounted, because `ofpath` operates on sysfs AFAIK.

>
> should actually sda1 (the minimal partition at the beginning) or sda2
> (the 20MB partition) be used?

sda2 should be used, the first partition is sort of a disk header
containing partitioning information IIRC.

>
> my question is if everything is partitioned and installed correctly.
> If I boot holding down "option", shouldn't all bootable disks be shown?
> boot-device is only the setting with tells OF where to automatically
> boot from, but if a good disk is found, it should be found: can somebody
> try on his GRUB mac?
> On my iBook which still has yaboot, I see a Hard Disk Icon with a small
> penguin. On the PowerBook I don't see it.
>
> parted shows me 4 partitions
>
> 1) 32KB "no file system", named Apple, no flags
> 2) 20MB "no file system", untitled, flagged as boot
> 3) 96GB ext4, untitled, no flags
> 4) 4GB linux-swap, swap, swap
>
> is that fine?

Partitioning is fine, but the second partition has no file system on it
and it needs to be be formatted as HFS. I think that's the reason the
containing disk is not shown in the "option" menu.

There's no UDEB for hfsprogs which would allow handling HFS from the
installer environment so we need to resort to using the tools from the
hfsprogs DEB package from inside the target root FS during installation.
But during your installation the hfsprogs package couldn't be located,
making `mk-hfs-bootstrap` unable to perform its task which also makes
`d-i/grub-installer` exiting before finishing the GRUB installation.

>
> I wonder if inside the chrooted environment, if I configure network and
> sources, I can "reinstall" something and fix the situation so at least
> OF recognizes this as a bootable disk?

To - hopefully - fix your issue you'll need at least hfsprogs in
addition to `ofpath` (seems to be already there according to what was
written above).

Again boot into rescue mode and start a shell in the root FS.

After hfsprogs was installed you can use `mkfs.hfs`. Use it as follows
(taken and adapted from my `mk-hfs-bootstrap.sh` on [1] - you can't use
it directly from inside the root FS, as it is meant to be used from the
installer environment):

```
mkfs.hfs -h /dev/sda2
```

...to format the partition. Then create the necessary mount point and
mount the FS:

```
mkdir -p "/boot/grub" && mount -t hfs /dev/sda2 "/boot/grub"
```

Also add the partition/FS to `/etc/fstab` using its UUID:

```
_offs_part_uuid="$( blkid -o value -s UUID /dev/sda2 )"

echo '# /boot/grub was on /dev/sda2 during
installation\nUUID=${_offs_part_uuid} /boot/grub hfs defaults 0 2' >>
/etc/fstab
```

[1]:
https://salsa.debian.org/installer-team/grub-installer/blob/7c9b709879d1c09ca83330be95c4f09815f4353f/mk-hfs-bootstrap.sh

Before continuing disguise `ofpath` as `ofpathname`:

```
mv /usr/sbin/ofpathname /usr/sbin/ofpathname-ibm && ln -s
/usr/sbin/ofpath /usr/sbin/ofpathname
```

...as `grub-install` uses `ofpathname` internally.

Now that everything is prepared you can use `grub-install` to install
GRUB onto the HFS bootstrap partition (taken and adapted from [2]):

```
grub-install --macppc-directory=/boot/grub
```

[2]:
https://salsa.debian.org/installer-team/grub-installer/blob/7c9b709879d1c09ca83330be95c4f09815f4353f/grub-installer#L933

Keeping the `ofpath` as `ofpathname` symlink could help to avoid
problems with wrong OF paths during future package upgrades of the GRUB
packages.

@Noah:
Wasn't this also a problem you had - I mean an unbootable system after
the GRUB packages were upgraded? So that could be a workaround for that
problem.

>
>>
>>> PS: I noticed that the CD still has the wrong mirrors source list, as
>>> a long time ago. What should be the correct one to use currently and
>>> can itbe fixed too?
>> This is something I cannot influence as this is blocked here [1].
>
> do we have a page which shows the current advised settings?

Not sure, but you should use "ftp.ports.debian.org" and "/debian-ports/"
as on [3] during the installation.

[3]: https://www.ports.debian.org/archive

Hope that helps,
Frank

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

John Paul Adrian Glaubitz
On 7/2/19 4:32 PM, Frank Scheiner wrote:
> There's no UDEB for hfsprogs which would allow handling HFS from the
> installer environment so we need to resort to using the tools from the
> hfsprogs DEB package from inside the target root FS during installation.

Please file a bug against hfsprogs if we need a udeb although it could be
that this bug report gets rejected because powerpc and ppc64 are not
release architectures.

> But during your installation the hfsprogs package couldn't be located,
> making `mk-hfs-bootstrap` unable to perform its task which also makes
> `d-i/grub-installer` exiting before finishing the GRUB installation.

hfsprogs should be in /target or grub-installer should install it there
if it's not in /target yet. But again, grub-ofpathname needs to be fixed
but I don't have the time.

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: Failed install attempt - GRUB issue - hfsprogs missing?

Frank Scheiner
On 7/2/19 16:40, John Paul Adrian Glaubitz wrote:
> On 7/2/19 4:32 PM, Frank Scheiner wrote:
>> There's no UDEB for hfsprogs which would allow handling HFS from the
>> installer environment so we need to resort to using the tools from the
>> hfsprogs DEB package from inside the target root FS during installation.
>
> Please file a bug against hfsprogs if we need a udeb although it could be
> that this bug report gets rejected because powerpc and ppc64 are not
> release architectures.

I'll have a look into this, but have not much hope, as we are still
waiting for an upgraded hfsprogs package (for G5 Power Macs, as the
ppc64 version of fsck.hfs always segfaults there) from the very same
maintainer.

>
>> But during your installation the hfsprogs package couldn't be located,
>> making `mk-hfs-bootstrap` unable to perform its task which also makes
>> `d-i/grub-installer` exiting before finishing the GRUB installation.
>
> hfsprogs should be in /target or grub-installer should install it there
> if it's not in /target yet.

I was referring to [1]:

```
[...]
The CD is bootable and boots using Grub! yay! I could partition, install
up to the point where GRUB needs to be installed on the target system,
but that step fails.

In the log console I see a message that says
"Unable to locate package hfsprogs"
while grub-common is already the newest version
[...]
```

[1]: https://lists.debian.org/debian-powerpc/2019/06/msg00030.html

`mk-hfs-bootstrap` installs hfsprogs inside the target FS, but for some
unknown reason that package couldn't be found during Riccardo's
installation attempt.

> But again, grub-ofpathname needs to be fixed
> but I don't have the time.

Sure, don't feel pressed, I just wanted to help out Riccardo, so he can
start using his PowerBook G4 for PowerPC development.

Cheers,
Frank

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

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

Yes, that was the issue.

Even after amending it with the suggested fix, subsequent GRUB updates
continued to break the boot process.

Bullseye's cycle can't come soon enough...

Noah

On 07/02/2019 10:32 AM, Frank Scheiner wrote:

> Hi Riccardo,
>
> sorry for being so late, but I was occupied by other things the last
> weeks.
>
> On 6/26/19 20:22, Riccardo Mottola wrote:
>> Hi,
>>
>> John Paul Adrian Glaubitz wrote:
>>> On 6/25/19 11:50 PM, Riccardo Mottola wrote:
>>>> in the meanwhile I did not stand still, but I tried:
>>>>
>>>> 1) boot with rescue CD as Frank suggested
>>>> 2) mount root
>>> Did you bind-mount /dev, /proc and /sys as well?
>>
>> I did not - I though rescue would do that for me.
>
> I think it actually does when you start a shell in the root FS from the
> installer menu in rescue mode.
>
>>
>>>
>>>> 3) get and install yaboot
>>>> 3) nvsetenv boot-device "$( ofpath /dev/<HFS_BOOTSTRAP_PARTITION>
>>>> ),\grub"
>>> Does ofpath /dev/sda1 show a correct path?
>>
>> it does print a reasonable OpenFirmware path:
>
> Then at least `/sys` was mounted, because `ofpath` operates on sysfs
> AFAIK.
>
>>
>> should actually sda1 (the minimal partition at the beginning) or sda2
>> (the 20MB partition) be used?
>
> sda2 should be used, the first partition is sort of a disk header
> containing partitioning information IIRC.
>
>>
>> my question is if everything is partitioned and installed correctly.
>> If I boot holding down "option", shouldn't all bootable disks be shown?
>> boot-device is only the setting with tells OF where to automatically
>> boot from, but if a good disk is found, it should be found: can somebody
>> try on his GRUB mac?
>> On my iBook which still has yaboot, I see a Hard Disk Icon with a small
>> penguin. On the PowerBook I don't see it.
>>
>> parted shows me 4 partitions
>>
>> 1) 32KB "no file system", named Apple, no flags
>> 2) 20MB "no file system", untitled, flagged as boot
>> 3) 96GB ext4, untitled, no flags
>> 4) 4GB linux-swap, swap, swap
>>
>> is that fine?
>
> Partitioning is fine, but the second partition has no file system on it
> and it needs to be be formatted as HFS. I think that's the reason the
> containing disk is not shown in the "option" menu.
>
> There's no UDEB for hfsprogs which would allow handling HFS from the
> installer environment so we need to resort to using the tools from the
> hfsprogs DEB package from inside the target root FS during installation.
> But during your installation the hfsprogs package couldn't be located,
> making `mk-hfs-bootstrap` unable to perform its task which also makes
> `d-i/grub-installer` exiting before finishing the GRUB installation.
>
>>
>> I wonder if inside the chrooted environment, if I configure network and
>> sources, I can "reinstall" something and fix the situation so at least
>> OF recognizes this as a bootable disk?
>
> To - hopefully - fix your issue you'll need at least hfsprogs in
> addition to `ofpath` (seems to be already there according to what was
> written above).
>
> Again boot into rescue mode and start a shell in the root FS.
>
> After hfsprogs was installed you can use `mkfs.hfs`. Use it as follows
> (taken and adapted from my `mk-hfs-bootstrap.sh` on [1] - you can't use
> it directly from inside the root FS, as it is meant to be used from the
> installer environment):
>
> ```
> mkfs.hfs -h /dev/sda2
> ```
>
> ...to format the partition. Then create the necessary mount point and
> mount the FS:
>
> ```
> mkdir -p "/boot/grub" && mount -t hfs /dev/sda2 "/boot/grub"
> ```
>
> Also add the partition/FS to `/etc/fstab` using its UUID:
>
> ```
> _offs_part_uuid="$( blkid -o value -s UUID /dev/sda2 )"
>
> echo '# /boot/grub was on /dev/sda2 during
> installation\nUUID=${_offs_part_uuid} /boot/grub hfs defaults 0 2' >>
> /etc/fstab
> ```
>
> [1]:
> https://salsa.debian.org/installer-team/grub-installer/blob/7c9b709879d1c09ca83330be95c4f09815f4353f/mk-hfs-bootstrap.sh 
>
>
> Before continuing disguise `ofpath` as `ofpathname`:
>
> ```
> mv /usr/sbin/ofpathname /usr/sbin/ofpathname-ibm && ln -s
> /usr/sbin/ofpath /usr/sbin/ofpathname
> ```
>
> ...as `grub-install` uses `ofpathname` internally.
>
> Now that everything is prepared you can use `grub-install` to install
> GRUB onto the HFS bootstrap partition (taken and adapted from [2]):
>
> ```
> grub-install --macppc-directory=/boot/grub
> ```
>
> [2]:
> https://salsa.debian.org/installer-team/grub-installer/blob/7c9b709879d1c09ca83330be95c4f09815f4353f/grub-installer#L933 
>
>
> Keeping the `ofpath` as `ofpathname` symlink could help to avoid
> problems with wrong OF paths during future package upgrades of the GRUB
> packages.
>
> @Noah:
> Wasn't this also a problem you had - I mean an unbootable system after
> the GRUB packages were upgraded? So that could be a workaround for that
> problem.
>
>>
>>>
>>>> PS: I noticed that the CD still has the wrong mirrors source list, as
>>>> a long time ago. What should be the correct one to use currently and
>>>> can itbe fixed too?
>>> This is something I cannot influence as this is blocked here [1].
>>
>> do we have a page which shows the current advised settings?
>
> Not sure, but you should use "ftp.ports.debian.org" and "/debian-ports/"
> as on [3] during the installation.
>
> [3]: https://www.ports.debian.org/archive
>
> Hope that helps,
> Frank

Reply | Threaded
Open this post in threaded view
|

Re: Failed install attempt - GRUB issue - hfsprogs missing?

Dennis Clarke-2
In reply to this post by John Paul Adrian Glaubitz
On 7/2/19 10:40 AM, John Paul Adrian Glaubitz wrote:

> On 7/2/19 4:32 PM, Frank Scheiner wrote:
>> There's no UDEB for hfsprogs which would allow handling HFS from the
>> installer environment so we need to resort to using the tools from the
>> hfsprogs DEB package from inside the target root FS during installation.
>
> Please file a bug against hfsprogs if we need a udeb although it could be
> that this bug report gets rejected because powerpc and ppc64 are not
> release architectures.
>
>> But during your installation the hfsprogs package couldn't be located,
>> making `mk-hfs-bootstrap` unable to perform its task which also makes
>> `d-i/grub-installer` exiting before finishing the GRUB installation.
>
> hfsprogs should be in /target or grub-installer should install it there
> if it's not in /target yet. But again, grub-ofpathname needs to be fixed
> but I don't have the time.
>
> Adrian
>

Anyone know what was the last working Debian installer for ppc64? I mean
the network installer which John Paul Adrian Glaubitz crafted for us. I
would just use that and then set it aside with a big label on it that
says "works as expected".  Then be real careful when running any sort of
update and avoid hfsprogs and grub entirely.  At least for a while.  Two
years or so maybe.


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

12