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

Sorry for the noise... WAS: Re: Switching debian-installer CD images to GRUB



Hi!

Sorry for my stupid comment, but I wanted to know why you don't consider
using a simple CHRP boot script as a wrapper?

According to this FreeBSD document, a CHRP script must be used for the
"c" key to work and let OF find the optical drive (such as CD-ROM) to be
bootable in the first place.
https://www.netbsd.org/docs/bootcd.html

Looking at the source of yaboot
(http://yaboot.ozlabs.org/releases/yaboot-1.3.17.tar.gz) /doc/examples,
there are a couple of simple CHRP boot scripts that could be used to
boot any bootloader we choose from the CD-ROM.

Such CHRP-BOOT script could also help to boot the correct installer
(i.e. install on powerpc64 and install32 on powerpc).
https://groups.google.com/forum/#!topic/linux.debian.ports.powerpc/MfDT7fVbq80
> <BOOT-SCRIPT>
> " screen" output
> load-base release-load-area
> " /cpus/@0" find-package if
>   " 64-bit" rot get-package-property 0= if
>    2drop
>    " boot cd:,\install\yaboot conf=cd:,\install\yaboot.conf" eval
>   else
>    " boot cd:,\install\yaboot conf=cd:,\install\mac32.conf" eval
>   then
> then
> </BOOT-SCRIPT>

What's currently missing is how to find the actual boot device from
within this script, since a hardcoded "cd:" doesn't make sense
considering USB pen drive or USB optical drive boot solutions. Maybe
there is some similar logic like the cpus find-package stuff for
boot-device.

Especially the bootpath property of the chosen node seems to be the
right place to start looking:
https://flylib.com/books/en/3.126.1.47/1/
> The default name of the kernel file is mach_kernel. BootX refers to
several pieces of information while constructing the path to the kernel
file. It first attempts to use the path contained in the bootpath
property of the chosen node. If that fails, it looks at the boot-device
property of the options node.

If this logic could be used to find out the actual real boot path, like,
"/ht/pci@7/k2-sata-root/k2-sata@0/disk@0:3" (seems to be from a G5),
then this information could be used by the CHRP script to load the
correct a) kernel directly, or b) bootloader such as yaboot or grub2,
favorably c) with passing along the information if the system is running
a 32-Bit or 64-Bit PowerPC processor so that i.e. grub2 could default to
either install or install32.

In addition to this maybe it is possible to generate a CHRP script that
is suitable for other CHRP machines as well, not only Power Macs.
Likewise the CHRP script could be used to load the Quik bootloader on
OldWorld Power Macs.

And last but not least, the most important impact: When started from the
internal optical drive (or any other supported boot device by the Open
Firmware OS Picker, i.e. holding the option key at the chime to see the
directly supported boot options), you'd get to see a nice Debian
GNU/Linux logo for the installer. This is something that seems not less
important to me as well... ;-)


Cheers,
Linux User #330250


Reply to: