LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-16-2014, 11:49 PM   #1
david_8274
Member
 
Registered: Jun 2013
Location: California
Distribution: Ubuntu, Fedora
Posts: 75

Rep: Reputation: Disabled
load real filesystem from initramfs


Hi,

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)

Thanks,
Wei Xu
 
Old 04-17-2014, 05:26 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

Rep: Reputation: Disabled
Are you talking about initramfs or initrd?
 
Old 04-17-2014, 06:02 PM   #3
david_8274
Member
 
Registered: Jun 2013
Location: California
Distribution: Ubuntu, Fedora
Posts: 75

Original Poster
Rep: Reputation: Disabled
@Emerson,

I am using kernel 2.6 so it will be initramfs.

Thanks,
Wei
 
Old 04-17-2014, 07:57 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
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.
 
Old 04-18-2014, 12:34 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,784

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to load filesystem into nand flash ranjana kumari Linux - General 10 01-03-2013 08:37 AM
RHEL 6 : module load order changed in initramfs neo3matrix Linux - Kernel 3 09-12-2012 10:00 AM
nginx load balancer use real ip? VanDaMe Linux - Software 0 09-19-2008 12:58 AM
knfsd won't support map_static, where can I get me a real network filesystem? cyent Linux - Server 0 05-27-2008 01:12 AM
Real newbie/nead to load SUSE with XP frogjuice Linux - Newbie 1 08-19-2006 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration