Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: kagashe on December 17, 2008, 01:22:11 AM

Title: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: kagashe on December 17, 2008, 01:22:11 AM
I am trying Xorg.tce on /tclocal and it is giving:
Fatal server error:
Can't open /var/log/Xorg.0.log

although it works on /tce.

I tried "sudo chown -R tc:staff /var/log" it fails on next step:

Fatal server error:
xf86EnableTOPorts: failed to set IOPL for I/O (Operation not permitted).

$ cd /usr/local/bin
$ ls -l | grep Xorg
-rwsr-xr-x     1     root   root Xorg

I also tried adding +w to tc and others same error.

I think for using Xorg on /tclocal some thing else needs to be changed.

kagashe
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: mikshaw on December 17, 2008, 08:10:11 AM
Some tce applications apparently don't install everything into /usr/local.  If you install the application you get everything, but if you try to use it with /tclocal you lose whatever was not in /usr/local.  That might have something to do with your trouble, but just guessing.
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: kagashe on December 17, 2008, 08:35:49 AM
Some tce applications apparently don't install everything into /usr/local.  If you install the application you get everything, but if you try to use it with /tclocal you lose whatever was not in /usr/local.  That might have something to do with your trouble, but just guessing.
I can see that /tclocal is a sort of hard disk install and /tclocal is getting mounted at /usr/local. I know that xorg.conf is not present in /tclocal but I have put it in .filetool.lst and it is getting loaded and Xorg is using it (from Xorg.0.log). In addition graphics-2.6.26.tcem is not getting installed on /tclocal and I am installing it on every boot before trying Xorg on /tclocal.

If you look at the error:
Quote
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted).
It is saying "not permitted" and not saying "not found".

kagashe
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: kagashe on December 17, 2008, 09:04:31 AM
Attaching Xorg.0.log

kagashe
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: Juanito on December 17, 2008, 09:16:17 AM
Quote
I tried "sudo chown -R tc:staff /var/log" it fails on next step
BTW - I only suggested this as a quick and dirty means to check if Xorg was suid, I was not at all suggesting it as any kind of standard procedure (just in case that was not clear).

Quote
$ cd /usr/local/bin
$ ls -l | grep Xorg
-rwsr-xr-x     1     root   root Xorg
This shows that /usr/local/bin/Xorg is suid, but if the quick and dirty trick above got rid of the Xorg.0.log error then it seems "startx" is using a version of Xorg that is somewhere other than /usr/local/bin and not suid??

If you try this, what do you get:
Code: [Select]
$ which Xorg
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: Jason W on December 17, 2008, 09:19:56 AM
kagashe,
Did you try the /usr/local approach for graphics modules listed in this thread?

http://forum.tinycorelinux.net/index.php?topic=152.0

They should stay installed after reboot with this method.  I tried it for the graphics-2.6.26.tcem and it works here.

JW
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: kagashe on December 17, 2008, 12:17:59 PM
If you try this, what do you get:
Code: [Select]
$ which Xorg
/usr/local/bin/Xorg
Even normal Xorg gets installed in /usr/local/bin so how it can be different. Anyway I have checked it.and it is ok.
kagashe,
Did you try the /usr/local approach for graphics modules listed in this thread?

http://forum.tinycorelinux.net/index.php?topic=152.0

They should stay installed after reboot with this method.  I tried it for the graphics-2.6.26.tcem and it works here.

JW

I have done it now and the modules are installed in /usr/local/lib

But I am getting:
Quote
can't open /var/log/Xorg.0.log
inspite of /usr/local/bin/Xorg is suid.

Please note that the partition as a whole is getting mounted at /mnt/hdx (for backup) and again /tclocal which is on same partition is getting mounted at /usr/local

Could it make any difference?

kagashe
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: kagashe on December 17, 2008, 09:54:36 PM
I have googled for the error:
Quote
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
and got many pages. One page is DSL Tips and Tricks :: A quick guide on compiling XOrg 7.0 on DSL (http://damnsmalllinux.org/f/topic-3-26-16260-0.html) which looks related to our Xorg.

This is a long page and if you search for the error "xf86EnableIOPorts" on the page you can see the mail.

kagashe
Title: Re: Xorg.tce ok as /tce but on /tclocal Can't open /var/log/Xorg.0.log message.
Post by: curaga on February 27, 2009, 10:42:38 AM
Just now revisiting this, I felt struck by lightning :p
Pretty sure I know where the fault is.

Could you try to apply this patch to /etc/init.d/tc-config? It's against TC 1.1.
Quote
--- tc-config   2009-02-27 17:34:08.000000000 +0200
+++ tc-config.new   2009-02-27 17:37:30.000000000 +0200
@@ -235,18 +235,18 @@
    wait $fstab_pid
    if [ -n "$LOCAL" ]; then
       LOCAL_DEVICE="${LOCAL%%/*}"
-      mount /mnt/"$LOCAL_DEVICE"
+      mount /mnt/"$LOCAL_DEVICE" -o suid
       if [ "$?" == 0 ]; then
          [ -d /mnt/"$LOCAL_DEVICE"/tclocal ] && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/ && LOCAL_READY=1
-         [ -z "$LOCAL_READY" ] &&  [ -f /mnt/"$LOCAL_DEVICE"/tclocal ] && mount -o loop /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/ && LOCAL_READY=1
+         [ -z "$LOCAL_READY" ] &&  [ -f /mnt/"$LOCAL_DEVICE"/tclocal ] && mount -o loop,suid /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/ && LOCAL_READY=1
          [ -z "$LOCAL_READY" ] &&  mkdir /mnt/"$LOCAL_DEVICE"/tclocal && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local/
       fi
    else
       LOCAL_DEVICE="$(autoscan 'tclocal' 'd')"
       if [ -n "$LOCAL_DEVICE" ]; then
-        mount /mnt/"$LOCAL_DEVICE" && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
+        mount /mnt/"$LOCAL_DEVICE" -o suid && mount --bind /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
      else LOCAL_DEVICE="$(autoscan 'tclocal' 'f')"
-        [ -n "$LOCAL_DEVICE" ] && mount /mnt/"$LOCAL_DEVICE" && mount -o loop /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
+        [ -n "$LOCAL_DEVICE" ] && mount /mnt/"$LOCAL_DEVICE" && mount -o loop,suid /mnt/"$LOCAL_DEVICE"/tclocal /usr/local
      fi
    fi
    # Final test for /usr/local mount and call setup routines for libraries, modules, and menu.
Downloadable version:
http://www.ziddu.com/download/3663010/tclocal.patch.gz.html

I think the cause is that by default the SUID bit is not honored, this should force it on with the tclocal mounts.