WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log  (Read 12377 times)

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Since I am having 640x480x16 only on Xvesa I was using Xorg.tce till now and it was working well.

To compare the memory requirement with Xorg.tcz I downloaded it and replaced tce package with tcz with dependencies (openssl and graphics) and tried to boot.

It is giving fatal xsever error:
Can't open /var/log/Xorg.0.log

kagashe
« Last Edit: December 11, 2008, 05:32:53 PM by kagashe »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12410
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #1 on: December 11, 2008, 04:05:55 AM »
If you take Xorg-7.4.tce and edit out all the drivers (and Xvesa, Xfbdev?) you don't need, you can significantly reduce the size of the extension.

In doing the above I reduced the size to 10.5MB for the tce and 12MB for the tcz. These sizes include the large intel drm drivers, if you don't use drm, you could probably drop another 1-2MB

BTW, the "Can't open /var/log/Xorg.o.log" is possibly because "set uid" became unset in the tcz conversion - does "ls -l /usr/local/bin/Xorg" show an "s" in there somewhere?
« Last Edit: December 11, 2008, 04:10:23 AM by Juanito »

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #2 on: December 11, 2008, 04:25:42 AM »
BTW, the "Can't open /var/log/Xorg.o.log" is possibly because "set uid" became unset in the tcz conversion - does "ls -l /usr/local/bin/Xorg" show an "s" in there somewhere?
$ ls -l /usr/local/bin/Xorg
lrwxrwxrwx   1   root  root  /usr/local/bin/Xorg  -> /tmp/tcloop/Xorg-7.4/usr/local/bin/Xorg

kagashe

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12410
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #3 on: December 11, 2008, 04:46:26 AM »
OK so set uid is not set in the tcz - as a quick experiment, you could try this:
Code: [Select]
$ sudo chown -R tc:staff /var/logand then try startx again.

If this works/otherwise you could try loading Xorg-7.4.tce, check Xorg has set uid set and, if so, rebuild the tcz

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #4 on: December 11, 2008, 05:07:45 AM »
OK so set uid is not set in the tcz - as a quick experiment, you could try this:
Code: [Select]
$ sudo chown -R tc:staff /var/logand then try startx again.

If this works/otherwise you could try loading Xorg-7.4.tce, check Xorg has set uid set and, if so, rebuild the tcz
It results into another fatal xserver error:
$ sudo chown -R tc:staff /var/log
$ startx
xf86OpenConsole: Cannot open virtual console 2 (Permission denied)

kagashe

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12410
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #5 on: December 11, 2008, 05:14:47 AM »
As you might have guessed, I'm not in front of a linux machine at the moment, but I'm now reasonably sure the issue is that /usr/local/bin/Xorg needs to be set uid (this allows a normal user to run an application with root privileges) and it is not in the tcz extension you have.

You cannot change anything with the tcz loaded as it is read-only.

Depending on how deeply you want to get into this, you could try to make a new tcz extension out of the tce extension you have, or you could wait for curaga to see this and give his feedback.

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #6 on: December 11, 2008, 05:20:16 AM »
Depending on how deeply you want to get into this, you could try to make a new tcz extension out of the tce extension you have, or you could wait for curaga to see this and give his feedback.
Please tell me where to get tce2tcz.sh script and how to convert Xorg.tce into tcz using it.

kagashe

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12410
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #7 on: December 11, 2008, 05:34:53 AM »
The tce2tcz.sh script is included with tinycore so you should just be able to type "tce2tcz.sh" and it will (probably) tell you what to do.

Otherwise
Code: [Select]
$ tce-load /path-to-file/cramfs-utils.tce
$ mkdir /tmp/pkg
$ cp /path-to-file/Xorg-7.4.tce /tmp/pkg/Xorg-7.4.tar.gz
$ cd /tmp/pkg
$ sudo tar xzf Xorg-7.4.tar.gz
$ sudo rm Xorg-7.4.tar.gz
[check /tmp/pkg/usr/local/bin/Xorg has set uid]
[if not, $sudo chmod +s usr/local/bin/Xorg]
$ cd ..
$ sudo mkfs.cramfs pkg/ Xorg-7.4.tcz
$ sudo chown tc:staff Xorg-7.4.tcz
$ mv Xorg-7.4.tcz /path-to-safe-place
$ tce-load /path-to-safe-place/Xorg-7.4.tcz
« Last Edit: December 11, 2008, 05:50:20 AM by Juanito »

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #8 on: December 11, 2008, 06:27:50 AM »
The tce2tcz.sh script is included with tinycore so you should just be able to type "tce2tcz.sh" and it will (probably) tell you what to do.

Otherwise
Code: [Select]
$ tce-load /path-to-file/cramfs-utils.tce
$ mkdir /tmp/pkg
$ cp /path-to-file/Xorg-7.4.tce /tmp/pkg/Xorg-7.4.tar.gz
$ cd /tmp/pkg
$ sudo tar xzf Xorg-7.4.tar.gz
$ sudo rm Xorg-7.4.tar.gz
[check /tmp/pkg/usr/local/bin/Xorg has set uid]
[if not, $sudo chmod +s usr/local/bin/Xorg]
$ cd ..
$ sudo mkfs.cramfs pkg/ Xorg-7.4.tcz
$ sudo chown tc:staff Xorg-7.4.tcz
$ mv Xorg-7.4.tcz /path-to-safe-place
$ tce-load /path-to-safe-place/Xorg-7.4.tcz

I could not find the script but followed your instructions step by step and now running on Xorg-7.4.tcz. Thank you.

There is considerable reduction in memory compared to tce. I will follow your other instruction and trim Xorg further.

Yes. I confirm that I had to use "$sudo chmod +s usr/local/bin/Xorg" to change it.

kagashe

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #9 on: December 11, 2008, 07:57:10 AM »
If you take Xorg-7.4.tce and edit out all the drivers (and Xvesa, Xfbdev?) you don't need, you can significantly reduce the size of the extension.

In doing the above I reduced the size to 10.5MB for the tce and 12MB for the tcz. These sizes include the large intel drm drivers, if you don't use drm, you could probably drop another 1-2MB
Where are the drivers located in extracted Xorg-7.4.tgz?

kagashe

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12410
Re: [SOLVED] Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #10 on: December 11, 2008, 10:45:20 AM »
somewhere like:

/usr/local/lib/xorg/modules/multimedia/
/usr/local/lib/xorg/modules/input/
/usr/local//lib/xorg/modules/drivers/

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: [SOLVED] Xorg.tcz Fatal server error -- can't open /var/log/Xorg.0.log
« Reply #11 on: December 11, 2008, 11:11:39 AM »
Side notes:
- /var/log/Xorg.o.log is actually /var/log/Xorg.0.log
- tce2tcz.sh is included in all releases so far afaik.  Just invoke it on command line.  To get the exact location, use `which tce2tcz.sh `