Fedora Linux Support Community & Resources Center
  #1  
Old 13th November 2007, 12:31 PM
a8hex Offline
Registered User
 
Join Date: Nov 2007
Posts: 4
wierd problem with prefdm, can't exec from /etc can from /tmp

I've just installed Fedora 8 onto a USB 4GB key. Everything when great, I left it updating last night and then let it reboot this morning. When I did this however X didn't startup. On the console I just get

init: Id "x" respawning too fast: disabled for 5 minutes

So I go and take a look at the inittab file, and it's trying to execute

[root@duck ~]# grep ^x /etc/inittab
x:5:respawn:/etc/X11/prefdm -nodaemon

So I try this from a ssh session, I just get the prompt back.
After checking the file, I see it's a shell script so I try

sh -xv /etc/X11/prefdm -nodaemon

and it starts no problem.
I try adding a

set -xv

into the script to see where it fails ...

# Fallbacks, in order
exec gdm "$@" >/dev/null 2>&1 </dev/null
+ exec gdm -nodaemon

So it's trying to exec gdm.

Before I make any further changes to the script I copy it to /tmp and try things from there. It works no problem.

cp /etc/X11/prefdm /tmp
/tmp/prefdm -nodaemon

works with no problem

/etc/X11/prefdm -nodaemon

the exec fails.


hmmm I'm confused!
Reply With Quote
  #2  
Old 13th November 2007, 12:36 PM
a8hex Offline
Registered User
 
Join Date: Nov 2007
Posts: 4
OK, I tried another test.

cp /etc/X11/prefdm /etc/X11/prefdm2
/etc/X11/prefdm2 -nodaemon

also works fine.
Reply With Quote
  #3  
Old 13th November 2007, 12:49 PM
jnilsson Offline
Registered User
 
Join Date: Oct 2007
Location: Barcelona, Spain
Posts: 17
We had a similar issue with Oracle Linux (Red Hat). I believe that the issue was related to GDM...

I believe that I fixed it by reinstalling GDM using yum.
Reply With Quote
  #4  
Old 13th November 2007, 01:38 PM
a8hex Offline
Registered User
 
Join Date: Nov 2007
Posts: 4
Thanks for the response.

I can get it to work, just by making a copy of the script, what I don't understand is why I get such different behaviour from a couple of copies of a shell script.

When I run /etc/X11/prefdm -nodaemon

The script execs

gdm -nodaemon,

and looking at the output this generates I get

/etc/X11/prefdm: /usr/sbin/gdm: /bin/sh: bad interpreter: Permission denied
/etc/X11/prefdm: line 38: /usr/sbin/gdm: Success
exec kdm "$@" >/dev/null 2>&1 </dev/null
+ exec kdm -nodaemon

Yet the copy of the script (prefdm2)
gives the expected


test -f /etc/profile && . /etc/profile
+ test -f /etc/profile
+ . /etc/profile
# /etc/profile
...

Which is the stuff at the start of the gdm script


The prefdm instance is actually not getting a far as executing gdm at all.

If I remove all the output redirections so I get the end of prefdm looking like.

### [ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 </dev/null
[ -n "$preferred" ] && exec $preferred "$@" </dev/null

# Fallbacks, in order
exec gdm "$@" </dev/null
exec kdm "$@" </dev/null
exec wdm "$@" </dev/null
exec xdm "$@" </dev/null
# catch all exit error
exit 1


Then running it I get

### [ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 </dev/null
[ -n "$preferred" ] && exec $preferred "$@" </dev/null
+ '[' -n '' ']'

