More LiveCD space optimizations

Josua Dietze digidietze at draisberghof.de
Fri Nov 12 23:35:50 GMT 2010


Note: I have trouble getting my replies through to the list because of 
the slighly delayed moderation procedure. My first post lingered 
around for two days until it appeared.


Am 12.11.2010 23:26, schrieb Martin Pitt:

>> What *can* be done is to avoid running the Tcl script if no such device is
>> present.
>
> It currently triggers for any kind of ttyUSB. I think what can be done
> is that each of the vendor/product specific rules add a
> TAG="usb-modeswitch", and then the dispatcher only fires on that tag.


These devices are somewhat elusive in that they return after switching 
as virtually unrelated to their first appearance. I searched for a way 
to signal from one udev event to annother but they (and their 
environment) are completely isolated.

At one point I used a file in /tmp to relay a "message" to the other 
event (just the USB bus and device ID, contained in the empty file's 
name) which helped avoid untargeted runs. But I was reprimanded by the 
udev maintainer for doing so and thereby causing unspecified security 
problems.
After that I added the broader "ttyUSB" rule. I'd gladly incorporate 
any better solution that Marco d'Itri will accept.

>> Now the Tcl language: I can see that it is hard to carry it on if there is
>> only one system-related usage case. I will downright refuse to convert the
>> wrapper into a binary for tranparency reasons, but I'm open to suggestions
>> regarding other script languages that are expected to stay on the Live CD.
>
> That won't help much, though. Aside from the disk space issue, it also
> makes boot quite a lot slower. Starting any kind of scripting language
> during boot is very expensive.


I hesitate to take that for granted. Even if this is not my area of 
expertise, I doubt there is a real life impact. And what about the 
still existing bash and python scripts in "/lib/udev" ?
My (trained) Ubuntu 10.10 takes 15 seconds from boot menu to desktop; 
how much exactly would be gained when removing bash ?

If we are talking about a Live CD, I assume the access time for any 
tool - binary or not - will be way higher than its startup time.

Correct me (preferably with hard numbers ;-)) if I'm wrong.

Furthermore, the Linux I grew up with (so to speak) has that wonderful 
introspection window where you can see the cogwheels turning and even 
make little adjustments here and there because many things in the boot 
process were human (well, power user) readable.

And no matter what, many of those switch-mode modems will not be ready 
for use when that desktop comes up ...
In fact, just delaying the whole switching business would avoid any 
interference with the boot process alltogether. May be worth a thought.


Best regards,
Josh



More information about the ubuntu-devel mailing list