SUMMARY: panic icode

From: Mauricio Fernandez (mauricio@hq.rnp.br)
Date: Fri Jun 11 1993 - 16:29:35 CDT


The original question:

> What does "panic: icode" mean? neither in the manuals nor in the
> faqs I found such a panic code.
>
> The panic took place while booting, previously it claimed it couldn't
> find any init file. After the panic the system reboots and everything
> repeats.

I received lots of answers explaining what does "icode" mean.
And hints to cope with the problem.

What is "icode"?

Patrick O'Callaghan <poc@usb.ve> wrote:

> "icode" is the internal mechanism used to bootstrap the first process,
> /etc/init (which is the ancestor of all other processes in the
> system). It looks like you've lost /etc/init. This is serious since
> you can't even boot the machine single-user without it.

Ivan Warner <I.Warner@axion.bt.co.uk> points out that the kernel
searches the init process in other directories than /etc

> system could boot /vmunix, but then couldn't find init (it looked in /sbin,
> /usr/etc, and several other places I think). If init is missing, there isn't
> much the system can do.

What can be done?

guy@auspex.com (Guy Harris) wrote:

> If your machine is diskless, log into the server and check whether the
> "/sbin/init" file in its root directory tree is OK (i.e., is present,
> has its execute bits set, and has the same contents as "/sbin/init" from
> the OS release your machine is running.
>
> If your machine is diskful, try booting from your distribution medium -
> tape or CD-ROM - as was done when you installed the OS, and:
>
> 1) do an "fsck" on your root and "/usr" file systems;
>
> 2) mount them, and make sure "/sbin/init" on the root file
> system exists, has its execute bit set, and is identical to
> "/usr/etc/init" on your "/usr" file system.
>

In my case I have a standalone workstation with its file system
completely damaged. I lodaded the miniroot from tape, fsck'd the
file system and found out that almost everything was lost. So
I had to reinstall the system.

eparr@gsscwest.com sent me the following documents

> Collection: Symptoms and Resolutions
> Document: 3769
>
>
> SRDB ID : 3769
>
> SYNOPSIS : System does not boot, looking for init
>
> DETAIL DESCRIPTION : Trying to boot a system up results with the error messages:
>
> root on sd3a fstype 4.2
> swap on sd3b fstype spec size 30780K
> dump on sd3b fstype spec size 30768K
>
> panic : icode can't invoke /sbin/init error 2
> > Can't invoke /sbin/, error 13
> > Can't invoke /single/, error 2
> > Can't invoke /etc/, error 13
> > Can't invoke /bin/, error 2
> > Can't invoke /usr/etc/, error 2
> > Can't invoke /usr/bin/, error 2
> > Panic: icode
> > ...........................
>
> SOLUTION SUMMARY : This happened after moving /sbin directory to another
> location and making symbolic links from /sbin to this new
> location.
>
> /sbin and its contents must be restored back. Since the
> system will not boot in this state, it can be fixed while
> booted under miniroot. Once booted under miniroot, mount
> the root and usr partitions and restore back the /sbin
> directory.
>
> Example:
>
> 1) Load and boot the miniroot.
>
> 2) Mount the "root" partition on /mnt and mount the
> "usr" partition on /mnt2:
>
> mkdir /mnt
> mkdir /mnt2
> mount /dev/sd0a /mnt (using sd0a in this example for root)
> mount /dev/sd0g /mnt2 (using sd0g in this example for usr)
>
> 3) Remove all symbolic links in the /mnt/sbin directory.
>
> 4) Copy files to /mnt/sbin:
>
> cp -p /mnt2/bin/hostname /mnt/sbin
> cp -p /mnt2/etc/ifconfig /mnt/sbin
> cp -p /mnt2/etc/init /mnt/sbin
> cp -p /mnt2/etc/intr /mnt/sbin
> (not needed under 4.0/4.0.3)
>
> cp -p /mnt2/etc/mount /mnt/sbin
> cp -p /mnt2/bin/sh /mnt/sbin
>
> 5) Umount "root" and "usr" filesystems as follows:
>
> sync;sync;sync
> umount /mnt
> umount /mnt2
>
> 6) Check filesystem consistancy:
>
> fsck /dev/rsd0a
> fsck /dev/rsd0g
>
> 7) Reboot system
>
> KEYWORDS : boot, init, invoke, sbin, error 2, panic
>
> PRODUCT : booting
>
> SUNOS RELEASE : All
>
> HARDWARE RELEASE : All
>
> ISO-9001 STATUS : Uncontrolled
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Collection: Symptoms and Resolutions
> Document: 2838
>
>
> SRDB ID : 2838
>
> SYNOPSIS : Diskless client can't invoke init
>
> DETAIL DESCRIPTION : Diskless client can't invoke init
>
> SOLUTION SUMMARY : Turns out clients were installed with 16 KB of swap
> instead of 16 MB. Remove the clients and re-add them.
>
> SYMPTOMS : Can't invoke init, panic: icode
>
> PRODUCT : booting
>
> SUNOS RELEASE : 4.0.3
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Also thanks to:

prallon@grumari.nce.ufrj.br (Sergio Prallon)
Carlos Perez <carlosp@Rocinante.McRCIM.McGill.EDU>

_______________________________________________________________________
                          Mauricio Fernandez
                       Rede Nacional de Pesquisa

Rua Dr. Antonio Augusto de Almeida, 334 Voice: +55 (192) 39-4141
Cidade Universitaria Fax: +55 (192) 39-3070
13083 - Campinas - SP, Brasil email: mauricio@hq.rnp.br
_______________________________________________________________________



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:55 CDT