SUMMARY: booting problems

From: Keith M Willenson (keith@oz.health.state.mn.us)
Date: Thu Apr 04 1996 - 11:44:54 CST


Problem: All devices deleted. Tried to reboot system, but it will not boot.

There were a number of suggestions but the one I followed came from Paul Buckley
at Sun Support. Others suggested the same thing, but not with as much detail.
This solution assumes you have a cdrom attached to the computer.

ok> boot cdrom -sw
# mount /dev/dsk/c0t3d0s0 /a
cd /tmp/dev
tar cvfp - . | ( cd /a/dev; tar xvfp - )
cd /tmp/devices
tar cvfp - . | ( cd /a/devices; tar xvfp - )
cd /tmp/root/etc
cp path_to_inst /a/etc/path_to_inst
halt
ok> boot -rv

I would have tried Stephen Potter's suggestion if I hadn't done this
already.

Thanks to:

pbuckley@mohave.East.Sun.COM (Paul Buckley)
blymn@awadi.com.au (Brett Lymn)
davem@cp.tybrin.com (Dave McFerren)
Alexander Finkel <afinkel@pfn.com>
Asim Zuberi <asim@psa.pencom.com>
Geert.Devos@ping.be (Geert Devos (org. : Graphidec-Belgium))
mglass@adb.com (Michael K. Glass)
Martin Smith <martins@psa.pencom.com>
Stephen Potter <spp@psa.pencom.com>
p_smith@interramp.com (Phyllis Smith)
manjeet@iglou.com (Manjeet Rekhi)

And everyone else whose responses I haven't gotten yet.

Complete responses follow original question.

Original question:
 
> I appeal to this list's collective wisdom. I have checked the
> summaries under everything that seemed relevant to me, but could not
> find anything. So:
>
> One of the developers cleverly did a "rm *" in /dev. Then he attempted to
> fix the problem all on his own.
>
> Here's what I see when I try to boot the machine, copied from my
> hastily scrawled notes:
>
> SunOS 5.4 Generic_101945-34
> configuring network interfaces: ifconfig: wizard: bad address le0
> le0: auto-revarp failed: no RARP replies received
> ld.so.1: expr: fatal: /dev/zero: can't open file: errno=2
> ld.so.1: /usr/sbin/swap: fatal: /dev/zero: can't open file: errno=2
> Killed
> Killed
> The / file system (/dev/rdsk/c0t3d0s0) is being checked.
> ld.so.1: /usr/sbin/fsck: fatal: /dev/zero: can't open file: errno=2
> Killed
> ***SYSTEM WILL REBOOT AUTOMATICALLY***
>
> Then the system reboots and I see these same messages all over again.
>
> boot -r does not work
> boot -ar does not work
> boot -sr does not work
>
> All of these produce the results listed above.
>
> Thanks in advance,
>
> K
-----------------------------------------------------------------
>From blymn@awadi.com.au Thu Apr 4 02:52:26 1996
From: blymn@awadi.com.au (Brett Lymn)

The dynamic loader needs it's infinite source of zeros to work it's
magic. What you need to do is boot from cdrom, mount the root
partition and use mknod to make a new /dev/zero. Come to think of it,
IMHO the fact that fsck is dynamically linked should be reported as a
bug to Sun - you should be able to get up into single user mode
without having to run any dynamically linked stuff.
-----------------------------------------------------------------

>From davem@cp.tybrin.com Thu Apr 4 08:27:07 1996
From: davem@cp.tybrin.com (Dave McFerren)

Try this, as root...

touch /reconfigure
reboot

the system should reread the devices that you have and rebuild the /dev tables.
I don't know if it will work, but its is worth a try.

Hope this helps..
-----------------------------------------------------------------

>From afinkel@pfn.com Thu Apr 4 10:07:36 1996
From: Alexander Finkel <afinkel@pfn.com>

At 12:00 PM 4/3/96 -0600, you wrote:
>One of the developers cleverly did a "rm *" in /dev. Then he attempted to
>fix the problem all on his own.

Ouch. My opinion: Rule number 1, Developers and Root access don't mix. I
learned that the hard way myself. But that is moot at this point.

Your only recourse _may_ be to reinstall Solaris. I think you can do an
upgrade installation of 2.4 over 2.4, then just reapply the patches, but I
am not sure. If you don't get any better suggestions, try that. Hopefully
you have a backup, so that if the upgrade didn't work, or overwrote
important files, you can get them back.

Sorry I don't have a better Solution, but losing /dev is pretty destructive.
You may be able to restore some of /dev by booting from the Solaris CD, but
I have never attempted this, so it is a shot in the dark.

Good Luck, I can sympathise.
-----------------------------------------------------------------

>From asim@psa.pencom.com Thu Apr 4 10:07:09 1996
From: Asim Zuberi <asim@psa.pencom.com>

Hi,

Probably you have to boot from the cdrom in single user mode and restore
the /dev filesystem. Hopefuuly that works.

>From Geert.Devos@ping.be Thu Apr 4 10:16:37 1996
From: Geert.Devos@ping.be (Geert Devos (org. : Graphidec-Belgium))

Before you read my "answers", I must confess that I haven't had the
"pleasure" to get out of this kind of a loop myself, so my answers may be
completely of track. Don't scold me for it.

Have you tried booting from cdrom and doing an update (instead of an
initial install)?

I don't know if this one works : "boot net", after you configured another
machine to be the boot server for the "little bitch" you have at hand.

Geert
-----------------------------------------------------------------

>From mglass@adb.com Thu Apr 4 10:24:57 1996
From: mglass@adb.com (Michael K. Glass)

Shoot the developer or remove his root priveledge. I ass-u-me that
you have no BACKUP root partition???? If not then boot from cd-rom,
run mini-root, and clean up that way.

Michael
-----------------------------------------------------------------

>From martins@psa.pencom.com Thu Apr 4 10:28:00 1996
From: Martin Smith <martins@psa.pencom.com>

 Hope you have good reliable backups so that you can do a restore
and if not sounds like you will have to re-install. Also, there is nothing
clever about rm * in any form. Those important directories should be
protected to guard against such disasters. Good luck!

Martin!
-----------------------------------------------------------------
 
>From spp@psa.pencom.com Thu Apr 4 10:30:26 1996
From: Stephen Potter <spp@psa.pencom.com>

You should be fairly OK. Pretty much everything in /dev is a link to
/devices or is a directory. Make link in /dev from
/devices/pseudo/mm@0:XXX to XXX where XXX is:
    null
    kmem
    mem
    zero

Those should be enough to get you started and you should be able to use
boot -[as]r to rebuild everything else.

-spp
-----------------------------------------------------------------

>From p_smith@interramp.com Thu Apr 4 11:26:36 1996
From: p_smith@interramp.com (Phyllis Smith)

Try this:
Boot from cdrom
When openwindows comes up, start a command tool.
Mount the normal / partition as /mnt
Use your favorite method for copying device files to copy the ones
from /dev to /mnt/dev
(I like cd /dev; find . -print | cpio-pdvum /mnt/dev)
Then reboot with -r option.

This worked for me when I did something similar.
-----------------------------------------------------------------

>From manjeet@iglou.com Thu Apr 4 11:36:51 1996
From: manjeet@iglou.com (Manjeet Rekhi)

>From my experience, I can suggest you to boot from cdrom and come to single
user mode. Copy files in /etc directory to some other directory (and any
other file that you are aware of being changed in root file system and
/usr). Load / and /usr from cdrom and reboot. Now it is just a matter of
copying (selectively) saved files of /etc (and /usr) to their original place.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:56 CDT