[HTC One X] Jhinta:
soo aaa hmmm nevermind.

anyway ,we need to , drop android part , as it wil not be updated anymore

just look at this

# Local filesystem mounting	-*- shell-script -*-

pre_mountroot()
{
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top"
run_scripts /scripts/local-top
[ "$quiet" != "y" ] && log_end_msg
}

mountroot()
{
# list of possible userdata partition names
partlist="userdata UDA DATAFS"

pre_mountroot

[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount"
run_scripts /scripts/local-premount
[ "$quiet" != "y" ] && log_end_msg

# Mount root
#
# Create a temporary mountpoint for the bindmount
mkdir -p /tmpmnt

# Make sure the device has been created by udev before we try to mount
udevadm settle

# find the right partition
for partname in $partlist; do
part=$(find /dev -name $partname|tail -1)
path=$(readlink -f $part)
[ -n "$path" ] && break
done
if [ -z "$path" ]; then
echo "initrd: Couldn't find data partition. Spawning adbd ..." >/dev/kmsg || true
panic "Couldn't find data partition. Spawning adbd ..."
fi
echo "initrd: mounting $path" >/dev/kmsg || true

# Mount the data partition to a temporary mount point
mount $path /tmpmnt

# Loop-mounted flipped model
if [ -e /tmpmnt/system.img ]; then
# Prepare the root filesystem
if [ -e /tmpmnt/.developer_mode ]; then
echo "initrd: mounting system.img (developer mode)" >/dev/kmsg || true
mount -o loop,rw /tmpmnt/system.img ${rootmnt}
mountroot_status="$?"
else
echo "initrd: mounting system.img (user mode)" >/dev/kmsg || true
mount -o loop,ro /tmpmnt/system.img ${rootmnt}
mountroot_status="$?"
fi
mount --move /tmpmnt ${rootmnt}/userdata

# Mount the android system partition to a temporary location
mkdir -p /android-system /android-initrd
mount -o loop,ro ${rootmnt}/var/lib/lxc/android/system.img /android-system

# Get device information
device=$(grep ^ro.product.device= /android-system/build.prop |sed -e 's/.*=//')
[ -z "$device" ] && device="unknown"
echo "initrd: device is $device" >/dev/kmsg || true

# Create any missing persistent directory
for dir in \
android-data \
system-data/etc/NetworkManager/system-connections \
system-data/var/lib/dbus \
system-data/var/lib/NetworkManager \
system-data/var/lib/system-image \
system-data/var/log \
; do
mkdir -p ${rootmnt}/userdata/$dir
done

# Move some data to persistant storage (first-boot)
if [ ! -d ${rootmnt}/userdata/user-data ]; then
cp -Ra ${rootmnt}/home ${rootmnt}/userdata/user-data
fi

# Cleanup some old paths
for dir in system-data/etc/system-image; do
rm -Rf ${rootmnt}/userdata/$dir
done

# Extract the fstab from the android initrd
# NOTE: we should find a faster way of doing that or cache it
OLD_CWD=$(pwd)
cd /android-initrd
cat /android-system/boot/android-ramdisk.img | gzip -d | cpio -i fstab*
cd $OLD_CWD

# Mount all the Android partitions
mount -t tmpfs none ${rootmnt}/android
cat /android-initrd/fstab.* | while read line; do
set -- $line

# Skip any unwanted entry
echo $1 | egrep -q "^#" && continue
([ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]) && continue
([ "$2" = "/system" ] || [ "$2" = "/data" ]) && continue

label=$(echo $1 | awk -F/ '{print $NF}')
[ -z "$label" ] && continue
for dir in by-partlabel by-name by-label; do
path="/dev/disk/$dir/$label"
[ -e "$path" ] && break
done
[ ! -e "$path" ] && continue

mkdir -p ${rootmnt}/android/$2
echo "initrd: mounting $path as ${rootmnt}/android/$2" >/dev/kmsg || true
mount $path ${rootmnt}/android/$2 -t $3 -o $4
done

# system is a special case
mkdir ${rootmnt}/android/system
echo "initrd: mounting ${rootmnt}/var/lib/lxc/android/system.img as ${rootmnt}/android/system" >/dev/kmsg || true
mount --move /android-system ${rootmnt}/android/system

# Apply device-specific udev rules
if [ "$device" != "unknown" ]; then
mount --bind ${rootmnt}/usr/lib/lxc-android-config/70-$device.rules ${rootmnt}/lib/udev/rules.d/70-android.rules
fi

# Bind-mount /lib/modules from Android
[ -e /system/lib/modules ] && mount --bind /system/lib/modules /lib/modules

# Bind-mount the fstab
mount --bind ${rootmnt}/usr/lib/lxc-android-config/image-fstab ${rootmnt}/etc/fstab

# Old flipped model
elif [ -d /tmpmnt/ubuntu ]; then
mount --bind /tmpmnt/ubuntu ${rootmnt}
mountroot_status="$?"

# Possibly a re-partitioned device
else
echo "initrd: Couldn't find a system partition." >/dev/kmsg || true
panic "Couldn't find a system partition. Spawning adbd ..."
fi

[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom"
run_scripts /scripts/local-bottom
[ "$quiet" != "y" ] && log_end_msg
}

whole initrd needs to be modify , its the basic ubuntu-touch initrd they are using img files but we need partitions

so is there a cmdline for it or do we need to edit or both

ow and basic zimage+initrd-new -> boots to initramfs busybox

the whol filpping mode there using is new for me , so needs some reading what its doing , its more or less defined in init