mo@messy.bellcore.com (Michael O'Dell) (08/15/90)
Hmmm. Due to an undetected typo in the netd.cf file, a Toshiba 5200 portable running Interactive's SysV.3.2 system hangs (seemingly forever) trying to NFS mount some remote filesystem because the network didn't initialize correctly. Well, I thought, just bring it up single-user, ed the error, and all will be well. Well- how in the world do you get it to come up single user????? The documentation is particuarly unhelpful, and I can't seem to find the console switches.. -Mike
brando@uicslsb.csl.uiuc.edu (Brandon Brown) (08/16/90)
mo@messy.bellcore.com (Michael O'Dell) writes: >Well- how in the world do you get it to come up single user????? I know this isn't EXACTLY what you are looking for, but.... if you change /etc/inittab's entry for initdefault to 1, it will boot to single user mode everytime. I know of no other easy way to do this... Brando
jonb@specialix.co.uk (Jon Brawn) (08/16/90)
brando@uicslsb.csl.uiuc.edu (Brandon Brown) writes: >mo@messy.bellcore.com (Michael O'Dell) writes: >>Well- how in the world do you get it to come up single user????? >I know this isn't EXACTLY what you are looking for, but.... >if you change /etc/inittab's entry for initdefault to 1, it will boot to >single user mode everytime. I know of no other easy way to do this... >Brando Sorry Michael, but you can't. (sweeping statement there, better get the asbestos suit out). What you CAN do is use your boot floppies. Boot & swap to the second (Assuming its a two floppy boot) and wat for the system to sit at some prompt asking you about installation and all that jazz. Prod the DEL key a few times and (if you are lucky) you'll end up at a shell prompt. From here you should have enough tools to mount the disk (/etc/mount /dev/dsk/0s1 /mnt) and edit the inittab using ed. The line you are looking for starts 'is:2:' or 'is:3:' Change the number to be an 'S'. write the file out, sync the disk (traditional), unmount the disk, and shut the system down. (sync; sync; uadmin 2 0) Hopefully the world will be better when you reboot from the HD (No guarantees, all from the top of my head, sorry if its wrong, but no-one else seemed to be helping this guy & I couldn't get email to fly.) -- "These opinions are made up on the spur of the moment, and bear no relationship to my actual beliefs, let alone those of Specialix" Jon Brawn, jonb@specialix.co.uk (or for you bangers: ..!mcsun!ukc!slxsys!jonb)
nvk@ddsw1.MCS.COM (Norman Kohn) (08/16/90)
In article <brando.650761253@uicslsb.csl.uiuc.edu> brando@uicslsb.csl.uiuc.edu (Brandon Brown) writes: >mo@messy.bellcore.com (Michael O'Dell) writes: > >>Well- how in the world do you get it to come up single user????? > >I know this isn't EXACTLY what you are looking for, but.... > >if you change /etc/inittab's entry for initdefault to 1, it will boot to >single user mode everytime. I know of no other easy way to do this... This comes up for us from time to time, because changes in hardware configuration (like a dead serial box) can cause the system to crash when coming up multi-user. I've always just booted from floppy and edited the inittab. A more elegant solution(?) might be to edit the binary /unix, changing the text string /etc/inittab to something else; and saving the edited /unix under a different name. Then, during the "booting unix..." initial message, give the alternate kernel name and have the hacked inittab (perhaps inittb1) include "initdefault s" or equivalent. I HAVEN'T TRIED THIS. -- Norman Kohn | ...ddsw1!nvk Chicago, Il. | days/ans svc: (312) 650-6840 | eves: (312) 373-0564
jonb@specialix.co.uk (Jon Brawn) (08/17/90)
Yesterday, I (Jon Brawn) wrote: >>mo@messy.bellcore.com (Michael O'Dell) writes: >>>Well- how in the world do you get it to come up single user????? woffle that might help him a bit deleted >Hopefully the world will be better when you reboot from the HD >(No guarantees, all from the top of my head, sorry if its wrong, but no-one >else seemed to be helping this guy & I couldn't get email to fly.) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Appologies to Dick Dunn of ISC and all the rest who Emailed help to Michael. (One day, maybe not too far into the future, I'll start thinking about who I'm offending before I start pushing the buttons.....) -- "These opinions are made up on the spur of the moment, and bear no relationship to my actual beliefs, let alone those of Specialix International" Jon Brawn, jonb@specialix.co.uk (or for you bangers: ..!mcsun!ukc!slxsys!jonb) ``Once upon a time, not so very long ago, in a land, not so very far away''
guy@auspex.auspex.com (Guy Harris) (08/18/90)
>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.
karl@naitc.uucp (Karl Denninger) (08/20/90)
In article <3915@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>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"). Used to be that Microport SV/AT would have signals enabled in the "rc" scripts which ran when the system came up - which leads to the hack: trap "init s" 2 echo "System going multiuser in 15 seconds, hit <delete> if wrong" sleep 15 trap "" 2 Which would have the effect of allowing an abort to single user mode during the boot sequence. Worked real well for me, and never was I without a way to single user mode when it was needed. You put this right at the front of the rc2 script.... Now, ISC (and presumably others) ignore signals during the boot process, making it difficult at best to perform this kind of thing. -- Karl Denninger AC Nielsen kdenning@ksun.naitc.com (708) 317-3285 Disclaimer: Contents represent opinions of the author; I do not speak for AC Nielsen on Usenet.
peter@ficc.ferranti.com (Peter da Silva) (08/21/90)
In article <1990Aug16.160941.17784@ddsw1.MCS.COM> nvk@ddsw1.MCS.COM (Norman Kohn) writes: > A more elegant solution(?) might be > to edit the binary /unix, changing the text string /etc/inittab to > something else; and saving the edited /unix under a different name. You'd have to change the "/etc/init", then in init itself change "/etc/inittab". Easier would be to have a prompt in /etc/rc with a timeout (using the hallowed "(sleep 5; kill $$)&" hack, or something better) that asked if you want to go to single-user mode. I'll try that. -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com (currently not working) peter@hackercorp.com