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

Re: Why it's so difficult to fix PowerMac booting for good



Hi!

On Wed, 2023-05-10 at 16:50 +0200, Frank Scheiner wrote:
> On 10.05.23 11:36, John Paul Adrian Glaubitz wrote:
> > Does your approach include a blessing tool?
> 
> Not that I know of. The grub image (a copy of GRUB's `core.elf`) in the
> root of the OF bootstrap partition is configured in the OF environment
> var `boot-device`. OF therefore knows what file to boot and from where.

Which works as long no one touches the NVRAM. Also, an unblessed bootloader
does not show in the firmware's boot menu. It's completely hidden to the user.

> > I want to avoid messing around with the NVRAM
> > as this approach is very fragile.
> 
> Why is that?

Because there is no obvious way for the user to boot installed system once the
NVRAM data has been altered or corrupted.

The huge advantage of using a blessed bootloader is that it will show up in the
firmware's boot menu, no matter what path has been written into NVRAM.

The firmware will always scan all disks for blessed bootloaders and will always
list these in the boot menu, no matter what values have been written to NVRAM.

This is a huge advantage and makes the whole boot process rock solid. The system
will always be bootable unless you corrupt or overwrite the boot filesystem.

Not using a blessed bootloader means that a simple wrong call to the NVRAM tool
or a dead NVRAM battery could render the system unbootable.

> > A blessed bootloader, on the other hand, is automatically
> > displayed in the boot menu and booted unless any alternatives are present. It's therefore
> > much more robust.
> 
> I don't know if the described approach is more robust, but I believe you
> can't have both FAT as OF bootstrap partition **and** blessing. Reading
> through [4]:
> 
> ```
> [...]
> Furthermore, the CoreServices folder is
> "blessed", which means that it's directory ID (analogous to an inum
> in FFS terminology) is recorded, in the HFS+ volume header.
> [...]
> ```
> 
> ...makes it look like it is specific to HFS(+). I am hence not even sure
> if the graphical boot menu will work with FAT as OF bootstrap partition.
> I never used it because I booted the machines from OF.

Well, it works with ISO images, that's the point. The installation CDs use iso9660
as their filesystem and they have a blessed bootloader which shows in the firmware's
boot menu.

Thomas Schmitt briefly explained how xorriso does it, but I don't really understand
the underlying concept yet but I would assume you could use it for booting using a
FAT16 partition as well.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: