yashsingh1/xdaforums huggingface dataset:
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Yea that looks fine to me... what I was referring to by the default is with the line dd if=/dev/zero of=/tmp/6MB bs=1M count=6, I'm not 100% sure but what I meant was that if you had left of the M, different recoveries/dd's might default to different values (i.e. one might be compiled to use kb and another to use M) - it's a minor issue just thought I'd mention it, as it could be easily overlooked.

And just fyi the way I did this in the other script was to have the 6MB dd to be only run if the bootloader was magldr. With the cat initrd.gz >> 6MB being done regardless of bootloader. Meaning that if it's running magldr the 6MB file is the 6MB of zeros and the initrd.gz, if it's cLK then the initrd.gz is simply renamed - again it's just a thought.

Not sure about backporting, I believe with those patches I applied essentially features were being stripped as the patches were applied from 3.10 to 3.0, there also may have been something in the config that may have been needed and I know that the kernel I compiled didn't have full SELinux support (and don't recall having much joy in compiling one with full support).

I see know what you're trying - formatting nand to ext4 (is there much benefit to that) - didn't know we could do that - although I'm not sure why I thought that as that how chrooted linux works etc. This does seem to be going down the root of Portadroid then - not my expertise - but I'd guess you'd need to set up the loops before the init.rc is run (just like the Portadroid guys did), as the earlier experiments with the porta type (with the loops occuring in the same place as NativeSD) didn't seem to work (although logically it should work the same).

Anyway installing into a looped filesystem should be simple enough, booting it may be another story. For testing purposes it might be easier to try with a looped data.ext4 , my thinking would be to have system on nand (or on ext4), and to have a data.ext4 on nand, try to loop it in init..rc or whatever, if it doesn't work - you'll probably stall boot but you should be able to try and loop mount it with adb.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
I think i managed to install it ok by editing updater script, the install process is FAST, seems write speed to a loop is about twice as quick

but booting it is a problem. Had permissions problems with insecure init.rc and default.prop, as you did earlier. Managed to chmod 0750 init*.rc

But now i get " init: /init.rc: 157: invalid command 'losetup'" in dmesg, is losetup in busybox? could I busybox losetup ... in init.rc?
[HD2 Android Q&A, Help & Troubleshooting and Genera] macs18max:
Last question hypo turtle, robbie. Does or script support directsd and/or swap?

If yes, has it been tested?

Reason I ask is because installer that I use doesn't support directs or swap, so if some user directsd or swap I can link them to this thread and they can implement your script
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Yes the directSD part of the script works fine (in short the script adds a redirect in the init.rc of the nand initrd.gz to a script with that script mounting various systems and filesystem types), swap if I recall is typical implemented via a init.d script that looks for a swap partition.

I'll go through and annotate the script a little better for any one that can help fix it up a bit, as I'm sure it'll be useful for someone.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
DirectSD is supported in the script, but swap isn't.

Edit; Ninja'd by HyT

---------- Post added at 04:44 PM ---------- Previous post was at 03:49 PM ----------

It seems i can exec /bin/busybox losetup... in init.rc because that error disappears in dmesg. But it still doesn't boot.

dmesg- https://dl.dropboxusercontent.com/u/24033707/DMESG.TXT

updater script- https://dl.dropboxusercontent.com/u/24033707/updater-script.txt

init.rc- https://dl.dropboxusercontent.com/u/24033707/init.rc.txt

system_mounter.sh- https://dl.dropboxusercontent.com/u/24033707/system_mounter.sh.txt
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Seems logical to me, the only thing I can see is that munjeni wiped the mtd partition before dding it to ext2/4. dmesg just shows that wither system isn't mounted or that the system hasn't been installed in there, you should be able to mount loop in recovery and check.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
I couldn't get it to wipe, flash-erase didn't work,so skipped it thinking dd zeros would do the job. Will try again tomorrow, thanks.

Edit; I did try "mount ext4 /dev/block/loop6 /system rw" instead of "mount -t ext4 /dev/block/loop6 /system" in init.rc but same. Was thinking to put mount stuff in an init.*.rc file and import it at the start of init.rc

Edit; It seems that after the partition is unmounted, you can't mount it again. The only way to get it to mount again is to reformat to ext4 first. This occurs after umount and after a reboot. Can't see any way around that. It was worth trying though, even without an ftl.

I did find ubifs http://en.wikipedia.org/wiki/UBIFS and http://www.linux-mtd.infradead.org/doc/ubifs.html which might be interesting.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Too bad about that - would need to see it for myself to see what's going on. Just fyi to completely remove a loop you need to umount /system and umount /dev/loop6 .

Would also be an idea to try SquashFS - not sure which kernels have it enabled in their config though - only downside being it is read only - could be good for some of the small builds though BB CM7 for example, to increase nand data space.

My thinking would be (not 100% sure it work like this - will need to consult a SquashFS rom) to create either a squashed system file and dd it into mtd2 or just squash some parts of system. It may work without init.rd modification or it may not.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
A search for squashfs in hd2 forum only gives this kernel http://xdaforums.com/showthread.php?t=1268247
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
I'm positive the code for it is there in all the kernels (I think it was mainstreamed in 2.6), just perhaps not compiled, I'll try and see how much space could be saved ... no point persuing if it doesn't give any noticable benefit.

You can check the filesystems supported by the current kernel by reading /proc/filesystems.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
tytung's JB kernel doesn't support it (does support nilfs2 and reiserfs)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Found this thread http://xdaforums.com/showthread.php?t=523662
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Hi HypoTurtle, looking at what i did in my previous post and your instructions in the one before that, i have realised that i didn't put anything in build.prop:o

I will have another go tomorrow.

Is it worth trying the unified script? If so, how.

Edit; I meant that IT didn't edit build.prop to add "DirectSD", I think is because i didn't put a return after the fi in set_build_prop.sh.

Trying again now.

Edit2; It is not creating new initrd.gz nor is it putting new zImage in NativeSD folder, despite me putting nand initrd.gz in NativeSD_patch.zip/install folder.

Attached is result of mount command and recovery log immediately after rom.zip install.

After installing NativeSD_patch.zip, i looked for /tmp/work folder but it wasn't there, is the folder itself removed by the line "rm -r /tmp/work/*" at the end of nativesd.sh?

Edit3; It seems that the line ro.build.display.id is still not being edited to add type, although it is being edited to add the softkeys line at the end.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Thanks for the report, Is the ROM NAME added to the build.prop?

I checked the array stuff in an emulator and that worked fine. device is broken in another way now (merged 2 devices with just the button strip left broken - got a replacement for 6p - now usb porrt has snapped of; so no adb until device is fully booted).

I have compiled TWRP 2.7 using Omni sources - not sure why but f2fs wasn't compiled in - trying to built now extended TWRP with all the nilfs2 stuff changed to f2fs.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Can't see it, have attached zipped build.prop
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
You have saved it as set_build_prop_DirectSD.sh right? Or at least redirected updater-script to run it.

Edit. think I'm missing a few /'s before system. fixing on #1
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
I deleted the others, saved yours and changed the updater.script references to run yours.

Edit; Just tried with post #1 edited set_build_prop.sh and it still is not changing build.prop

Edit2; how is the build.prop line supposed to look? Is it

ro.build.display.id=cm_leo-userdebug 4.4.2 KVT49L dfd6c17471 test-keys[ChauTien-CM11-V2][DirectSD]

perhaps we can put this in rom.zip to test the post#2 patch.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Something like that yes (... test-keys [ChauTien-CM11-V2] [DirectSD]). Manually changing that in the ROM zip might be simpler (or adb pushing it in after install). There'll be spaces between the terms so that they are picked up as seperate strings by awk in the nativesd.sh script.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
No luck i'm afraid, initrd.gz is not >6mb and is original zImage.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Looking at nativesd.sh in the patch.zip i realised that the new initrd.gz and zimage would be put in boot_dir, if successful, not /sdcard/NativeSD/ and /sdcard/NativeSD/ROM_NAME/

after re-install and running the patch, i used twrp filemanager to look at /boot and /boot_dir, both are empty. I tried to mount them using twrp mount but couldn't.

I did manage to get a copy of /tmp folder attached. work folder doesn't exist, would the folder itself be deleted after the rm -r /tmp/work/* ?

I might # that line and try again, will also try to mount /boot and /boot_dir using terminal.

I did try to boot from nand instead of sd from magldr, but got "no boot sources"

Edit; after #ing the rm line, work folder is still not there, so something must be wrong earlier.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
The zip is meant to be run after a ROM zip thus /sdcard/NativeSD and /sdcard/NativeSD/$ROM_NAME should be mounted as /boot and /boot_dir. The zip needs to run properly - /boot and /boot_dir mounted and access to /system/build.prop. you should have access to adb while in recovery check mount and df to check that something is still mounted there. And can you run 'adb shell sh /tmp/nativesd' ? It might point out what's going wrong.

# Checking bootloader
if [ "${bootloader}" != "cLK" ]; then
cat initrd-done.gz >> 6MB
cp 6MB /boot/initrd.gz
cp /tmp/zImage /boot/zImage
#Checking if nand install
if [ "${install_type}" -gt 2 ]; then
cp 6MB /boot_dir/initrd.gz
cp /tmp/zImage /boot_dir/zImage
fi
else ...
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
i posted result of mount here http://xdaforums.com/showpost.php?p=52270350&postcount=21 so it seems boot isn't mounted after installing rom.zip

Am installing again to see.

Edit; oops boot and boot-dir are there at the bottom read-only.

Edit2; this is odd, the result of mount i posted before has sdcard rw, now the sdcard mount points are showing up as read-only, p2 and p3 are rw. also, can't get adb to work, adb devices shows several devices with same number as offline and one device as recovery. So can't adb shell. This is directly after installing rom.zip, before patch install.

Edit3; Have attached new result of mount > /DirectSystem/mountedafterinstall.txt since p2 is mounted and i can access p2 in windows.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Try running 'adb kill-server' first and see if adb works again - adb would be the easiest way to see the whats going on.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
i just re-installed without usb plugged in and i get all the sdcard mount points as rw.

Edit; plugged in usb and did kill-server so now have all mounted with adb working.

Edit2; after running patch, if i do adb shell sh /tmp/nativesd.sh, i get

will change to

Edit 3; We seem to be getting somewhere, the zImage and initrd.gz in /sdcard/NativeSD remain unchanged, however the ones in /sdcard/NativeSD/ChauTien-CM11-V2 are different, it is the new kernel (3.48mb) and a 793kb initrd.gz attached

remember that i put the nand initrd.gz in patch's install folder.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
is the md5sum stuff still there in nativesd.sh, going to need to remove that I think. Does ' adb shell md5sum /tmp/zImage' report -

zImage 1cb7bcf80845f0178b99f7b9a5f80669 or something else - regardless I don't think I added the '| cut' stuff from #2. I'll add a new zip when I get the chance.

Once that's working I can add in an override for ROM_NAME.prop.

Edit. That's just the bin folder so initrd.gz isn't opened - can you check the contents of /tmp - is there a initrd-ChauTien-CM11-V2.gz file? it might just be missing the { } around rom_name
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
yes, i didn't remove md5 check.

I did find a few more ";"s missing before "then"s and added them before that last test run.

Running the test again i get the attached from adb shell, the first ls -l was done after install and before running the patch.

It is the correct md5sum.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Thanks few issues picked up there wrong variable used and missing []'s

The following should have those issues removed:

#!/sbin/sh

## Bootloader check (copy of checksys.sh)
echo "bootloader=MAGLDR" > /tmp/nfo.prop

output=`grep -i "clk" /proc/cmdline`
if [ -n "$output" ]; then
echo "bootloader=cLK" > /tmp/nfo.prop
fi

## Exporting variables
ROM_NAME=` cat /system/build.prop | grep ro.build.display.id | awk '{print $(NF-1)}' | sed 's/\(\[\|\]\)//g' `
type=` cat /system/build.prop | grep ro.build.display.id | awk '{print $(NF)}' | sed 's/\(\[\|\]\)//g' `
bootloader=` cat '/tmp/nfo.prop' | sed 's/bootloader=//g' `

## Changing install_type to numbered value
if [ $type='NAND' ]; then
install_type='1'
fi
if [ $type='DataOnExt' ]; then
install_type='2'
fi
if [ $type='NativeSD' ]; then
install_type='3'
fi
if [ $type='DirectSD' ]; then
install_type='4'
fi

## Copying zImage from /boot_dir if one wasn't added to zip
if [ ! -f "/tmp/zImage" ]; then
cp /boot_dir/zImage/ /tmp/zImage
fi
if [ ! -f "/tmp/initrd.gz" ]; then
cp /boot_dir/initrd.gz/ /tmp/initrd.gz
fi

## Checking if zImage is for 3.0.x
if [ "md5sum /tmp/zImage | cut -d ' ' -f '1'" != "1cb7bcf80845f0178b99f7b9a5f80669" ]; then
rm /tmp/6MB
fi

## Setting up working directory
cp /tmp/initrd.gz /tmp/initrd-${ROM_NAME}.gz
mkdir -p /tmp/work
cd /tmp/work

## Unzipping nand kernel
gzip -d -c ../initrd-${ROM_NAME}.gz | cpio -i -d
mkdir bin
cp /tmp/busybox bin/busybox
cp /tmp/e2fsck bin/e2fsck
cp /tmp/mountfs-${type}.sh mountfs-${type}.sh
chmod 0777 mountfs-${type}.sh
chmod 0777 bin/busybox
chmod 0777 bin/e2fsck

## Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt 2 ]; then
sed -i '/mtd@misc/s/^/#/' ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${type}.sh
fi

## Checking if anything other than nand is to be installed
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs-'${type}'.sh' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${type}.sh
chmod 0750 init.rc
chmod 0644 ueventd.htcleo.rc
fi

# Building new ramdisk
find .| cpio -o -H newc | gzip -9 > ../initrd-done.gz
cd ..

# Checking bootloader
if [ "${bootloader}" != "cLK" ]; then
cat initrd-done.gz >> 6MB
cp 6MB /boot/initrd.gz
cp /tmp/zImage /boot/zImage
#Checking if nand install
if [ "${install_type}" -gt 2 ]; then
cp 6MB /boot_dir/initrd.gz
cp /tmp/zImage /boot_dir/zImage
fi
else
cp initrd-done.gz /tmp/initrd.gz
chmod 0755 /tmp/mkbootimg
chmod 0755 /tmp/mkbootimg.sh
exec /tmp/mkbootimg.sh
if [ "${install_type}" -lt 3 ]; then
flash_image boot /tmp/boot.img else
flash_image sboot /tmp/boot.img
fi
fi

