Skip to contentSkip to conversation

initramfs.cpio

DISCUSSION ishare 2 participants 3 messages Mar 24, 2013 – Mar 25, 2013

lore
Share & tools
lore

ishare

author
#0 lore raw

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

#1 lore raw
Quoted 3 lines · ishare

Hi :
I find that my initramfs_data.cpio generated by gcc does not contain init

files ,which should be

Quoted 5 lines

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130324/96b93526/attachment.bin

author
#2 lore raw
Quoted 9 lines · Valdis.Kletnieks at vt.edu
Quoted 3 lines · ishare

Hi :
I find that my initramfs_data.cpio generated by gcc does not contain init

files ,which should be

Quoted 4 lines

executed by terminal initialization.

My initramfs_data.cpio only contains these : /dev /dev/consol /root .

Quoted 8 lines
Quoted 1 line

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 ?