old-www/LDP/LG/issue55/tag/19.html

308 lines
12 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3D.k">
<TITLE>The Answer Guy 55: Left in the Lurch</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P> <hr>
<!-- *** BEGIN navbar *** :::::::::::::::::::::::::::::::::::::::::::::::: -->
<p align="center">
<A HREF="../lg_bytes55.html"><IMG ALT="[ Prev ]"
SRC="../../gx/navbar/prev.jpg"
WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom" >
<A HREF="../index.html"><IMG ALT="[ Table of Contents ]"
SRC="../../gx/navbar/toc.jpg"
WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<A HREF="../../index.html"><IMG ALT="[ Front Page ]"
SRC="../../gx/navbar/frontpage.jpg"
WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<A HREF="../../faq/index.html"><IMG ALT="[ FAQ ]"
SRC="../../gx/navbar/faq.jpg"
WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/right.jpg"
WIDTH="15" HEIGHT="45" ALIGN="bottom" >
<A HREF="../lg_tips55.html"><IMG ALT="[ Next ]"
SRC="../../gx/navbar/next.jpg"
WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<!-- *** END navbar *** :::::::::::::::::::::::::::::::::::::::::::::::::: -->
</p>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Guy</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
LinuxCare,
<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
</H4>
</center>
<p><hr><p>
<!-- endcut ======================================================= -->
<!-- begin 19 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Left in the Lurch</H3>
<H4 ALIGN="center">or: Uninstalling Linux the Hard Way</H4>
<p><strong>From Kevin Lampert on Mon, 12 Jun 2000
</strong></p>
<!-- ::
Left in the Lurch
~~~~~~~~~~~~~~~~~
or: Uninstalling Linux the Hard Way
:: -->
<P><STRONG><CODE>
answer guy,
</CODE></STRONG></P>
<P><STRONG>
i have been going through your suggestions off the web for uninstalling
red hat, but i have an even bigger problem, i have no resecue disk and i
have no way of getting into red hat. The problem orginated because a
former employee loaded red hat on a pc and no one knows anyway to gain
access into the pc now since no one knows any of the user names or
paswords that he set. So, my question is "how do I get rid of red hat
with no rescue disk or no access into red hat?"
Any suggestions you have will be greatly appreciated.
kl
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Well, here's a couple of ideas:
</BLOCKQUOTE>
<BLOCKQUOTE>
First you could break into the system. I've described "recovering
lost passwords" on a few occasions and you can search the back
issues or the FAQ for details on that. Here's the short form:
</BLOCKQUOTE>
<BLOCKQUOTE><ol>
<li> Reboot the system. (Try [Ctrl]+[Alt]+[Del], then try
[Ctrl]+[Alt]+[Backspacel] followed quickly by
[Ctrl]+[Alt]+[Del]. If those fail you, power cycle it).
<li> As it boots after the BIOS messages and the initial keyboard
LED flashes, toggle the [scroll lock] and/or [caps lock]
keys. (That should bring up the LILO prompt, even if it
wasn't showing up before --- unless it's been configured
specially).
<li> At the LILO: prompt hit the [Tab] key. A list of boot
"labels" should appear. Usually one of them will be
named "Linux" or "linux" or something like that.
Choose any one of those and type its name (case-sensitive)
following by the following string:
<BLOCKQUOTE><code>
init=/bin/sh rw
</code></BLOCKQUOTE>
<li> Hit [Enter]
</ol></BLOCKQUOTE>
<BLOCKQUOTE>
Now, if all of that went O.K. you should see the Linux kernel
starting up. However, instead of going though the usual init
process and running a whole mess of rc* scripts, it should
just start a shell.
</BLOCKQUOTE>
<BLOCKQUOTE>
If you wanted to change the password and regain control of the
system at this point you'd type the following commands
(ignoring any errors for the moment --- some of them are just
to account for common configurations that might not match yours):
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQUOTE><CODE>
mount /usr
<BR>passwd # and create a new password...
<BR>sync
<BR>mount -o remount,ro /
<BR>umount /usr
<BR>exec /sbin/init 6
</CODE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
... and wait for the system to shutdown and reboot (with your
password setting safely saved).
</BLOCKQUOTE>
<BLOCKQUOTE>
However, you've said that you want to blindly remove Linux from
this box. So, at the shell prompt you can type something like:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQUOTE><CODE>
dd if=/dev/zero of=/dev/hda #DANGEROUS!!!!
</CODE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
... which will zero out the whole primary IDE hard drive.
</BLOCKQUOTE>
<BLOCKQUOTE>
... of course that's overkill. You could just add count=1 to that
command to limit the damage to the MBR (master boot record) which
is sufficient that any other OS you try to install should then
consider this drive to be empty.
</BLOCKQUOTE>
<BLOCKQUOTE>
Of course there might be some glitches to this approach. Your
former employee might have been a security nut and might have
protected the boot sequence with a CMOS/Setup password. He or
she might also have put in a LILO password. He or she might not
have been using LILO at all -- there are a few alternative boot
loader for Linux.
</BLOCKQUOTE>
<BLOCKQUOTE>
In the worst case you could use a screw driver, open the case,
take out the hard drive and temporarily put it into another
system, and use that to erase the drive. If you do have to go
to that extreme, I suggest you take the drive, or the whole
system, down to "PC Repair-o-rama" (any place that repairs PCs
--- like CompUSA, Fry's, etc). They should be able to do the
job for about $70 (and it would take way more than $70 of my
time to explain all the possible complications of removing a
drive, and temporarily installing it in another computer;
especially since I don't even now if that system is SCSI,
IDE, or something old or exotic like ESDI, SMD, or ST506 ---
RLL/MFM).
</BLOCKQUOTE>
<BLOCKQUOTE>
A whole other approach would be to download a copy of
Tom Oehser's Root/Boot (or any of several other mini-distributions
of Linux that fit on a single floppy or a couple of floppies).
</BLOCKQUOTE>
<BLOCKQUOTE>
You could get Tom's Root/Boot image from <A HREF="http://www.toms.net/rb"
>http://www.toms.net/rb</A>
... and he does have a .ZIP file with the Linux image, a
<TT>RAWRITE.EXE</TT> utility and instructions on creating a Linux rescue
diskette from an MS-DOS prompt.
</BLOCKQUOTE>
<BLOCKQUOTE>
If you use the root/boot diskette on this errant <A HREF="http://www.redhat.com/">Red Hat</A> system,
(assuming that it doesn't CMOS/Setup passwords that prevent you
from doing a floppy boot), then you can use that to wipe out
the data on your hard drive using the same 'dd' command I
described above. Notice that you should NOT use that command if
there is ANYTHING on that hard drive that you want to save.
</BLOCKQUOTE>
<BLOCKQUOTE>
You can also use Tom's root/boot to change the passwords on your
system --- and thereby regain control of it. To do that
you'd insert the following commands before my "mount <TT>/usr</TT>"
command above:
</BLOCKQUOTE>
<blockquote><pre> mount /dev/hda? /mnt
cd /mnt
chroot . /bin/sh
</pre></blockquote>
<BLOCKQUOTE>
... where hda? might be hda1, hda2 or something like sda1, sda2
</BLOCKQUOTE>
<BLOCKQUOTE>
etc. (Explaining that would take a bit longer. hd* are all
of the IDE drives, hda is the master on the primary IDE interface,
hdb is the slave, hdc is the master on the secondary IDE, etc.;
those might include the CD-ROM. sd* are all the SCSI hard drives
on the system sda through sdz (if you had that many). However,
SCSI CD-ROM are NOT included in that list, they get names like
scd0, scd1 etc.).
</BLOCKQUOTE>
<BLOCKQUOTE>
... The command examples I'm giving here are not the BEST way
to do this; they are simply the easiest set to explain such that
they are most likely to work on the widest variety of systems.
</BLOCKQUOTE>
<BLOCKQUOTE>
With about 20 million copies of Linux installed, I guess the
this knowlege has become de riguer even for NT, Netware, and MS
Windows help desk specialists.
</BLOCKQUOTE>
<!-- end 19 -->
<!--startcut ======================================================= -->
<P> <hr> </p>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2000, James T. Dennis
<BR>Published in <I>The Linux Gazette</I> Issue 55 July 2000</H5>
<H6 ALIGN="center">HTML transformation by
<A HREF="mailto:star@tuxtops.com">Heather Stern</a> of
Tuxtops, Inc.,
<A HREF="http://www.tuxtops.com/">http://www.tuxtops.com/</A>
</H6>
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0">
<A HREF="../lg_answer55.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer55.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A> &nbsp;
<A HREF="10.html">10</A> &nbsp;
<A HREF="11.html">11</A> &nbsp;
<A HREF="12.html">12</A> &nbsp;
<A HREF="13.html">13</A> &nbsp;
<br>
<A HREF="14.html">14</A> &nbsp;
<A HREF="15.html">15</A> &nbsp;
<A HREF="16.html">16</A> &nbsp;
<A HREF="17.html">17</A> &nbsp;
<A HREF="18.html">18</A> &nbsp;
<A HREF="19.html">19</A> &nbsp;
<A HREF="20.html">20</A> &nbsp;
<A HREF="21.html">21</A> &nbsp;
<A HREF="22.html">22</A> &nbsp;
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A>
<IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<P> <hr>
<!-- *** BEGIN navbar *** :::::::::::::::::::::::::::::::::::::::::::::::: -->
<p align="center">
<A HREF="../lg_bytes55.html"><IMG ALT="[ Prev ]"
SRC="../../gx/navbar/prev.jpg"
WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom" >
<A HREF="../index.html"><IMG ALT="[ Table of Contents ]"
SRC="../../gx/navbar/toc.jpg"
WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<A HREF="../../index.html"><IMG ALT="[ Front Page ]"
SRC="../../gx/navbar/frontpage.jpg"
WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<A HREF="../../faq/index.html"><IMG ALT="[ FAQ ]"
SRC="../../gx/navbar/faq.jpg"
WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/right.jpg"
WIDTH="15" HEIGHT="45" ALIGN="bottom" >
<A HREF="../lg_tips55.html"><IMG ALT="[ Next ]"
SRC="../../gx/navbar/next.jpg"
WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<!-- *** END navbar *** :::::::::::::::::::::::::::::::::::::::::::::::::: -->
</p>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->