/sbin/init: error 21

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

/sbin/init: error 21

AON Mailbox
Hi folks

I think I dicovered a new bug in OpenBSD-3.8 release,
but I am not sure!
Will you please check it up!

OS OpenBSD-CD-ROM-3.8 release.
PC i586 CELLERON 500 MHZ 512 MB RAM
ESDI HDD 10GB
GENERIC Kernel OpenBSD 3.8 CD-Rom release

cat /etc/fstab

/dev/wd0a /          ffs
/dev/wd0b swap
/dev/wd0d /tmp       mfs
/dev/wd0e /var       ffs
/dev/wd0f /var/named ffs
/dev/wd0g /var/log   ffs
/dev/wd0h /usr       ffs
/dev/wd0i /home      ffs

/ is 500m
swap 128m
/tmp 128m mfs (128m)
/var 1g
/var/named 1g
/var/log 3g
/usr 500m
/home *

What I made, is the following.

I would like to install the src.tar.gz in /usr/src

cp /cdrom/src.tar.gz /tmp/ &&

tar -C / -zxvpf /tmp/src.tar.gz

After this, I saw a kernel panic and
the partition was full.

I would 'cd' to /usr/src:

/bin/ksh error.

So i reset the PC.

boot -s and return.

After this:

exec /sbin/init: error 21
init: not found
panic: no init
stopped at Debugger+0x4:leave
RUN AT LEAS 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN
REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING
THAT INFORMATION!

ddb> trace
Debugger(d057fa84,8,e7d2af1c,cfbfdfee,0) at Debugger+0x4
panic(d04f3e88,e7d2af64,e7d2af44,0,0) at panic+0x63
start_init(d6a2e000) at start_init 0x16d
Bad frame pointer: 0xd06f1ef8

ddb> ps

PID PPID PGRP UID S FLAGS    WAIT      COMMAND
12  0    0    0   3 0x100204 crypto_wa crypto
11  0    0    0   3 0x100204 aiodoned  aiodoned
10  0    0    0   3 0x100204 syncer    update
 9  0    0    0   3 0x100204 cleaner   cleaner
 8  0    0    0   3 0x100204 reaper    reaper
 7  0    0    0   3 0x100204 pgdaemon  pagedaemon
 6  0    0    0   3 0x100204 pftm      pfpurge
 5  0    0    0   3 0x100204 usbtsk    usbtask
 4  0    0    0   3 0x100204 usbevt    usb0
 3  0    0    0   3 0x100204 apmev     apm0
 2  0    0    0   3 0x100204 kmalloc   kmthread
*1  0    0    0   7 0x4                swapper
 0 -1    0    0   3 0x80204  scheduler swapper

So, that is it
I dont no why a full disk clears /sbin/init and make a kernel-panic
I hope i could help OpenBSD.

By Edith Gratz

# I bye OpenBSD CD-Rom's since version 2.9 #

Reply | Threaded
Open this post in threaded view
|

Re: /sbin/init: error 21

Hannah Schroeter
Hello!

On Thu, Nov 17, 2005 at 09:19:09PM +0100, AON Mailbox wrote:
>Hi folks

>I think I dicovered a new bug in OpenBSD-3.8 release,
>but I am not sure!
>Will you please check it up!

No you haven't. You've discovered a usage error.

>[...]

>I would like to install the src.tar.gz in /usr/src

>cp /cdrom/src.tar.gz /tmp/ &&

>tar -C / -zxvpf /tmp/src.tar.gz

That was the error. It should've been
tar -C /usr/src -zxvpf .../src.tar.gz

You've replaced /sbin/init (the init binary) with sbin/init/... from
the source tree, i.e. /sbin/init has mutated into a directory, so you
got error code 21:
     21 EISDIR Is a directory.  An attempt was made to open a directory with
             write mode specified.
when the kernel wanted to exec /sbin/init in the process no. 1.

>[...]

Your best bet is reinstalling and looking at tar contents a bit more
before unpacking them in future.

Kind regards,

Hannah.