I need to create an initramfs to load a driver to access EMMC which contains the root filesystem. In my current kernel build, the EMMC driver is modular (sorry, can't change this). After the kernel boots, it loads initramfs. From initramfs, it needs to switch to a partition on the EMMC which contains the actual rootfs using the switch_root function.Till here it is all works well. I can create initramfs, get the kernel to load it and then also get it to switch to /dev/mmcblk0p2 which is the EMMC partition containing the actual rootfs.My query:After the booting is complete, mount command shows the following:rootfs on / type rootfs (rw)/dev/mmcblk0p2 on / type ext4 (rw,sync,noatime,data=ordered)proc on /proc type proc (rw,relatime)/dev/mmcblk0p1 on /var/volatile/run/media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,sh)/dev/mmcblk0p3 on /var/volatile/run/media/mmcblk0p3 type ext4 (rw,relatime,data=ordered)/dev/mmcblk0p4 on /var/volatile/run/media/mmcblk0p4 type ext4 (rw,relatime,data=ordered)If I build the EMMC driver as a part of the kernel (and get rid of initramfs), the output is very different:rootfs on / type rootfs (rw)/dev/root on / type ext4 (rw,relatime,discard,journal_checksum,commit=1,data=ordered)devtmpfs on /dev type devtmpfs (rw,relatime,size=112272k,nr_inodes=28068,mode=755)/dev/mmcblk0p1 on /var/volatile/run/media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,sh)/dev/mmcblk0p3 on /var/volatile/run/media/mmcblk0p3 type ext4 (rw,relatime,data=ordered)/dev/mmcblk0p4 on /var/volatile/run/media/mmcblk0p4 type ext4 (rw,relatime,data=ordered)Though when I checked kernel logs and major, minor device numbers I found that /dev/root corresponds to /dev/mmcblk0p2 only. But I can not figure out why the output of mount is different. After having spent so much effort in getting initramfs to work, I don't want to miss out on anything trivial. Any help, greatly appreciated.The scripts which does this is given below:#!/bin/sh#Make busybox links#/bin/busybox mkdir -p /usr/bin /sbin /bin#BBINSTALL=/bin/busybox --install -sSWITCH=/bin/busybox switch_rootINSERT=/sbin/insmodMOUNT=/bin/busybox mountUMOUNT=/bin/busybox umountDISKF=/bin/busybox dfLSMOD=/bin/busybox lsmodLS=/bin/busybox lsCAT=/bin/busybox catLS=/bin/busybox lsPRINTENV=/usr/bin/printenvSLEEP=/bin/busybox sleepPS=/bin/busybox psMKDIR=/bin/busybox mkdirCAT=/bin/busybox catGREP=/bin/busybox grepWC=/bin/busybox wc#mount proc and sysfs$MOUNT -t proc none /proc$MOUNT -t sysfs none /sys#Mount NFS/EMMC - check$CAT /proc/cmdline | $GREP -inr /dev/nfs | $WC -l > /var/NFSFOUNDISNFSFOUND=$($CAT /var/NFSFOUND)#Check if NFS was found in Kernel command lineif [ $ISNFSFOUND -ne 0 ]then    echo Mounting NFS:    $MOUNT -a -t nfs -o rw,relatime,vers=2,rsize=8192,wsize=8192,namlen=255,hard,nolock,proto=udp,timeo=1,retrans=1,mountvers=1,addr=172.31.219.19 172.31.219.19:/home/user/Perforce/Mfg_Repo/ng5_mfg/b5/main/nfsroot /mnt/root/else#If NFS was not found, mount EMMC    if [ ! -d /mnt/root ];  then            $MKDIR /mnt/root    fi        echo Mounting EMMC:    $MOUNT -t devtmpfs -o rw,relatime,mode=755 none /dev    $SLEEP 1    #Load EMMC driver    echo Inserting EMMC driver    $INSERT /lib/mmc_block.ko    $INSERT /lib/omap.ko    $INSERT /lib/omap_hsmmc.ko    $SLEEP 1    #Mount the mount point    $MOUNT -a -t ext4 -o rw,relatime,discard,journal_checksum,commit=1,data=ordered  /dev/mmcblk0p2 /mnt/root/fi#Unmount the current mountsecho Unmounting initramfs:if [ $ISNFSFOUND -eq 0 ]thenecho Unmounting devtmpfs(EMMC):    $UMOUNT /devfi#Switch to actual rootfs - This will be done by init program
Different mount output with and without initramfs
linux;mount;startup;initramfs;root filesystem