Hi : I find that my initramfs_data.cpio generated by gcc does not contain init files ,which should be executed by terminal initialization. My initramfs_data.cpio only contains these : /dev /dev/consol /root . where to search the init file? thanks
On Sun, 24 Mar 2013 16:27:27 +0800, ishare said:
Hi : I find that my initramfs_data.cpio generated by gcc does not contain init
files ,which should be
executed by terminal initialization.
My initramfs_data.cpio only contains these : /dev /dev/consol /root .
where to search the init file?
You want to use mkinitramfs or mkinird or dracut or whatever your distro calls it to create one. gcc has no *clue* what needs to go in the initramfs (for example, if your root file system is on a LVM partition on a LUKS-encrypted disk, the initramfs has to do a 'cryptsetup openLuks' and then an 'lvm varyon' before the mount will succeed). Plus any modprobes that may or may not be needed, etc etc etc.
On Sun, Mar 24, 2013 at 01:28:53PM -0400, Valdis.Kletnieks@vt.edu wrote:
On Sun, 24 Mar 2013 16:27:27 +0800, ishare said:
Hi : I find that my initramfs_data.cpio generated by gcc does not contain init
files ,which should be
executed by terminal initialization.
My initramfs_data.cpio only contains these : /dev /dev/consol /root .
where to search the init file?
You want to use mkinitramfs or mkinird or dracut or whatever your distro calls it to create one. gcc has no *clue* what needs to go in the initramfs (for example, if your root file system is on a LVM partition on a LUKS-encrypted disk, the initramfs has to do a 'cryptsetup openLuks' and then an 'lvm varyon' before the mount will succeed). Plus any modprobes that may or may not be needed, etc etc etc.
Thanks for reply! Under the 2.6.0 kernel source tree , there is a folder named 'usr' , there are makefile and related files in it to make out a initramfs_data.cpio , when making kernel , this initramfs_data.cpio will be made out together , then it will be placed into kernel from __initramfs_start to __initramfs_end . and the data in this space will be write into /initrd.image . As I know , at the end of init , a init file will be executed , it should either be /sbin/init or /etc/int , etc. I want to ask a NewBie question : is this init file located in /initrd.image or boot disk ?
participants (2)
-
ishare -
Valdis.Kletnieks@vt.edu