How do you boot Interactive's SysV in single user mode???

Guy Harris guy at auspex.auspex.com
Sat Aug 18 06:54:46 AEST 1990


>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.



More information about the Comp.unix.i386 mailing list