[comp.unix.sysv386] Booting Interactive UNIX in single user mode.

malcolmp@otca.oz (Malcolm Purvis) (03/27/91)

    The installation of a new network device and driver on one of our
Interactive 2.0.2 machines has resulted in an error in the /etc/netd.cf file
and so /etc/netd fails when the machine reboots.  This has had the useful side
effect of hanging the reboot sequence so I never get a login prompt and thus
can't fix the file.

    So, is there anyway I can boot up the thing in single user mode so I can
fix the stupid file?  The man page for init says that it will only prompt for
an init level to start up in if there is no initdefault entry in /etc/inittab,
which of course there is by default and I have no way of logging in to change
it.  Is there anything I can do short of reinstalling UNIX?

	Thanks in Advance.
--
		Malcolm Purvis (malcolmp@otc.otca.oz.au)
		R&D Contractor, OTC Development.
		OTC Limited, Sydney, Australia.

cpcahil@virtech.uucp (Conor P. Cahill) (03/29/91)

malcolmp@otca.oz (Malcolm Purvis) writes:

>    So, is there anyway I can boot up the thing in single user mode so I can
>fix the stupid file?  The man page for init says that it will only prompt for

This is why I set my initdefault line in /etc/inittab to:

	is:s:initdefault:

(So it always boots to single user mode).

>an init level to start up in if there is no initdefault entry in /etc/inittab,
>which of course there is by default and I have no way of logging in to change
>it.  Is there anything I can do short of reinstalling UNIX?

Take out the boot and install disks.  reboot the system with the boot disk.
load the install disk when prompted and when you get to the menu, ask for
a shell.  At this point you can mount the root of your hard disk (although
it may already be mounted) and mosey on in and fix your inittab and any
other problems that are giving you grief.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

jr@twisted.dkw.com (J.R. Jesson) (03/29/91)

In article <MALCOLMP.91Mar27170147@fungus.otca.oz>, malcolmp@otca.oz (Malcolm Purvis) writes:
|> 
|>     The installation of a new network device and driver on one of our
|> Interactive 2.0.2 machines has resulted in an error in the /etc/netd.cf file
|> and so /etc/netd fails when the machine reboots.  This has had the useful side
|> effect of hanging the reboot sequence so I never get a login prompt and thus
|> can't fix the file.
|> 
|>     So, is there anyway I can boot up the thing in single user mode so I can
|> fix the stupid file?  The man page for init says that it will only prompt for
|> an init level to start up in if there is no initdefault entry in /etc/inittab,
|> which of course there is by default and I have no way of logging in to change
|> it.  Is there anything I can do short of reinstalling UNIX?
|> 
Grumble!  I've run into exactly the same situation under 2.2.  The only 
way I was able to get things restored was to: 
  (1) bring up ISC from the boot/install diskettes.  *Whatever* you do, dont
      select install at the menu; instead type either update -or- shell
      (I'm doing this from memory, so bear with me).  The point is to get
      to the minimal shell as quickly as possible.

  (2) mount the root partition on /mnt.  You wont have the ls command on 
      the install diskette, so it may be tough to figure it out, but 
      evenutally you will get there.  As I remember, the mount command
      works a little differently from the boot floppies than normal.

  (3) goto /mnt/etc and rename inittab to something else.

  (4) type shutdown at the command prompt.

This should work.  It worked for me at about 2:00 am, so with a little
care you shouldnt have to reinstall the O.S.  (Pain in the ass, aint it?)

J.R.

djc@Kesa.COM (Don Christensen) (03/30/91)

jr@twisted.dkw.com (J.R. Jesson) writes:

>In article <MALCOLMP.91Mar27170147@fungus.otca.oz>, malcolmp@otca.oz (Malcolm Purvis) writes:
>|>    So, is there anyway I can boot up the thing in single user mode so I can
>|>fix the stupid file?
>  (2) mount the root partition on /mnt.  You wont have the ls command on 
>      the install diskette, so it may be tough to figure it out, but 

There is a neat trick that is good to know about when there is no 'ls'
command available: use 'echo *'.  This certainly works in this situation,
I've used it.  The better solution is to put /mnt/bin in your path.  Or
just type /mnt/bin/ls.  If you don't know ed, then you will have to mount
/usr as well as / (it's easy if you mount it on /mnt/usr).

Seems to me that this discussion comes up every 3-6 months.  If it isn't
in the FAQ already, I think it should be put there.

Later,
	Don
-- 
Don Christensen  <=> djc@kesa.com     <=> "Ashes and diamonds, foe and friend;
Kesa Corporation <=> ...!mips!kesa!djc <=> they are all equal in the end."
Santa Clara, CA  <=> ...!daver!kesa!djc <=>                      -- Pink Floyd