Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-17-2010, 11:47 AM   #1
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, 11:57 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,808

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

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, 02:59 AM   #3
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..

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:	66
Size:	143.0 KB
ID:	2788  


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

All times are GMT -5. The time now is 02:18 PM.

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