I have earlier received a script from R Hannes Beinert that merges the g4u floppy images, so I will be using his method for UBCD V5.
I've attached the script I use to make g4u bootable images. To use it, you need to obtain the g4u-x.y-fs.zip archive of floppy images. Then invoke the script with the floppy images in proper order, so this would work: ./mkg4u *.fs
The script unwraps the floppy images (a ustarfs) to obtain the tar archive, from which it extracts the boot & netbsd files. This would be more easily achieved from the g4u-x.y.iso image, with the exception that the script also snags the ustarfs bootloader in the first 8k of the first floppy.
Then, the boot & netbsd files are re-tarred along with a special zero-length metafilename which gives the bootloader the volume size of the new image. Finally, the bootloader is prepended to the tar, and the entire file is padded to one of the magic image sizes that memdisk is looking for.
The script works with the older g4u-2.3 distro, as well as the new g4u-2.4alpha2 -- they are two, and three floppies respectively. The script is currently limited to "ED" floppies of 3840k. This limitation is inherited from memdisk. Once the distro gets large enough -- eg, as large as 3 *full* floppies (1440*3 = 4320k) -- it will need to be retooled to create HD images, as per the memdisk documentation.
Hope this is useful.