thank you for your valuable reply. The links that you forwarded are useful to me.
I am interested in stuff where " grub2-mkconfig " is executed while generating qcow2 image. since we are launching OSTREE's root as our rootfs not /dev/mapper/atomic-root. if we mount /dev/mapper/atomic-root as / and ran "grub2-mkconfig" then it will assume /dev/mapper/atomic-root as root to launch not ostree's root. To resolve this we are sending kernel argument "ostree=/ostree/rootfs" to kernel. i want to know, what environment is needed to generate grub.cfg.... Can i see related scripts. or kindly tell me, if my assumptions are wrong.