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

Re: Tool for blessing HFS+ filesystems required



Am 02.02.21 um 22:17 schrieb Christian Groessler:
I need to ask now...

On 2/2/21 9:43 PM, John Paul Adrian Glaubitz wrote:

Yes, and that libhfsp-dev is actually built from the hfsplus source
package which is a
fork of hfsutils to support HFS+ but it doesn't have a hattrib command
anymore which
is used in hfsutils to bless a file system folder.

I've got a few macppc machines (Blue G3 and so) running Linux.

And, at installation time, there was always this "blessing" step if I
remember correctly. It seems to be required in order that the firmware
boots the system.

What exactly is happening there? Is there documentation available which
describes it?

regards,
chris


Which file systems are supported by Open Firmware?

Keeping in mind that there are significant differences from OldWorld
(Open Firmware prior to version 3) to NewWorld (Open Firmware starting
with version 3) Macs, every Mac does support booting from a HFS volume.
But not all variants of HFS+ are supported by Open Firmware. E.g. if I
remember correctly, case sensitive variants (HFSX) and software-RAID
configurations don't work.

https://opensource.apple.com/source/bless/bless-37/README.BOOTING

According to this document from Apple about BootX, on NewWorld-based
(OF3.0) Macs, these file systems are supported:

In the first section "Why BootX?":
* OpenFirmware mainly only supports HFS and/or HFS+, ISO9660, tftp.

BUT in the next section "New World booting from HFS+":
* New World machines (with OF 3.0+) support HFS+, ISO9660, and FAT.

This doesn't really make sense, because it means that also FAT(16)
partitions would be able to hold an OF bootloader. I don't think FAT
supports blessing, so – even IF FAT was supported – I doubt that OF
would automatically find the correct bootloader on it...

My guess is, that, should FAT actually be supported, it would be some
kind of bootinfo file.
http://www.nmia.com/~svspire/open-firmware.html
  hd:8,\\bootinfo.txt
  Tells the machine to use the file bootinfo.txt in the System folder on
  disk partition 8 as boot instructions

A bootinfo file looks like an XML file, with some instructions on what
to boot. See e.g. https://flylib.com/books/en/3.126.1.47/1/

And /MAYBE/ there is a default filename always looked for by Open
Firmware... It that bootinfo file includes an os-badge, it sould even
pop up in the graphical boot selection ("OS picker", the one you get
when holding the Alt key i.e. Option key after the chime; see also:
https://flylib.com/books/en/3.126.1.46/1/).


My point being: In theory we could even use a FAT partition to boot
Linux on a PowerMac. In practice I think that HFS is the best option –
not HFS+, not FAT.


In order to create a new HFS partition I would simply use older versions
of mkfs.hfs.

BUT, one "bug" of this has always been, even with an older version of
the Apple diskdev_cmds, that the option "-h hfs" was always needed.
Therefor, those two command do the same to create an HFS+ volume:
* mkfs.hfsplus /dev/sdxn
* mkfs.hfs /dev/sdxn
And these always create a "legacy" HFS volume:
* mkfs.hfs -h hfs /dev/sdxn
* mkfs.hfsplus -h hfs /dev/sdxn

In other words, the symlink mkfs.hfs doesn't make it create a HFS
volume, and the symlink mkfs.hfsplus  doesn't make it create a HFS+
volume, it solely depends on the "-h hfs" commandline option, or not.

Just my 2¢,
Linux User #330250


Reply to: