[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Taking a look now, to see if some simple manipulation can do the trick, but just a quick run through of this script (beta 1_92 that you can get from my sig.) , in case it might be of some use ...

It can be run in three ways, either from the commandline as you're executing it i.e. "./multi.sh NativeSD SlimROM", by reading a installtype.prop file (either at /sdcard (or /tmp)), or when prompted while using ADB.

Just to go through the way I have it in the script, for the 6MB. First bootloader is checked (clk doesn't need the 6MB), the kernel is checked if it's a 3.0.x or not (currently it's a hexdump check - might change to checking strings if possible), and the 6MB of zeros is generated adhoc - if needed.

With the script mentioned in this thread (only thing having issues with is the attempts at a portadroid type) (I'm gonna start a new one in the NAND thread - with the dropbox link in my sig.), all you need to add to your ROM zip is the NAND initrd.gz, and if you want to add a different mountfs.sh file to the ramdisk just have one added to /tmp.

I'll take a look at you're scripts and report back.

Edit. Yea I see you've just added the unaltered code, so you haven't attempted anything yet (unless I missed something). In the script I created a few options/arguments - one of them - mr (modifyramdisk) would do the trick here. Feel free to trim the fat from it (mkmountfs shouldn't be needed unless you want to cut down to one initrd.gz). The current code is:

#/sbin/sh
modifyramdisk() {
#if grep -q Ubuntu /proc/version; then
#	bootloader
#else
bootloadercheck
#fi
#mntstuff
#bootingred
#mkmountcheck
#mkinitrd
initrdcp
}
#bootloader() {
#bootloader=MAGLDR
#}
bootloadercheck() {
busybox printf "%b\n" "checking bootloader"
bootloader=MAGLDR
if grep -iq "clk" /proc/cmdline; then
bootloader=cLK
fi
if grep -iq "haret" /proc/cmdline; then
bootloader=haret
fi
####For testing
#bootloader=haret
}
#mntstuff() {
#mkdirs
#partnames
#if [ ${type} != "NAND" ]; then
#	mountpart
#else
#	mount /data
#fi
#if [ ${install_type} -lt "3" ]; then
#	mount /system
#fi
#}
#mkdirs() {
#busybox printf "%b\n" "creating directories"
#mkdir -p /NativeSD 2> /dev/null
#mkdir -p /DirectSD 2> /dev/null
#mkdir -p /boot_dir 2> /dev/null
#mkdir -p /boot 2> /dev/null
#mkdir -p /system 2> /dev/null
#mkdir -p /data 2> /dev/null
#mkdir -p /cache 2> /dev/null
#mkdir -p /sdcard/NativeSD/"${ROM_NAME}"_"${type}" 2> /dev/null
#}
#partnames() {
#if [ ${type} = "porta" ]; then
#	firstpart=/dev/block/loop1
#	secondpart=/dev/block/loop2
#	thirdpart=/dev/block/loop3
#	mkloopdev
#elif [ ${typopt} = "i" ]; then
#	mount /data
#	datalocat=` mount | grep /data | busybox cut -d ' ' -f '1' `
#	firstpart=${datalocat}
#	secondpart=${datalocat}
#	sdcard=/data/media
#else
#	firstpart=/dev/block/mmcblk0p2
#	secondpart=/dev/block/mmcblk0p3
#fi
#busybox printf "%b\n" "setting partitions with ` echo ${firstpart} | busybox cut -d "/" -f "4" ` format"
#}
#mountpart() {
#busybox printf "%s\n" "mounting files"
#sdmounted=` mount | grep "${sdpart} on /sdcard" `
#sdfile=` ls -la | grep "sdcard" `
#if [ -z "${sdmounted:-$sdfile}" ]; then
# mount -t auto ${sdpart} /sdcard
#fi
#if [ ${mountedalready:-nope} = "nope" ]; then
#	mount --bind /sdcard/NativeSD /boot_dir
#	mount --bind /sdcard/NativeSD/${ROM_NAME}_${type} /boot
#	mountedalready=yes
#fi
##if [ ${type} = "porta" ]; then
##	if [ ${loopdevready:-not} = "yes" ]; then
##	echo "loops ready to mount: ${loopdevready}"
##	mount ${firstpart} -t ${mt1} -o rw,noatime,nodiratime,sync /system
##	mount ${secondpart} -t ${mt2} -o rw,noatime,nodiratime,sync /data
##	mount ${thirdpart} -t ${mt3} /cache
##	printf "#!/sbin/sh\nlosetup -d ${firstpart}\nlosetup -d ${secondpart}\nlosetup -d ${thirdpart}\n" > /tmp/umountloop.sh
##	fi
##else
#	if [ -b "${firstpart}" ]; then
#	if [ ${typopt} = "i" ]; then
#	mount --bind /data/NativeSD /NativeSD
#	else
#	mount -t auto ${firstpart} /NativeSD
#	fi
#	if [ ${type} = "NativeSD" -o ${type} = "DataOnExt" ]; then
#	mkdir -p /NativeSD/${ROM_NAME}/data 2> /dev/null
#	mount --bind /NativeSD/${data_NAME}/data /data
#	fi
#	if [ ${install_type} -gt '2' ]; then
#	mkdir -p /NativeSD/${ROM_NAME}/system 2> /dev/null
#	mount --bind /NativeSD/${ROM_NAME}/system /system
#	fi
#	fi
#	if [ -b "${secondpart}" ]; then
#	mount -t auto ${secondpart} /DirectSD
#	if [ ${type} = "DirectSD" ]; then
#	mkdir -p /DirectSD/${data_NAME}/data > /dev/null
#	mount --bind /DirectSD/${data_NAME}/data /data
#	fi
#	fi
##fi
#}
#bootingred() {
#busybox printf "%s\n" "obtaining an initrd.gz and zImage to work with"
#local installsystem=` find /sdcard -name *.zip | grep ${ROM_NAME} `
#if [ -n "${installsystem}" -a ${bootstuff:-notdone} = "notdone" ]; then
#	local romzip=` ls /sdcard/${ROM_NAME}*.zip | busybox head -n1 `
#	cp -rf ${romzip} /sdcard/${ROM_NAME}_${type}.zip
#	chmod 0777 /tmp/7za
#	printf "initrd.gz\nzImage\nboot.img\n" > inc.lst
#	/tmp/7za x /sdcard/${ROM_NAME}_${type}.zip '-ir@inc.lst' -o/inc -y
#	rm -rf /sdcard/${ROM_NAME}_${type}.zip
#	bootstuff=done
#	bootingred
###### Copying zImage and initrd.gz from /boot_dir when one wasn't in the zip
#else
#	if [ ! -e "/tmp/boot.img" ]; then
#	nandinitrd=` find /inc -name initrd.gz -print0 | busybox xargs -0 ls -s | busybox sort -nr | busybox awk '{print $(NF)}' | busybox tail -n 1 `
#	zImagelocat=` find /inc -name zImage `
#	if [ -n "${zImagelocat}" ]; then
#	printf "%b\n" "zImage is at ... ${zImagelocat}"
#	cp ${zImagelocat} /tmp/zImage
#	fi
#	if [ -n "${nandinitrd}" ]; then
#	printf "%b\n" "nand ramdisk is at ... ${nandinitrd}"
#	cp ${nandinitrd} /tmp/initrd.gz
#	fi
#	else
#	chmod 0777 /tmp/unmkbootimg
#	cp /ramds/boot.img /tmp/boot.img
#	mkdir -p /tmp/boot 2> /dev/null
#	cd /tmp
#	./unmkbootimg /tmp/boot.img /tmp/boot
#	cd /
#	cp /tmp/boot/boot.img-ramdisk.gz /tmp/initrd.gz
#	cp /tmp/boot/boot.img-zImage /tmp/zImage
#	fi
#fi
#if [ ${runonce:-once} = "once" ]; then
#	if [ -f "/sdcard/zImage" ]; then
#	cp /sdcard/zImage /tmp/zImage
#	cp /sdcard/modules/* /system/lib/modules/ 2> /dev/null
#	fi
#	if [ -f "/sdcard/initrd.gz" ]; then
#	cp /sdcard/initrd.gz /tmp/initrd.gz
#	fi
#	local runonce=twice
#	if [ -f "/sdcard/useit/boot.img" ]; then
#	cp /sdcard/useit/boot.img /tmp/boot.img
#	bootstuff=done
#	bootingred
#	fi
#fi
#if [ ! -f "/tmp/initrd.gz" ]; then
#	echo "no ramdisk found to modify - Exitting"
#	busybox printf "%b\n" "Please flash ${ROM_NAME}_${type}.zip in recovery"
#	exit 0
#fi
#}
#mkmountcheck() {
#if [ ! -f /tmp/mountfs-"${type}".sh ]; then
#	echo "making mountfs.sh for ${type}"
#	if [ ${type} = "porta" ]; then
#	mkmountfsloop || exiterr
#	else
#	mkmountfs || exiterr
#	fi
#fi
#}
#mkinitrd() {
#busybox printf "%b\n" "modifying ramdisk"
###### Setting up working directory
#cp /tmp/initrd.gz /tmp/initrd_"${ROM_NAME}".gz
#mkdir -p /tmp/work
#cd /tmp/work
#cp /tmp/initrd.gz /tmp/initrd_o.gz
###### Unzipping nand kernel
#gzip -d -c ../initrd.gz | busybox cpio -i -d
#if [ ! -d bin ]; then
# mkdir bin
#fi
#cp /tmp/busybox /tmp/work/bin/busybox
#cp /tmp/e2fsck /tmp/work/bin/e2fsck
#cp /tmp/mountfs-${type}.sh /tmp/work/mountfs-${type}.sh
#	if [ $typopt = "init" ]; then
#	cp /tmp/work/init /tmp/work/init.android
#	cp /tmp/mountfs-${type}.sh /tmp/work/init
#	chmod 755 /tmp/work/init.android ; chmod 755 /tmp/work/init
#	printf "#!/bin/busybox sh\necho init ran" > /tmp/work/mountfs-${type}.sh
#	else
#	cp /tmp/mountfs-${type}.sh /tmp/work/mountfs-${type}.sh
#	fi
#if [ ${mt1:-f2fs} = f2fs -o ${mt2:-f2fs} = f2fs ]; then
# busybox printf "%b\n" "copying fsck for f2fs"
# cp /tmp/mkfs.f2fs /tmp/work/bin/mkfs.f2fs ; cp /tmp/mkfs.f2fs /system/bin/mkfs.f2fs
# cp /tmp/fsck.f2fs /tmp/work/bin/fsck.f2fs ; cp /tmp/fsck.f2fs /system/bin/fsck.f2fs
# chmod 0777 /tmp/work/bin/mkfs.f2fs; chmod 0777 /system/bin/mkfs.f2fs
# chmod 0777 /tmp/work/bin/fsck.f2fs; chmod 0777 /system/bin/fsck.f2fs
#fi
#chmod 0777 /tmp/work/mountfs-${type}.sh
#chmod 0777 /tmp/work/bin/busybox
#chmod 0777 /tmp/work/bin/e2fsck
#
###### Modifying ramdisk to not use yaffs, and use sd partitions instead.
#if [ "${install_type}" -gt '2' ]; then
# busybox sed -i '/mtd@misc/s/^/#/' /tmp/work/ueventd.*.rc
# busybox sed -i '/mount yaffs2/s/^/#/
# s/# #/# /g' /tmp/work/*.rc
#fi
###### Checking for anything other than nand is to be installed
#if [ "${install_type}" -gt '1' ]; then
# busybox sed -i "/on fs/ a exec /mountfs-${type}.sh" /tmp/work/*.rc
# chmod 0750 /tmp/work/init*.rc
# chmod 0644 /tmp/work/ueventd.*.rc
##	if [ ${type} = "porta" ]; then
##	# modify for SD Card Boot
##	sed -i "s/service ril-daemon \/system\/bin\/rild/service ril-daemon \/system\/bin\/rild -l \/system\/lib\/libhtc_ril_wrapper.so/g" /tmp/work/init*.rc
##	##sed -i "s/on fs/#on fs/g" /tmp/work/init*.rc
##	sed -i "s/on post-fs/#on post-fs/g" /tmp/work/init*.rc
##	sed -i "s/on post-fs-data/#on post-fs-data/g" /tmp/work/init*.rc
##	sed -i "s/user drm/user root/g" /tmp/work/init*.rc
##	sed -i "s/on post-fs-data/on init\n mkdir \/data\/media 0775 media_rw media_rw\n chown media_rw media_rw \/data\/media/g" /tmp/work/init*.rc
##	fi
#fi
###### Building new ramdisk
#find . | busybox cpio -o -H newc | gzip -9 > /tmp/initrd-done.gz
#}
initrdcp() {
busybox printf "%b\n" "copying ramdisk"
###### Checking bootloader
if [ ${bootloader} != cLK ]; then
###### Checking zImage type
if [ -f /tmp/zImage ]; then
`hexdump /tmp/zImage | grep '1f 8b 08'` > /tmp/zI.txt
if grep -q 00003f80 "/tmp/zI.txt"; then
dd if=/dev/zero of=/tmp/6MB bs=1M count=6
fi
fi
cat /tmp/initrd-done.gz >> /tmp/6MB; cp /tmp/6MB /tmp/initrd.gz
else
cp /tmp/initrd-done.gz /tmp/initrd.gz
fi
cp /tmp/initrd.gz /boot/initrd.gz; cp /tmp/zImage /boot/zImage; cp /tmp/initrd.gz /boot_dir/initrd.gz; cp /tmp/zImage /boot_dir/zImage
}
#ROM_NAME=$1
#type=$2
#install_type=` busybox expr index "Axvco" "${type}" `
modifyramdisk

That's the full modifyramdisk part of the script (with most of the unneeded functions #ed out)... all you really need is actually the initrdcp bit. - copy zImage and initrd.gz (renamed to initrd.gz-done or change code above) to /tmp and run initrdcp part. There are various ways of running/calling the script, tell me which way you think will be easiest for you and I'll try and help you out

Edit2. I see what you're looking for

dd if=/dev/zero of=/tmp/6MB bs=1M count=6

is what makes the 6MB file.