LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-21-2013, 02:44 PM   #1
rocksfrow
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Rep: Reputation: Disabled
centOS 6.4 freeze on boot - /dev/fd/8: line 2: /bin/awk permission denied


Okay so I've run into a strange issue that has been beating me up for the last couple of days.

The system freezes when booting normally, when booting single-user, and even when trying to boot rescue mode, although the latter behaves a little differently.

When booting regular, or in single-user:

Code:
_Welcome to CentOS_
Starting udev ... OK
Setting hostname ... OK
Checking filessystems ... OK
Mounting local filesystems ... OK
Enabling /etc/fstab swaps ... OK
/dev/fd/8: line 2: /bin/awk: Permission denied
init: rcS post-stop process (789) terminated with status 1

... hangs (even if left for hours)
When I tried booting without 'quiet' and 'rhgb' kernel flags and I get more output all the way up to the error, but no extra output pertaining to the error... just the same 'Permission denied' for /bin/awk.

Looking at some other systems, it looks like on a normal boot, you get the user login screen after 'Enabling /etc/fstab swaps ... OK'.

What occurs in the boot process at that point? I'm stumped as I can't even get into rescue to debug.

I get no errors when botting into rescue, it simply hangs after mounting /tmp. One thing I want to try is forcing rescue mode to read-only but I don't know how to force rescue mode to read-only ins 6.4.

Please help!
 
Old 10-21-2013, 02:46 PM   #2
rocksfrow
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
More notes:

- I also tried booting a previous kernel version. That also had no affect on the error.
- This is a VM on XenServer and I am able to modify grub.conf on the machine using 'xe-edit-bootloader' tool successfully. It mounts the storage successfully.

Last edited by rocksfrow; 10-21-2013 at 02:57 PM. Reason: additions
 
Old 10-21-2013, 05:19 PM   #3
rocksfrow
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
UPDATE:

I am able to get into rescue mode. It turned out I had to set clocksource=hpet in order to get it to boot properly.

Anyway, from rescue mode I am able to mount my filesystem read/write without issue.

The file '/dev/fd/8' doesn't exist on the system... what's going on? When I look at the normal/good log, it looks like what it's breaking just before 'Starting non-interactive startup'

Please help!
 
Old 10-21-2013, 10:53 PM   #4
rocksfrow
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Solved

OK, this has been resolved.

I ended up booting into emergency mode, although this could have been done from repair mode as well (as I previously mentioned I was able to boot into repair mode using the correct clocksource).

Anyway, to be thorough, I booted into emergency mode by starting the system as normal (with no media):

At grub boot screen, press space bar to interrupt the boot within the first few seconds. Once you're there, select your most recent kernel and press 'a'. Add 'emergency' to the end of the kernel string and press 'b' to boot. You can also use 'e' instead of 'a', and just press end to go to the end of the string, make changes and press enter. Then press 'b'.

Quote:
/dev/fd/8: line 2: /bin/awk: Permission denied
init: rcS post-stop process (789) terminated with status 1
The error was complaining about line 2 of 'post-stop script' section in /etc/init/rcS.conf:

Code:
                [ -f /etc/inittab ] && runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
So anyway, this issue was a totally random issue caused by an admin borking the permissions of some scripts in /bin. The list of 8 or 9 scripts included gawk (/bin/awk symlinks to this).

So I grep'd ls -alh /bin for '-rw-rw-rw' as all of the borked files has these perms incorrectly. Some stuff to reference:

* compare repo files

Code:
rpm -V gawk
* fix package file permissions

Code:
rpm --setperms gawk
* fix package file user/groups

Code:
rpm --setugids gawk
* find package file belongs to

Code:
rpm -qf /bin/gawk
So I just went through /bin, ran rpm --setperms & rpm --setugids gawk for the package if I knew it (or used rpm -qf to find it).

After restoring the package files, my system rebooted succesfully.

I hope this information helps somebody!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /usr/bin/xterm: Could not exec /bin/bash: Permission Denied suheng Linux - Newbie 2 09-24-2010 05:31 PM
./bin/sh : Permission denied OliB Linux - Software 19 06-02-2008 02:59 AM
/etc/rc.d/rc.S: line 209: /dev/null: Permission Denied esanchez Slackware 4 01-15-2006 03:27 PM
ln: creating symbolic link `/dev/dvd' to `/dev/hdc': Permission denied qazwsx27 Fedora 3 06-14-2005 02:09 PM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 07:46 AM


All times are GMT -5. The time now is 02:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration