1 |
Hi, All. |
2 |
|
3 |
This is a rather special case, so I don't expect much, but who knows? |
4 |
|
5 |
I've built a Gentoo x86-64 system for an embedded application. |
6 |
|
7 |
Just after a lot of updates, which I am unable to track, it stopped working |
8 |
as usual. |
9 |
|
10 |
There is the development system, fully loaded of a lot of packages used for |
11 |
development, and the production system, that don't need all of those. |
12 |
|
13 |
There is a line in both systems in /etc/iniitab responsible for auto-login |
14 |
the production system user and the programs we need running (in its |
15 |
".bash_profile" and ".xinitrc"): |
16 |
|
17 |
c6:2345:respawn:/sbin/agetty -a production-user 38400 tty6 linux |
18 |
|
19 |
The development system starts a WindowMaker session, and the production |
20 |
system starts a program that controls the rest of the hardware of this |
21 |
embedded system, with an X11 graphical interface. That runs normally when |
22 |
simulated at the development system. |
23 |
|
24 |
The development system runs smoothly. The production system, after |
25 |
removing the files from undesirable packages and creating a squashfs image |
26 |
of the ripped-off root partition behaves strangely at boot: |
27 |
|
28 |
It shows the initialization messages as expected, but when the auto-login |
29 |
and the controller program start should take place, it completely stalls up |
30 |
to I plug a USB keyboard and issue some times some of the key combinations |
31 |
to change to a text console and back to X11 (Ctrl-Alt-F1 and Ctrl-Alt-F6); |
32 |
only then the things resume as expected. |
33 |
|
34 |
As you might suspect, there is no keyboard for the production system ;-) . |
35 |
|
36 |
As a matter of fact, I don't know where the stall take place, as when I try |
37 |
to switch to a text console to see the logs, it switches back to X11 and |
38 |
starts our program. By the way, the logs just show that the events |
39 |
occurred at latter times than expected. |
40 |
|
41 |
Although the squashfs is read-only, some main directories are arranged in a |
42 |
way that, using tmpfs mounts and unionfs with the read-only directory to |
43 |
the read-write tmpfs directory to that main directory provide a way of |
44 |
creating temporary files that has been working for a few years now. |
45 |
|
46 |
For instance, in "/etc/fstab": |
47 |
|
48 |
tmpfs /.etc.rw tmpfs defaults,mode=755 |
49 |
0 0 |
50 |
union /etc unionfs |
51 |
default_permissions,allow_other,use_ino,nonempty,suid,cow,dirs=/. |
52 |
etc.rw=rw:/.etc.ro=ro 0 0 |
53 |
|
54 |
And there is a "/.etc.ro" with a copy of all files present in regular |
55 |
"/etc" , a "/.etc.rw" directory to be mounted tmpfs, and the original |
56 |
"/etc" directory, that needs to be there at boot, even before mounting all |
57 |
this. |
58 |
|
59 |
Does anyone have a clue? |
60 |
|
61 |
Thanks! |
62 |
Francisco |