Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-24-2012, 01:31 AM
|
#1
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Rep:
|
O.S. Crashed as a result of messing up with / permissions
Hey everyone,
I am stuck in a serious situation. I use sabayon 8 distribution and i changed the permissions of / like this , Suddenly bash started rejecting every command, all the windows closed, i was luckily able to restart. I can start sabayon in recovery mode where a terminal is appearing. Any chances of recovery through that command line? Kindly help. Thanks...
Regards...
|
|
|
07-24-2012, 01:57 AM
|
#2
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
did you try to setting the permissions back? Eg
Evo2.
|
|
|
07-24-2012, 01:58 AM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
as it wasn't recursive, "chmod 755 /" should do the job.
|
|
|
07-24-2012, 01:59 AM
|
#4
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Original Poster
Rep:
|
@evo2 In the recovery mode you're talking about? I did. Its getting changed in that recovery mode itself. I am still not able to start the system.
|
|
|
07-24-2012, 02:02 AM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
well where is the filesystem for your main system mounted? /mnt/sysimage or something? chmod that instead.
|
|
|
07-24-2012, 02:04 AM
|
#6
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
Quote:
Originally Posted by abhishekgit
@evo2 In the recovery mode you're talking about? I did. Its getting changed in that recovery mode itself. I am still not able to start the system.
|
Hmm, not sure "what recovery mode" is. Where any error messages? Can you confirm that the permissions of / really did change from 044 to 755? Eg
Code:
stat /
chmod 755 /
stat /
Evo2.
|
|
|
07-24-2012, 02:05 AM
|
#7
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
s/Where/were
|
|
|
07-24-2012, 02:11 AM
|
#8
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Original Poster
Rep:
|
Well i have 3 choices in my grub2. The first is sabayon 8, the second sabayon8 recovery mode and the third is win7. In recovery mode i just get a shell prompt. No interface. After i execute chmod 755 /, and the output of ls -l / is rwxr-xr-x, which is fine. After i reboot and start my sabayon, All i get is a blank black screen and it gets stuck there.
|
|
|
07-24-2012, 02:14 AM
|
#9
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Original Poster
Rep:
|
@acid kewpie: My primary o.s. was win7. I dual booted. I am not sure about the file system where i've mounted.
|
|
|
07-24-2012, 02:15 AM
|
#10
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
Quote:
Originally Posted by abhishekgit
Well i have 3 choices in my grub2. The first is sabayon 8, the second sabayon8 recovery mode and the third is win7. In recovery mode i just get a shell prompt.
|
Ok.
Quote:
After i execute chmod 755 /, and the output of ls -l / is rwxr-xr-x, which is fine.
|
Yes but what about before running "chmod 755 /" Can you confirm that it is really 044? If it is not then you are probably trying to chmod the wrong parition. Ie "/" in "recovery mode" is not your normal "/". In this case you need to mount your normal "/" somewhere and run chmod on it (this is what acid_kewpie is talking about).
Evo2.
|
|
|
07-24-2012, 02:20 AM
|
#11
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Original Poster
Rep:
|
Quote:
Ie "/" in "recovery mode" is not your normal "/"
|
I got it! But I do not have access to my normal "/" through recovery mode. How do i get to know the mounted filesystem through recovery. That would probably solve the problem.
|
|
|
07-24-2012, 02:26 AM
|
#12
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
well if you run "mount" you may well see it somewhere else, like where I mentioned. Otherwise you can mount it yourself.
|
|
|
07-24-2012, 02:31 AM
|
#13
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Original Poster
Rep:
|
@acid kewpie : Do you mean I have to chmod the output of mount command through recovery shell prompt?
|
|
|
07-24-2012, 02:32 AM
|
#14
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
if you just have the one physical disk it will be /dev/sdaN where N is some >0 integer.
Try the following.
Code:
mount -t ext3 /dev/sda1 /mnt
ls /mnt
If it looks like your "/"
do
Code:
chmod 755 /mnt
umount /mnt
and reboot the system.
If it doesn't look like your /, umount it and try the next partition.
Evo2.
PS. There is probably some command to list all the unmounted partitions, but it escapes me right now.
|
|
|
07-24-2012, 03:04 AM
|
#15
|
Member
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 165
Original Poster
Rep:
|
@evo2:
I tried it and this is what i got
Quote:
mount: Wrong fs type, bad option, bad superblock on /dev/sda1 missing codepage or helper program or other error. In some cases useful info is found in syslog. Try dmesg | tail.
|
And i tried
this is the output
Quote:
EXT3-fs :error: can't find ext3 filesystem on /dev/sda1
EXT3-fs :error: can't find ext3 filesystem on /dev/sda2
|
|
|
|
All times are GMT -5. The time now is 02:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|