System hanging at boot

bscott at ntisys.com bscott at ntisys.com
Fri May 30 18:12:11 EDT 2003


On 30 May 2003, at 6:05pm, cfarinella at appropriatesolutions.com wrote:
>> Maybe that init=/bin/bash trick from the kernel command line...?
> 
> I am unfamiliar with this, can you explain?

  Normally, once the kernel is booted, it loads /sbin/init and lets go.  It
is up to init (and programs invoked by init) to actually turn the system
into something useful.  If /sbin/init is damaged, it will generally stop the
system dead.

  You can, however, tell the kernel to start a *different* initial program.  
To do so, you give it an argument "init=".  "init=/bin/sh" is the most
common use, as that tells the kernel to just start a shell.  A lot of stuff
will be broken or wonky, as none of the normal init scripts get run, but it
can be a useful for disaster recovery.

  You pass "init=/bin/sh" on the kernel command line.  How to do that 
depends on your boot loader.  If you are using LILO, you end up with 
something like this

	LILO boot: linux init=/bin/sh

right after the BIOS bootstraps the system.  If you are using GRUB, you 
select your kernel from the menu, hit [A] to "append", and add 
"init=/bin/sh" to the kernel command line.

-- 
Ben Scott <bscott at ntisys.com>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.              |





More information about the gnhlug-discuss mailing list