Article View: alt.os.linux.slackware
Article #157Re: Locked out of system.... how do I replace a corrupt inittab file?
From: Shannon McCracken
Date: Mon, 03 Aug 1998 00:00
Date: Mon, 03 Aug 1998 00:00
34 lines
2811 bytes
2811 bytes
Dean Malandris wrote: > > I had a bit of an accident and corrupted the /etc/inittab file in Slackware. > When I boot the machine now, because of some illegal getttydef declarations > in the file, it tells me of fatal pids and that there are no more processes > left in the current run level. I can't switch consoles. In fact, there is no > response to anything but CTL-ALT-DEL to reboot it. > > I have a backup copy called inittab.old in the /etc/ directory, so I can > replace it and restore the machine if I could only get into it. I made a > bootdisk on my other Linux box; it boots of /hda3/ and the problem machine > is /hda2/. > > The problem machine will boot off the floppy but won't give me access to > /hda3/ so I can get in there and fix the file. > > Any suggestions as to how I can force my way in and do the fix? If you have access to the LILO bootprompt / LoadLin command line then adding init=/bin/sh to the kernel command line (so you type something like "Linux init=/bin/sh" at the LILO boot prompt) should get you a root shell, without a password. Your root partition will be mounted read only, and no other partition will be mounted, but it should be a start. (running /etc/initd/boot (?) may fix this, or just use the approprate mount command yourself to remount / read-write.) Once fixed, reboot. (ie: You boot your current system, no boot disk or anything, and instead of using /sbin/init the kernel uses /bin/sh, which is more useful in this case..) -- Shannon McCracken Write protect error reading drive a (Windows '95)
Technical Details
Message-ID:
<35C531C1.37251F86@student.auckland.ac.nz>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35c50252.36241703@news.zip.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102983,dcfb8fc709dba819 X-Google-Attributes: gid102983,public X-Google-Thread: f906c,dcfb8fc709dba819 X-Google-Attributes: gidf906c,public X-Google-Thread: faa64,dcfb8fc709dba819 X-Google-Attributes: gidfaa64,public X-Google-Thread: 100c5f,dcfb8fc709dba819 X-Google-Attributes: gid100c5f,public X-Google-Thread: 10a997,dcfb8fc709dba819 X-Google-Attributes: gid10a997,public From: Shannon McCracken <smcc004@student.auckland.ac.nz> Subject: Re: Locked out of system.... how do I replace a corrupt inittab file? Date: 1998/08/03 Message-ID: <35C531C1.37251F86@student.auckland.ac.nz> X-Deja-AN: 377368431 Content-Transfer-Encoding: 7bit References: <35c50252.36241703@news.zip.com.au> To: www@plexus-technologies.com X-Original-Host: uglF6.cs.auckland.ac.nz X-Authenticated: Sentinel-NNTP v0.9 on doorway.cs.auckland.ac.nz Content-Type: text/plain; charset=us-ascii Organization: Auckland University CS X-Authenticated-Sender: smcc004@cs.auckland.ac.nz Mime-Version: 1.0 Reply-To: smcc004@cs.auckland.ac.nz Newsgroups: alt.os.linux.slackware,alt.os.linux,alt.linux,alt.uu.comp.os.linux.questions,aus.computers.linux,comp.os/linux.setup