Thanks Dack. This is great. I will test it as soon as possible.
The main problem isn't getting this working, it's getting it working as easily as possible. But some moments of serious brain fade have slowed me down making a distributable partition image. My latest attempt is being tested as we speak. My ultimate goal would be to have a pair of scrubbed iso's, one DVD5 and one DVD9, that a programme can add selected partitions to, set the correct region, and add the main.dol from a directory(so updates to the loader don't need all new iso's. I don't know how you would build a legal to distribute iso, but I know it's got to be possible.
I'd also like to do a little app which uses a template partition.bin, apploader.img etc, lets you select a main.dol and directory for your source files, rename the partition, and let you build your own homebrew partitions. The homebrew would have to be hacked to read off of wii disc, and maybe give the option of creating a save file, but that would be cool. Does PartitionBuilder work on the CLI?
Also if anyone knows how much leeway you have with titleID's. I've noticed some games come with the X region (some crazy golf game), but do you have to stick to the R__x formula?