LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Messing about with permissions, won't turn on. (https://www.linuxquestions.org/questions/linux-general-1/messing-about-with-permissions-wont-turn-on-764991/)

repo 10-28-2009 07:31 AM

Quote:

How do I run fschk?
from the live cd
fschk /dev/sda
or whatever the drive is named in the live cd

In general if you use
CTRL_ALT_F1 (press them at the same time)
it should drop you to a shell, when X doesn't start.

repo 10-28-2009 07:32 AM

Quote:

"...does not describe a correct ext2 filesystem..."
What command did you use, and from where?

callumacrae 10-28-2009 07:34 AM

"fsck /dev/sda2"

Should it have been fschk? Stupid Google...

~Callum

callumacrae 10-28-2009 07:40 AM

The following directories claim to be unreadable:

/bin
/lost+found
/home/test - the user I was switching to (already logged in)
/root - the user I was switching from
/var/gdm
/etc/audisp
/etc/audit

/boot is empty
/sys is empty
/srv is empty
/media is empty (but it is not)

That was from just a quick scan

~Callum

repo 10-28-2009 07:45 AM

Seems to me the file system is severely damaged.
Perhaps someone else knows a solution for this, aside from reinstalling (reformat)

callumacrae 10-28-2009 07:57 AM

That's not good.

I think I will just go for the reinstall. It is possible to backup the list of applications without actually turning the computer on?

I know about backing up the /home directory, so that should be fine.

~Callum

repo 10-28-2009 08:05 AM

You can run
Code:

dpkg --get-selections > installed.txt
However you need to do this from the original computer.

You should be able to use
Code:

CTRL_ALT_F1 or F2
to get a commandprompt though

zhjim 10-28-2009 08:05 AM

You could do a
Code:

dpkg -l
and safe the output to a file. That would give you a list of installed packages. When the reinstall is done you can just
Code:

for i in $(cat ./save_file) | apt-get install $i
And you should have all the packages back.

callumacrae 10-28-2009 08:19 AM

Quote:

bash: dpkg: command not found
I can't turn the original computer on though.

~Callum

Robhogg 10-28-2009 08:31 AM

Quote:

Originally Posted by callumacrae (Post 3735252)
The following directories claim to be unreadable:

/bin
/lost+found
/home/test - the user I was switching to (already logged in)
/root - the user I was switching from
/var/gdm
/etc/audisp
/etc/audit

/boot is empty
/sys is empty
/srv is empty
/media is empty (but it is not)

That was from just a quick scan

~Callum

Have you tried booting from a live disk, executing sudo bash in a terminal window to get a root shell, and running ls -ld /bin (and other folders), to check the permissions on the folder itself (rather than the files inside it?

If the permissions on /bin are something like:
Code:

drwxr-x--- 2 root root 4096 Apr 17  2009 /bin
... then no user other than root (and members of group root) will be able to see the files in there, or traverse the directory), whatever the permissions on the files it contains.

If this is the case, run:
Code:

chmod o+rx /bin # then repeat for the other directories
... to restore read and traverse access for "other". These permsissions should be right for /bin - other directories might be different, but on the distro I'm currently using (Centos 5.3), the permissions on the directories in / look like this:
Code:

[rh@xxxx ~]$ ls -ld /*
drwxr-xr-x    2 root root  4096 Apr 17  2009 /bin
drwxr-xr-x    4 root root  1024 Apr 16  2009 /boot
drwxr-xr-x  11 root root  3640 Apr 16  2009 /dev
drwxr-xr-x  85 root root 12288 Oct 27 04:04 /etc
drwxr-xr-x  115 root root  4096 Oct 13 12:19 /home
drwxr-xr-x  10 root root  4096 Apr 17  2009 /lib
drwxr-xr-x    7 root root  4096 May 18 17:04 /lib64
drwx------    2 root root 16384 Nov  5  2008 /lost+found
drwxr-xr-x    2 root root  4096 Mar 11  2009 /media
drwxr-xr-x    2 root root  4096 Jan 21  2009 /misc
drwxr-xr-x    3 root root  4096 Apr 16  2009 /mnt
drwxr-xr-x    2 root root  4096 Mar 11  2009 /opt
dr-xr-xr-x  453 root root    0 Apr 16  2009 /proc
drwxr-x---    5 root root  4096 Oct 13 12:19 /root
drwxr-xr-x    2 root root 12288 Apr 17  2009 /sbin
drwxr-xr-x    2 root root  4096 Mar 11  2009 /selinux
drwxr-xr-x    2 root root  4096 Mar 11  2009 /srv
drwxr-xr-x  11 root root    0 Apr 16  2009 /sys
drwxrwxrwt    6 root root  4096 Oct 28 13:28 /tmp
drwxr-xr-x  15 root root  4096 Apr 16  2009 /usr
drwxr-xr-x  21 root root  4096 Apr 16  2009 /var


repo 10-28-2009 08:37 AM

Quote:

I can't turn the original computer on though.
why not ?
Quote:

and now it won't turn on. When I try to turn it on it displays the Fedora loading thing and loads. When it get to the bit where the mouse displays on screen it goes to a black screen and then back to the mouse, and back to black etc.
so it boots, no?

did you try to use
CTRL_ALT_F1 to get a command prompt ?

callumacrae 10-28-2009 09:02 AM

Ctrl Alt F1 doesn't work, it doesn't boot that far.

I'm currently booting up all my stuff. I think I installed too many virtual machines...

~Callum

chrism01 10-29-2009 02:11 AM

Given you've got Fedora, you can

1. boot from the install DVD; at the initial text prompt type

linux rescue

which boots from the DVD, then attempts to mount the HDD as a non-active disk.

2. Try this http://www.cyberciti.biz/tips/reset-...ermission.html

callumacrae 10-29-2009 06:53 AM

Too late, I've started again :)

Can't get virtualbox working now :@

~Callum


All times are GMT -5. The time now is 10:38 PM.