Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I am working on an embedded linux system.
I am using kernel 2.6. Based on what I have read, the 2.6 kernel always use initramfs. My question is, what modification I need to make and where should I make them so initramfs will load and pass control to a real filesystem?(the real filesystem is in one of the partitions in and external NAND flash)
An initramfs is always created, but you don't have to use it - by default it's empty. If you can build all the support you need into the kernel, just pretend the initramfs doesn't exist.
If you need to wait for the flash drive to come ready before proceeding, you might need to build the archive - have a look in ../Documentation/filesystems/ramfs-rootfs-initramfs.txt in your kernel source tree. It has good explanation, aad some extra references at the bottom.
The magic of switching from an initramfs to a new root filesystem is done by the pivot_root command and system call. See "man 8 pivot_root" and "man 2 pivot_root" for details.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.