SliTaz SliTaz Forum

You are not logged in.

#1 2012-09-29 12:49:42

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

WriteFS development and portability

Hi friends!

My question to developers. I want to study more things to find the answer myself. I think, one of authors of SliTaz init scripts can answer me much faster than I can do myself wink

Answering this topic Problem with Xes (in Russian) I found if we run writefs then we get non-portable version of SliTaz suitable only for current video card. The problem is in the /etc/X11/xorg.conf.d/60-Device.conf that contain setting for video card. While original SliTaz rootfs contain only /etc/X11/xorg.conf.d/{35-synaptics.conf|40-evdev.conf|90-DRI.conf} and other configs creates on the fly on boot. So, I think we should not save new config files in this folder and should remove/move these files before writefs to have ability to run our customizable portable USB-Stick based SliTaz on other boxes.

In other hand—I see next code:

[c]gettext "Removing current screen resolution..."
rm -f /etc/X11/screen.conf ;;[/c]
Finally, my question wink

What is the purpose of a file /etc/X11/screen.conf? Is it (legacy) config file? In my current system I have this zero-length file. Or, maybe, it is flag-file for any config script? Or, maybe, something else—

Screen resolution generally set correct automatically, so I think we don't need question "Do you wish to remove the screen resolution (No/yes/exit) ? ". Maybe, we need another question instead, like this: "Do you wish to remove current video settings?" and filter generated list (/tmp/list) from these files (50-Monitor.conf; 60-Device.conf; 70-Screen.conf).

It is not difficult to implement in the code, but I want to understand the concept. Thanks for reading!

Offline

#2 2012-09-30 10:32:49

pankso
Administrator
Registered: Yesterday
Posts: 336
Website

Re: WriteFS development and portability

Hi Aleksej,

When SliTaz was using the tiny Xvesa server (no config file) we needed to know if X was already configured or not, so I created /etc/X11/screen.conf and if it was empty we start the dialog box but for HD install we dont have X configured each time and with writefs we can choose to keep the config or not.

Now we use Xorg and it have a config file: /etc/X11/xorg.conf, when we boot we now check if xorg.conf is not empty, if it's the case we auto configure X. So tazusb and writefs must just be modified to empty /etc/X11/xorg.conf and not etc/X11/screen.conf (we can remove this file).

X is configured on boot by /etc/init.d/system.sh (line 122-128), I think we must let users chosse with writefs, if one use the USB media on the same hardware we dont need X configured each time and it slow boot time.

Hugs,

- Christophe

Offline

#3 2012-09-30 11:27:28

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: WriteFS development and portability

Hi Christophe,

Thank you very much for this wide answer!

So, I think we can easy remove second question in the writefs dialog and substitute it by another question I described in the first post.

Small correction: we don't use /etc/X11/xorg.conf file but we use /etc/X11/xorg.conf.d directory.

And I want to change packing behavior of writefs. Now, rootfs packed in the RAM (+swap if any) and moves to /home/boot/ after packing. I have relatively small amount of RAM (1 GiB), but I like to install many programs wink In unhappy cases there is no room for unpacked working system and for packing rootfs.gs in the RAM and system hangs. We can pack /home/boot/rootfs.gz instead of /rootfs.gz. This save memory from overloading.

We need only checking for existence of /home/boot and ask user "You have no /home/boot/ mounted. Do you want to create rootfs.gz in the / ? (yes / No)".

Maybe, not bad to check free RAM (how?) if we pack rootfs.gz to / and have more than 1/2 RAM used, then warning user of possibly problems with system hang.

Offline

#4 2012-09-30 11:54:47

pankso
Administrator
Registered: Yesterday
Posts: 336
Website

Re: WriteFS development and portability

Yep,

Yes we use /etc/X11/xorg.conf file in our boot script /etc/init.d/system.sh but just to know if we must auto config Xorg or not. But as you point it of, Xorg it self use /etc/X11/xorg.conf.d directory.

Nice idea to move the rootfs.gz creation on disk, I think we dont need to ask, just check if /home is mounted if not write in /

We can check free memory with 'free' or the /proc filesystem. We could also provide an option to writefs by the shutdown script, so desktop and apps will be closed and we will have more RAM for compression.

Offline

#5 2012-09-30 13:01:05

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: WriteFS development and portability

Yes, now I see it here: http://hg.slitaz.org/slitaz-boot-scripts/file/3dd56819a891/etc/init.d/system.sh#l124

We use xorg.conf only as flag, it is unclear. Recently I wished to delete this file because I not use it. Now I know that this deletion can break script's busyness logic. I propose to use xorg.conf.d/ instead.

I can provide changes into writefs & system.sh late night (after my office workng).

Offline

#6 2012-09-30 19:30:03

pankso
Administrator
Registered: Yesterday
Posts: 336
Website

Re: WriteFS development and portability

No we must keep xorg.conf: cat /etc/X11/xorg.conf

# You can put here your own Xorg configurations. This config file is read

# before all files in /etc/X11/xorg.conf.d and will NOT be erased by any

# updates.

Plus /etc/X11/xorg.conf.d exist by default on any X windowed SliTaz system since it have file such as 40-evdev.conf, etc

Offline

#7 2012-09-30 20:20:20

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: WriteFS development and portability

Good evening, Christophe!

No, only I want to use xorg.conf.d as flag (and (maybe) to delete xorg.conf).

Let's see:

I as discrete user can delete xorg.conf (I heard that newer versions of XOrg will not support them) and X continue its work, but script broke(!)

In other hand if I delete xorg.conf.d I will broke both X and script.

So I will to see directory as flag for configuration script. Ok, and leave xorg.conf undeleted.

Offline

#8 2012-10-01 08:41:12

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: WriteFS development and portability

Execuse me, Christophe!

I can't understand initialization script's logic. Maybe I should sleep more wink

Is it right?—

At the very beginning (on LiveCD and on brand new LiveUSB) we have no xorg.conf file.

Script see absence and configures X, then X starts and create this (mostly) empty xorg.conf file.

If I want to reconfigure X at boot time, I should remove xorg.conf before writefs? And what about other files in the xorg.conf.d (50-Monitor.conf; 60-Device.conf; 70-Screen.conf)? I should remove them before reconfiguring of X, or X can ignore them and reconfigure properly?

I want to deep myself into scripts. Not so fast…

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]