cp /tmp/initrd-$ROM_NAME.gz /tmp/initrd.gz
rm -r /tmp/work/*

Two things that I can't see the problem with is - the /system/build.prop stuff (unless /system is ro again I guess) and not sure why /tmp/initrd.gz isn't there if you have added a initrd.gz to the zip.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
/system seems to be unmounted after running patch, so when we sh nativesd.sh after this, we get this error. i think.

will re-install and try new patch.

Edit; oops, i could have sworn i put nand initrd.gz in patch before, but it is in it now, sorry.

Edit2; Doesn't look like it worked from the attached. No changes in sizes of initrd.gz or zImage in either places on sdcard, note the initrd.gz in both places is the 1.12mb directSD one.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
That makes sense - the way I though of implementing it was that the first zip - (ROM-zip) installs leaves the things needed to run the second zip mounted and then the second zip runs and unmounts everything at the end - wasn't 100% sure that the unmounting would work as the default unmounting in the normal ROM zip didn't seem to do anything particularly in relation to sdcard mounts - perhaps an issue due to the order of the unmounts i.e. /NativeSD (or /DirectSystem/Data) unmount attempted before the /data and /system are unmounted for example.

Anyway as you have adb working you could just adb push things in rather than having to mess with the zip
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Added edit to my last post.

I think i have re-install rom each time to have everything mounted correctly, since the patch seems to unmount after running. pushing won't work if i have to remount everything before re-running.

Edit; there was a missing ; in your last, re-trying..

Edit3; seems to be more in /tmp this time. zImage is the new one in both places, initrd.gz is still 1.12mb, will reinstall and do sh at end. BTW i left usb in this time when installing and all mounted correctly as can be seen in attached

Edit4; have attached second shell output after the sh
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Yea the error reported was about the haret stuff - meant to remove that anyway - updated on #35

Adding

if [ -f "/tmp/Rname.prop" ]; then
Rname='cat Rname.prop'
mkdir /NativeSD
mkdir /boot
mkdir /boot_dir
mount --bind /sdcard/NativeSD /boot_dir
mount --bind /sdcard/NativeSD/${Rname} /boot
mount -t auto /dev/block/mmcblk0p2 /NativeSD
mount --bind /NativeSD/${Rname}/system /system
fi

to nativesd.sh and a Rname.prop file with just the romname to the zip (or adb pushing it) should remove the need to reinstall the ROM.zip

Edit. From the looks of those screenshots it isn't passing the md5sum check and thus the 6MB file is being deleted. just remove that whole '## Checking if zImage is for 3.0.x' section

Edit I wouldn't run the patcher zip (without removing the unmount lines from updater script), just adb push the things in and run the script
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
i didn't add the rname stuff, not sure where to put it

#ed the md5 lines

pushed the install folder to /tmp and then sh-ed, no errors, see attached.

>6mb initrd.gz in /sdcard/NativeSD, with new zImage, tried it but the rom hangs on htc screen, no adb, attached dmesg.

the size of new initrd.gz is 7.12=6+1.12, 1.12mb is the size of directsd initrd.gz, coincidence? will subtract 6mb and check md5sums.

Edit; the new initrd.gz does have f2fs stuff in it, have attached. we are getting there ;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Where's the attached initrd from? is it the 7.12MB with the 6MB removed? Looking at the dmesg I thought that yaffs hadn't been commented ansd it was trying to mount system at mtd as yaffs but that doesn't seem to be the case... every thing looks fine in the screenshot and the initrd.gz (will still need zImage modules copied, just need to add a few line in the patcher zip for that)

I'd guess either it's not picking up the sdcard (try a few reboots and/or removing reinserting the sdcard), or the ROM_NAME folder doesn't exist on p2

NB. rname stuff would go before '## Exporting variables'

Edit found what I was looking for. Remove Red - Add Blue

[COLOR="Red"]chmod 0777 mountfs-${type}.sh[/COLOR]
chmod 0777 bin/busybox
chmod 0777 bin/e2fsck

## Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt 2 ]; then
sed -i '/mtd@misc/s/^/#/' ueventd.htcleo.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' init.rc
[COLOR="Blue"]sed -i '/mount_all/s/^/#/
s/# #/# /g' init.htcleo.rc[/COLOR]
sed -i "s/rOm/$ROM_NAME/g" mountfs-${type}.sh
fi

## Checking if anything other than nand is to be installed
if [ "${install_type}" -gt 1 ]; then
sed -i '/on fs/ a exec /mountfs-'${type}'.sh' init.rc
sed -i "s/rOm/$ROM_NAME/g" mountfs-${type}.sh
chmod 0750 init.rc
chmod 0644 ueventd.htcleo.rc
[COLOR="Blue"]chmod 0777 mountfs-${type}.sh[/COLOR]
fi
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
i added the Rname stuff and i get 2 error messages about auto mount, see attached

i will see if the resulting >7mb initrd.gz boots...

Edit; still not booting, attached dmesg, and initrd.gz(-6mb)

Edit2; i realised that build.prop needs to be in /system, so i pushed it

Then i get can't mkdir /boot_dir so i made that too and after the sh i get no errors, will test if boots

Edit3; the new initrd.gz is 10.5mb:confused:

Edit4; have attached the large initrd.gz(-6mb). When extracted in windows (extract initrd.gz, rename to .rar and extract again) i can't find a huge file in it :confused:

Edit5; i bet is has zimage in it somehow.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Just replace auto with ext4 then I guess (not sure where/when/why /proc is being unmounted)

I'm thinking perhaps that the ramdisk is being duplicated you will need to replace the 6MB file every time you run the script (could fix that in the script I guess - just didn't due to trying to save space). The ramdisk added to /tmp remains unchanged after the script is run (it remains the nand ramdisk) - the 6MB becomes the 6MB plus the ramdisk after every run. Checking this now.

Edit . confirmed the 4.5 one is 4 1.2MB initrd.gz's (I managed to split it into the 4)

Edit. Might as well generate the 6MB on device - 'dd if=/dev/zero of=/tmp/6MB bs=1M count=6' add that somewhere near the top in the nativesd script
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
generating 6mb seems to work ok.

If we are running the nativesd.sh straight from recovery and push install folder and /system/build.prop, then there is no need for Rname nor a need for mounting /system. Just as follows

#!/sbin/sh

## Bootloader check (copy of checksys.sh)
echo "bootloader=MAGLDR" > /tmp/nfo.prop

output=`grep -i "clk" /proc/cmdline`
if [ -n "$output" ]; then
echo "bootloader=cLK" > /tmp/nfo.prop
fi

dd if=/dev/zero of=/tmp/6MB bs=1M count=6
ROM_NAME=` cat /system/build.prop | grep ro.build.display.id | awk '{print $(NF-1)}' | sed 's/\(\[\|\]\)//g' `

mkdir /boot
mkdir /boot_dir
mount --bind /sdcard/NativeSD /boot_dir
mount --bind /sdcard/NativeSD/${ROM_NAME} /boot

## Exporting variables

type=` cat /system/build.prop | grep ro.build.display.id | awk '{print $(NF)}' | sed 's/\(\[\|\]\)//g' `
bootloader=` cat '/tmp/nfo.prop' | sed 's/bootloader=//g' `

This works with no mounting errors either from sh in recovery, or flashing the zip after install. I get the >6mb initrd.gz in both places on sdcard. But it isn't booting still. have attached stripped initrd.gz and dmesg. From dmesg, it seems there is a bind mount problem.