Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.i386 Subject: Re: How do you boot Interactive's SysV in single user mode??? Message-ID: <3915@auspex.auspex.com> Date: 17 Aug 90 20:54:46 GMT References: <26049@bellcore.bellcore.com> <1990Aug16.160941.17784@ddsw1.MCS.COM> Organization: Auspex Systems, Santa Clara Lines: 30 >A more elegant solution(?) might be to edit the binary /unix, changing the >text string /etc/inittab to something else; ... I HAVEN'T TRIED THIS. Not surprising, since I *very* much doubt it'd work. "/unix" doesn't know beans about "/etc/inittab"; all it knows about is "/etc/init" (or wherever your particular UNIX flavor puts it - S5R3.x for the 386 probably still has it in "/etc"). Too bad there's no way to somehow pass flags to the UNIX kernel (or other program) you're booting, and have it then pass them to "init", BSD/SunOS style (the SunOS style is even mostly portable, it passes command-line flags, rather than the disgusting Berkeley hack of passing the flags in registers...). The main thing you need here is 1) some way to abort any "default" boot process, if any; 2) some "command" you can give to boot the system with non-default flags; 3) some way the UNIX kernel can pick up those flags; and then some tweaks to the kernel to have it pass a "-s" flag to "init" when it starts it up single-user and to "init" to have it ignore any "initdefault" stuff in "/etc/inittab" and go single-user when it's handed the "-s" flag as process 1. 3) is probably not too difficult; you could pass them in registers, VAX BSD-style, or pass them by letting the kernel get a "command line" from the boot prom, Sun-style, or whatever other techniques assorted systems already implement. 1) and 2), I don't know, those are the most machine-dependent and PROM-dependent parts.