Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello , all
In linux boot process when using initramfs..
I dont want to use real rootfilesystem ..
I want to continue working on root filesystem on ram disk ..also want to have ability to read/write CF disk..
I am booting linux from CF disk , havind minimal debian 4.0 system on it....
any help / reference will do !!
thanks in advance
Take a look at the file Documentation/filesystems/ramfs-rootfs-initramfs.txt in the linux directory.
Basically, what I did to get this working was to create a directory containing all files for the initramfs and a file describing my initramfs and point to that file in the kernel configuration. You have to provide an /init file in your initramfs, I used a symlink to busybox for that purpose and then I created an /etc/inittab with an entry for my start script. I don't know how this will work in Debian though.
ugglan,
Thanks for the pointer, I was going to post a similar/related question. Funny, I was looking for "initxxx" in the filesystems directory, never thought to look under ramxxx
Question: How do I view, modify and recreate the new initrd.img on Ubuntu, Debian, CentOS, Fedora, Red-Hat, Arch Linux, or SUSE distributions?
1. How To View Content Of initrd.img file?
initrd.img is in gzip format. So move initrd.img to initrd.gz as shown below.
# cp /tftpboot/el5/initrd.img .
# ls
cdrom initrd.img
# mv initrd.img initrd.gz
Unzip the initrd.gz file as shown below.
# gunzip initrd.gz
# ls
cdrom initrd
After unziping the initrd.gz file, the initrd is further in cpio ‘newc’ format. So extract the files from initrd using cpio ‘newc’ format as shown below.
Note: info cpio will give more information about ‘newc’ format.
# mkdir tmp2
# cd tmp2/
# cpio -id < ../initrd
16524 blocks
Now you can view the content of initrd.img file
# ls
bin dev etc init modules proc sbin selinux sys tmp var
2. How To Modify Content of Image and Recreate New Image?
After extracting the file as shown below, make appropriate modification to any of those files. Then pack the files back into the archive using the following commands. Pack the modified files back to cpio ‘newc’ format.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.