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

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

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:

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


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


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

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

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,

Reply to: