[ale] Oops!!!! rm -rf /etc/*
Joseph A Knapka
jknapka at earthlink.net
Tue Oct 16 20:30:09 EDT 2001
Michael Golden wrote:
>
> I was going through my drive trying to clear up space
> and I noticed that /tmp had 50+MB filled in it through
> various directories and I didn't have anything
> important open, so I thought I'd just delete what was
> in there. Well, I accidentally typed "rm -rf /etc/*"
> instead of "rm -rf /tmp/*" I have no idea how to fix
> it and I don't dare reboot since everything in
> /etc/init.d is gone now too. I upgraded my kernel via
> RPM this session, so now none of my modules work to
> get access to the CD to try to reinstall some of the
> stuff so that I can know it will boot. Things like
> inittab, fstab, etc. are gone too. Any advice on how
> to fix it? I can't really reinstall. When I tried to
> update to Mandrake 8.1 it already told me there wasn't
> enough space to install and I have no way to back up
> my data now that my samba modules and config are gone.
> Help!!
Oops, indeed.
Run "mount" without arguments to get enough data to
create a new /etc/fstab.
You can create an /etc/passwd containing just root,
no password:
root::0:0::/root:/bin/bash
If you have your old kernel, make an /etc/lilo.conf that
boots it as the default kernel, add the option "init=/bin/bash",
and run /sbin/lilo. When you reboot, the machine should come
up running the old kernel, with a single bash session
running on the console, as root. At that point, you should be
able to "modprobe <cdrom_module>" or whatever, and recover
a more-or-less working system from CD.
If you -don't- have your old kernel, hopefully you remember
what version it was, and someone can send you a minimal
kernel image of the proper version, with module support.
(I'll build you one if you need it.)
More detail available for any of the above suggestions
upon request (though I'm going to bed now, so you'll
have to wait a few hours at least :)
Good luck,
-- Joe
# "You know how many remote castles there are along the
# gorges? You can't MOVE for remote castles!" - Lu Tze re. Uberwald
# Linux MM docs:
http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list