LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to make initramfs.img handly (http://www.linuxquestions.org/questions/linux-general-1/how-to-make-initramfs-img-handly-4175457434/)

arnold.king 04-08-2013 09:17 PM

how to make initramfs.img handly
 
hi, all:
as the subject, is there any way to make initramfs.img by hand, with out make install kernel?thanks!(English is poor, hope you understand)

eklavya 04-08-2013 10:56 PM

Quote:

Originally Posted by arnold.king (Post 4927937)
is there any way to make initramfs.img by hand

Do you mean initrd.img (initial-ram-disk)?

It is kernel file, when you install kernel, it creates for you.

This is the wikipedia opinion about initrd.img and it clears all thing about it.
Code:

In computing, initrd (initial ramdisk) is a scheme for loading a temporary root file system into memory in the boot process of the Linux kernel.
You want to make it manually, correct? what do you mean by that?
If you are thinking , open a text editor, paste the content and save again process makes this file, You are mistaken.

If you want to learn about this, click here.

arnold.king 04-08-2013 11:38 PM

dear eklavya:
thanks for your answer, it is so meaningful for me. i want to make initial-ram-disk manually, i know it will be build when install kernel. and i know the function of it. but i don't know how to make it manually. actually, i want to built a linux system all from source code, just like LFS. Any advice is appreciate. thanks again!

eklavya 04-09-2013 01:26 AM

An initrd image is needed for loading your SCSI module at boot time. If you do not need an initrd image, do not make one and do not edit lilo.conf or grub.conf to include this image.

The /sbin/mkinitrd shell script can build a proper initrd image for your machine if the following conditions are met:

1) The loopback block device is available.

2) The /etc/modules.conf file has a line for your SCSI adapter; for example:
Code:

    alias scsi_hostadapter BusLogic
To build the new initrd image, run /sbin/mkinitrd with parameters such as this:
Code:

/sbin/mkinitrd /boot/initrd-2.4.7-3.img 2.4.7-3
In the above example, /boot/initrd-2.4.7-3.img is the filename of the new initrd image. 2.4.7-3 is the kernel whose modules (from /lib/modules) should be used in the initrd image. This is not necessarily the same as the version number of the currently running kernel.

If you don't find above info suitable for you, try this

arnold.king 04-10-2013 08:55 AM

dear eklavya:
thanks your help, i think i got the way. best wishes


All times are GMT -5. The time now is 09:00 PM.