From Kevin Lampert on Mon, 12 Jun 2000
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
Well, here's a couple of ideas:
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:
- 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).
- 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).
- 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:
- Hit [Enter]
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.
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):
passwd # and create a new password...
mount -o remount,ro /
exec /sbin/init 6
... and wait for the system to shutdown and reboot (with your password setting safely saved).
However, you've said that you want to blindly remove Linux from this box. So, at the shell prompt you can type something like:
dd if=/dev/zero of=/dev/hda #DANGEROUS!!!!
... which will zero out the whole primary IDE hard drive.
... 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.
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.
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).
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).
You could get Tom's Root/Boot image from http://www.toms.net/rb ... and he does have a .ZIP file with the Linux image, a RAWRITE.EXE utility and instructions on creating a Linux rescue diskette from an MS-DOS prompt.
If you use the root/boot diskette on this errant Red Hat 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.
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 /usr" command above:
mount /dev/hda? /mnt cd /mnt chroot . /bin/sh
... where hda? might be hda1, hda2 or something like sda1, sda2
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.).
... 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.
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.
14 15 16 17 18 19 20 21 22 23