Port-macppc archive

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

Re: Netbooting a blue and white G3



Nathan,


That's the answer I expected.

So, the procedure would be:

1. When partitioning the disk, create an 800kB partition with type "Apple_HFS";

2. The installer uses dd to block copy the raw HFS "image file" (which contains the bootloader) to this partition.

Then, on the next reboot, the user has to go into OF and set boot- device and boot-file. Is there a way to change OF settings through software?

If we make step 1 above mandatory (maybe "hardcoded" into the install process), the offset would be easy to calculate.

Do I make sense?


Cheers,
Flavio

On 16/10/2009, at 16:47, Nathan Whitehorn wrote:

I'm not completely sure I understand the question, but I'll try. This generates a raw HFS image (boot1.hfs) that you can dd to an 800K partition you make with pdisk, so there is no preparation necessary with other operating systems or hfsutils or anything else. In principle, the installer can just block copy it to a partition like it would a boot block. The idea is that it can work like the boot block does on x86 or sparc, installing some stub loader you never really need to update that loads the real loader from UFS -- the boot block internally just happening to be a small HFS filesystem.

It also gets around a build dependency on hfsutils by making a "template" HFS disk image with some magic strings where the relevant files need to go using hfsutils. This is then saved and put in CVS (hfs.tmpl.bz2.uu), and the block offsets of those two files (found with grep) and saved in Makefile.hfs. The regular build system then builds the loader, expands the template image, and dds the loading binary into the file system at the appropriate offset. It's a dirty, horrible hack, but it seems to work well. You can see the details in the Makefile and generate-hfs.sh.
-Nathan



Home | Main Index | Thread Index | Old Index