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

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

On 5/1/19 9:50 PM, Linux User #330250 wrote:
> Sorry for my stupid comment, but I wanted to know why you don't consider
> using a simple CHRP boot script as a wrapper?

My primary intention is to simplify and unify the bootloader configuration
for debian-installer across all architectures and therefore I'm adopting
the current configuration that is used for ppc64el which is based on xorriso
and grub-ieee1275.

I have already successfully done that for sparc/sparc64 and am working on
powerpc/ppc64 now. Once the changes are committed, we can get rid of
Yaboot and at some point also cdrkit which are both unmaintained.

The current design is simple enough that anyone who reads the code for
debian-installer and debian-cd can understand what's going on.

> 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

I think booting with "c" works with the current Debian CD images and
will work in the future. But we'll see.
> Such CHRP-BOOT script could also help to boot the correct installer
> (i.e. install on powerpc64 and install32 on powerpc).

I don't really think this is a real problem as the user can just select
the desired installation kernel using GRUB.

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

This sounds PowerMac-specific.

> Especially the bootpath property of the chosen node seems to be the
> right place to start looking:
> https://flylib.com/books/en/
>> 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.

Yaboot is going to be removed from the archives, so there is no need for
the bootloader to be selectable. As for the kernel, I think it's okay for
users to choose the kernel they want. A 32-bit kernel will be default for
the 32-bit image, the 64-bit image will just have a 64-bit kernel.

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

I assume for OldWorld PowerMacs we would need to be able to write HFS
filesystems which we currently can't when we switch to xorriso. Either
way, I want to focus on NewWorld Macs first.

> 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... ;-)

The GRUB rescue ISO that I created actually showed the GNU logo on my
iBook G4 and the ISO also contains "ppc/bootinfo.txt" which seems to
be a CHRP-BOOT script containing the bitmap logo.


 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply to: