LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   debian lenny won't start up: failed code 126 (https://www.linuxquestions.org/questions/linux-newbie-8/debian-lenny-wont-start-up-failed-code-126-a-849796/)

wincen 12-12-2010 04:22 PM

debian lenny won't start up: failed code 126
 
I had debian lenny running smoothly for a while, then I think the power went out and the computer didn't shutdown smoothly. The next time I started it up I ran into this error:
Checking root file system.../etc/rcS.d/S10checkroot.sh: line 274: /sbin/logsave: Permission denied
failed (code 126)
This happens in single user mode as well. I've tried fscking all my partitions but it doesn't help.

I've booted in bypassing the normal init and changed the permissions of /sbin/logsave to 777 and during boot I get a message of:
The file system check corrected errors on the root partition but requested that the system be restarted. failed!
Then the system just reboots automatically without letting me to anything.

Any ideas on how to fix this??

frankbell 12-12-2010 08:10 PM

Try booting to a live CD (Knoppix or Slax is great for this) and checking permissions and taking a look at of /etcd/rcS.d/S10checkroot.sh and /sbin/logsave and posting your findings here.

If you are feeling bold (and this is a shot in the dark) you could retry renaming the files in question (NOT deleting them so you have a fallback position) to something like *.bak, then seeing whether Debian will boot.

wincen 12-13-2010 12:06 AM

/sbin/logsave
ownership is root:adm
permissions are: 666

/etc/rcS.d/S10checkroot.sh -> /etc/inid.d/checkroot.sh
ownership is root:root
permissions are 755

removing S1-checkroot.sh from the boot process just causes basically the same error about permission problems with /sbin/logsave, but from S30checkfs.sh instead.

wincen 12-13-2010 12:08 AM

Ok, I feel like a bonehead! I got it to work, finally, but I don't totally understand why.

I changed the permissions of /sbin/logsave to 777 and it worked. I obviously didn't want to keep it this way so I changed it to 755.

For whatever reason /sbin/logsave seems to need to be executable. I don't know why since my file is empty. Does anyone here know why it needs to be executable? I'd really like to know even though it's working now.

frankbell 12-13-2010 07:30 PM

It's executable and, apparently, compiled (when I look at /sbin in Konqueror, logsave has the cog executable icon and I can't open it in an editor).

Apparently, it has to be executable because it does stuff.

It took a little searching, but I found this.

wincen 12-13-2010 11:48 PM

thanks. mine must have been corrupted then. my logsave file has nothing in it. i suppose i should find out how to restore it, as in the size is 0.

frankbell 12-14-2010 09:05 PM

I think you're right, it must have gotten trashed by the power failure. Mine's 6.3 kb.

If you want to contact me off line, I can try to email you a copy of mine; I'm also running Lenny.

I was able to make a copy.

TobiSGD 12-14-2010 09:22 PM

logsave is part of the package e2fsprogs, so you can do the job with
Code:

aptitude reinstall e2fsprogs


All times are GMT -5. The time now is 03:36 AM.