LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-17-2010, 12:47 PM   #1
redhat2010@rocketmail.co
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 1
what will happen if init dies during boot process?


hello Linux gurus,

I attended an interview and I was asked what if init process dies?

Interviewer asked me boot process and I explained and then asked me what if init process dies.
I answered…

It will leave you at a shell prompt- (why? I thought it will leave you at repair mode that is init s)
I was really confused, so again I said it will panic kernel (I know it’s not correct .... )

I asked one of my senior, he said it will leave you hung, printing swapper blah blah …..

I am not sure what is correct… any words?
How to simulate this?
 
Old 02-17-2010, 12:57 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
"init" is the first program called by the kernel. It is responsible for setting up the initial system configuration and for setting the runlevel and (as directed in /etc/inittab) start the X-server, and Window Manager or a Desktop Environment. You probably cannot predict exactly what happens if init fails, but you can make some educated guesses by reading the various init scripts.

Quote:
he said it will leave you hung, printing swapper blah blah …..

I am not sure what is correct… any words?
I don't have a clue what he said, so I can't say if it's right.

the short answer for the next interview? "If init fails, the system won't work." Since the kernel is waiting for init to finish, you can pretty much bet the kernel will not be happy--I think that's what they call a "panic".......
 
Old 02-20-2010, 03:59 AM   #3
redhat2010@rocketmail.co
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Original Poster
Rep: Reputation: 1
Well I know it wont boot, I wanted to know what exactly would be the behavior..

Quote:
I don't have a clue what he said, so I can't say if it's right.
You may already know but again, boot sequence is as below ..
So, my senior said it will stop at swapper since swapper starts before init process.. (we may see this on Solaris)

* Hardware initialization.
* sched - The real-time scheduler, sched runs as process 0 .
* swapper - It manages the physical memory by moving process from physical memory to swap space when more physical memory is needed.
* Page Daemon - is used to move pages in and out of physical memory and to update page tables.
* The last step in bootstrapping the kernel starts the /etc/init process.

I simulated this problem by moving /sbin/init to /sbin/init.old and reboot and yes it panicked ..

How to fix without rescue disk?? don’t need rescue disk, just powercycle it again ..
Press e at grub and add init=/sbin/init.old at the very last in kernel line and Esc then Press b to boot ..

see attachment for more details ..
Attached Thumbnails
Click image for larger version

Name:	snap.JPG
Views:	25
Size:	143.0 KB
ID:	2788  
 
  


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
What happen if my thread in process crash?? Linux_Kid_ Linux - Software 3 08-20-2009 08:53 AM
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 10:42 AM
[SOLVED] Optimize slack boot process / init scripts ? H_TeXMeX_H Slackware 73 10-12-2007 05:47 AM
Red Hat AS 4, Nic dies during boot process zmag2linux Red Hat 1 04-20-2007 05:56 PM
Boot process dies during forced file system check mepaco Fedora - Installation 1 04-11-2006 08:42 AM


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