LinuxQuestions.org
Register a domain and help support LQ
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, 09: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, 09:17 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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, 09:29 AM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,140
Blog Entries: 52

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, 09:41 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
brian*;
Why do I think that you are a candidate for: http://badpuns.com/
 
1 members found this post helpful.
Old 07-13-2010, 09:49 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,140
Blog Entries: 52

Rep: Reputation: Disabled
I must bookmark that page.
 
Old 07-14-2010, 06:34 AM   #6
falconite
Member
 
Registered: Jul 2010
Posts: 39
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, 08:26 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,469
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
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, 07:26 AM   #8
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Rep: Reputation: 47
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, 12:18 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,247

Rep: Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579
This post is almost 3yrs old, why not start a new thread so as to get the help you need.
 
Old 03-16-2013, 07:29 AM   #10
falconite
Member
 
Registered: Jul 2010
Posts: 39
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, 09:52 AM   #11
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,102

Rep: Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719
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, 12:43 PM   #12
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,344

Rep: Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595
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 12:50 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 07:33 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration