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

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

Hi Frank

(removing some people from CC, which read us on the list anyway)

Frank Scheiner wrote:
Hi Riccardo,

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

I understand.. I will be for the next 3, so I have today to play and perhaps a couple of weekends. Yesterday I had a terrible "dayjob" day so... no time to hack. Thanks for the reply.

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

very well.

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.

I understand that too, I just wanted a confirmation!

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 make > `d-i/grub-installer` exiting before finishing the GRUB installation.

That sounds reasonable and has also other side-effects, read below!

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.

I configured sources according to your link... this enabled me to use "apt-get" inside the rescue shell!

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.

Up to know, I followed you step after step.

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

Now this fails: no grub-install!

I read the grub-installer in the "rescue CD" and found out it should have installed grub-1275 but probabaly the installer aborted before.

I installed it with all dependencies (grub-common was already there).

It executed without errors.

Reboot... hold mouse button to eject cd and cross fingers!

No boot.. no disk recognized.. an a check for available boot disk with "option" shows nothing to boot from.

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

I will leave it in, then.


I reboot from the rescue CD again and "check" what's on the target disk now again.

I install parted and check sda, filesystem 2 says  now hfs with "Boot"

I mount /dev/hda2 to /boot/grub

ls shows me
System fonts grub grubenv locale mach_kernel powerpc-ieee1275

sounds nice?

ofpathname /dev/sda2 tells me exactly

do you like it? sounds like second partition of an ATA disk :)

Just for safety I run

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

tells me:
nvram --print-config=boot-device

and voilà at this attempt I get the boot prompt, no menu!

Now I don't know how to boot and I suppose there is no menu configured/generated.

Shouldn't grub-install take care of that?

How can I fix this step?

I still wonder that "option" to boot doesn't list the hard disk as bootable... so we still a couple of things :)


Reply to: