chmod -R -rwx / Very bad!!! how do I fix this?

I accidentally typed this while acting as root:

#> chmod -R -rwx /

This basically gave me no access to anything in linux, I can almost boot, but the Kernel cannot really be executed, I have tried initrd=/dev/dXX  to tell it where root is, didn't help any.  I also tried to do the rescue thing, which meant that I could chmod, but apparently the chmod commands do not affect the proper drives, as the rescue does not have access to evrything on the disk.  I have no idea how to save myself from re-installing, can you please help me, Thanks.
Physics_MagiAsked:
Who is Participating?
 
rwenzlaConnect With a Mentor Commented:
root should always have access, and the kernel loads before permissions are checked (what would check them?)  What's probably failing is access to the init scripts and (even more likely) the device files.

I believe in rescue mode, the root FS is mounted Read-Only.  To do a chmod you must remount it as read/write:

mount -w -o remount /

You might even be able do this in single-user/maint. mode
("linux 1" at LILO:).

Good luck restoring all permissions. It will probably be easier to go in, save any irreplacable data, and re-install.
Things won't work quite right if the permissions are screwed up.

With HD really cheap now, maybe a second one set up as backup device would be nice, huh?  Full nightly backups.
0
 
Physics_MagiAuthor Commented:
Edited text of question.
0
 
Physics_MagiAuthor Commented:
Oh yes important maybe you need to know I am running linux redhat 6.1, I also have a Windows partition and a copy of partition magic 4.0, if that is useful?
0
 
Physics_MagiAuthor Commented:
THanks alot, I actually decided to just re-install, but it did kind of suck, the install program could not format my disk, I had to use partition magic instead.  I really appreciate the answer though, thanks alot!
0
All Courses

From novice to tech pro — start learning today.