LinuxQuestions.org
Visit Jeremy's Blog.
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 07-13-2010, 08:02 AM   #1
ashishravande
LQ Newbie
 
Registered: May 2010
Posts: 13

Rep: Reputation: 0
Smile chicken-Egg problem in booting sequence


Kindly Explain me the chicken-Egg problem in
booting sequence.......
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 07-13-2010, 08:17 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
This looks like one in a long string of homework questions.

Do you have Linux installed? If so, what version?
What bootloader are you using?

And......If you tell us what is the "chicken-Egg problem" in this context, we might be able to help.
 
Old 07-13-2010, 08:29 AM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Never boot a chicken when it's laying eggs, unless you want them ready-scrambled.
 
4 members found this post helpful.
Old 07-13-2010, 08:41 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
brian*;
Why do I think that you are a candidate for: http://badpuns.com/
 
1 members found this post helpful.
Old 07-13-2010, 08:49 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
I must bookmark that page.
 
Old 07-14-2010, 05:34 AM   #6
falconite
Member
 
Registered: Jul 2010
Posts: 42
Blog Entries: 1

Rep: Reputation: 16
While booting, the Kernel has to mount the root file system, and the root file system can be accessed by modules. But these modules are present inside the Root file system itself. Now the question here is, how can the root file system be mounted when the modules, that are responsible for mounting this root file system, are within the root file system itself. This is something like 'How do you get a chicken when you do not have an egg? And how do you get an egg when you do not have a chicken?' Hence, it is called the Chicken-Egg problem.

So, we use 'initrd' image file. This is an image file that consists of necessary modules to mount the root file system, in read-only module. Once the RFS is mounted, then the modules are invoked and then the RFS is again mounted in RW mode.

Let me know, anybody, if I am wrong.
 
Old 07-14-2010, 07:26 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by brianL View Post
I must bookmark that page.
Yes, http://badpuns.com/ would add to your scholarly position(s). Barking seems to fit!

 
Old 03-15-2013, 06:26 AM   #8
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
need details

Can somebody delve deep into booting . I know that
first 512 bytes of hard disk form MBR which points to partition to boot from . From that address bootloader is loaded . What next ?
 
Old 03-15-2013, 11:18 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
This post is almost 3yrs old, why not start a new thread so as to get the help you need.
 
Old 03-16-2013, 06:29 AM   #10
falconite
Member
 
Registered: Jul 2010
Posts: 42
Blog Entries: 1

Rep: Reputation: 16
Acer? I thought the Dell Latitude laptops are very robust for installing Linux and also Vmware.
 
Old 03-16-2013, 08:52 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,678

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by sumeet inani View Post
Can somebody delve deep into booting . I know that
first 512 bytes of hard disk form MBR which points to partition to boot from . From that address bootloader is loaded . What next ?
You've been registered here for FIVE YEARS...by now, you should know not to hijack someone elses thread, or re-open old ones. And if you put "how does linux boot" into Google, the VERY FIRST HIT is:
http://www.ibm.com/developerworks/library/l-linuxboot/
 
Old 03-16-2013, 11:43 AM   #12
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by falconite View Post
While booting, the Kernel has to mount the root file system, and the root file system can be accessed by modules. But these modules are present inside the Root file system itself. Now the question here is, how can the root file system be mounted when the modules, that are responsible for mounting this root file system, are within the root file system itself. This is something like 'How do you get a chicken when you do not have an egg? And how do you get an egg when you do not have a chicken?' Hence, it is called the Chicken-Egg problem.

So, we use 'initrd' image file. This is an image file that consists of necessary modules to mount the root file system, in read-only module. Once the RFS is mounted, then the modules are invoked and then the RFS is again mounted in RW mode.

Let me know, anybody, if I am wrong.
I would say, incomplete. The problem is that you move the location of the question to the initrd...

When the kernel is loaded, it usually has two mandatory drivers. ramfs for a memory resident filesystem, and a console.

The way thing go, is the when the kernel is loaded (by grub, lilo...) it is also loaded with a compressed cpio archive of a mini-root filesystem (the initrd). The kernel level init process mounts the ramfs, and then copies (memory to filesystem) the initrd passing it through a cpio (also built in) to create a memory resident filesystem, after which the initrd is deallocated. This memory resident filesystem is used as root, so the kernel level init process executes a startup shell script on that filesystem. The script is used to load modules as needed (it has a udev service on board that builds another memory resident filesystem, devfs, than ends up mounted as /dev ).

Once the device scan is finished, the script goes through all partitions looking for the partition designated on the kernel command line (the "root=" parameter). It mounts the identified partition on /mnt. Once this is completed, the script exits...

Now the kernel init uses the /mnt mounted disk based root and invokes a little used system call "piviot_root" - which exchanges the /mnt data stucture describing the mount, and the mini-root mount. After this is completed, the mini-root (now located on /mnt) is dismounted (memory reclaimed) and the kernel init execs the /usr/sbin/init executable from disk.

After that, the rest of the system is brought up- /dev is mounted, other disk mounts, and then any services.

Note: it IS possible to bypass this. But to do so requires the kernel to have the driver for the disk built in and the root filesystem type builtin, and to have the root device specified by driver name. I'm not sure that even the partition UUIDs and labels are yet known.

Last edited by jpollard; 03-16-2013 at 11:50 AM.
 
1 members found this post helpful.
  


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
ppp, dnsmasq, dhcp: a triple chicken-and-egg problem hujuice Linux - Networking 1 04-14-2009 01:37 PM
The chicken, or the egg...... ErrorBound General 9 06-19-2007 05:56 AM
compiler chicken and egg problem novasoy Linux - Newbie 4 06-24-2004 01:18 PM
I'm having a chicken (motherboard) and egg (video card) problem. mrwritestuff Linux - Hardware 3 10-06-2003 05:33 PM
Which came first...the chicken of the egg? ugenn Linux - Newbie 3 04-13-2002 09:17 AM

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

All times are GMT -5. The time now is 10:09 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