# Fallbacks, in order
exec gdm "$@" </dev/null
+ exec gdm -nodaemon
/etc/X11/prefdm: /usr/sbin/gdm: /bin/sh: bad interpreter: Permission denied
/etc/X11/prefdm: line 38: /usr/sbin/gdm: Success
exec kdm "$@" </dev/null
+ exec kdm -nodaemon
/etc/X11/prefdm: line 39: exec: kdm: not found
exec wdm "$@" </dev/null
+ exec wdm -nodaemon
/etc/X11/prefdm: line 40: exec: wdm: not found
exec xdm "$@" </dev/null
+ exec xdm -nodaemon
/etc/X11/prefdm: line 41: exec: xdm: not found
# catch all exit error
exit 1
+ exit 1
[root@duck ~]#


Don't worry about the failure of kdm et al... I don't think they are installed.

but

/etc/X11/prefdm: /usr/sbin/gdm: /bin/sh: bad interpreter: Permission denied
/etc/X11/prefdm: line 38: /usr/sbin/gdm: Success

has me confused.
Why is it saying that it's getting permission denied from /bin/sh ?

You get the same type of error message if you start a script with

#!/home/ken/file

when file exists but does not have execute permission.

Could this be some "SE" Linux feature?

Cheers
Ken
Reply With Quote
  #5  
Old 13th November 2007, 01:46 PM
jnilsson Offline
Registered User
 
Join Date: Oct 2007
Location: Barcelona, Spain
Posts: 17
It could be several things:

1. That the GDM startup scripts got corrupted during the update.
2. The SELinux polices got corrupted during the update.

Thats why I advised you to try to reinstall GDM and see if it recreates the scripts that are causing the issue.

J
Reply With Quote
  #6  
Old 13th November 2007, 02:24 PM
a8hex Offline
Registered User
 
Join Date: Nov 2007
Posts: 4
The GDM startup scripts work fine.

I think it's the SE Linux policy. Digging into this there is an entry for prefdm.
I don't really understand the SELinux stuff. but prefdm has an SE File type of initrc_exec_t:s0
Reply With Quote
  #7  
Old 17th November 2007, 02:19 AM
jlumpkins Offline
Registered User
 
Join Date: Jun 2007
Posts: 4
I'm having the same problem...

Fedora 8 fresh install
Worked fine until I installed the updates.
I can hit the return after x dies, after the respawn message, and then log in, and startx with no problems.
I have downloaded and installed NVidia's driver, but the same driver works great when I boot from a different harddrive that has my Fedora 7 on it.

Also, only refresh rates available under the Screen Resolution Preferences is 50, and 51 Hz. It's 60 in Fedora 7.

I've:
1. made a copy of /etc/X11/prefdm, then replaced the original with the copy; Didn't help
2. relabeled the entire file system on reboot for SE Linux; didn't help.
3. changed SELInux to permissive; Didn't help.
4. replaced my /etc/X11/xorg.conf with the one from my Fedora 7 install; Didn't help.
5. installed the latest updates as of tonight; Didn't help.

I'm open to suggestions...

(x86_64; NVidia 7600GT; Core2 Dual 2.66)

Everything works fine in Fedora 7.
Reply With Quote
  #8  
Old 17th November 2007, 05:29 AM
jlumpkins Offline
Registered User
 
Join Date: Jun 2007
Posts: 4
Ok, I finally solved it.

I'm not certain why when I did a yum info gdm it showed it as installed,
but, when I ran yumex, and searched for gdm, it did not list it as installed,
and I checked the box, and updated.

Everything is working now...
Reply With Quote
Reply

Tags
exec, or etc, or tmp, prefdm, problem, wierd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wierd log in problem infernosoft Using Fedora 0 2nd September 2009 07:37 PM
Apache/PHP/Perl exec() problem jmaynard Servers & Networking 2 25th February 2008 04:36 AM
problem with the prefdm process unky Using Fedora 2 15th September 2006 09:16 AM
Plz help wierd cvs problem ShadeAtNight Servers & Networking 5 13th March 2005 04:16 AM


Current GMT-time: 05:46 (Sunday, 23-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
San Buenaventura Photos - Duncanville Travel Photos on Instagram - Ashtarak