More LiveCD space optimizations

Martin Pitt martin.pitt at ubuntu.com
Mon Nov 15 07:59:06 GMT 2010


Hello Josua,

Josua Dietze [2010-11-13  0:35 +0100]:
> Am 12.11.2010 23:26, schrieb Martin Pitt:
> >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. 

Right, but is there anything that usb-modeswitch needs to do to those
devices after they are in proper modem state? Shouldn't modemmanager
pick them up at that point? My internal 3G card doesn't need any
usb-modeswitch magic either and just works fine, after all?

> I searched for a way to signal from one udev event to annother but
> they (and their environment) are completely isolated.

Right, they should be, otherwise you'd get all kinds of race
conditions.

> After that I added the broader "ttyUSB" rule. I'd gladly incorporate
> any better solution that Marco d'Itri will accept.

So let's first clarify what that usb-modeswitch rules actually needs
to match on.

KERNEL=="ttyUSB*", DRIVERS=="option1|usbserial", PROGRAM="/usr/sbin/usb_modeswitch_dispatcher --symlink-name %p", SYMLINK="%c"

Perhaps there is a particular USB device class or protocol which we
can add, so that this doesn't run on any kind of USB serial converter?

> And what about the still existing bash and python scripts in
> "/lib/udev" ?

There are some shell scripts which get run through /bin/dash, which is
really fast. Also, dash is in memory at this point anyway, we need
shell scripts in hundreds of places during boot.

There is just one python script (udev-add-printer), but this doesn't
get called in udev rules. I think it's indirectly called through
udev-configure-printer if a printer isn't known to cups yet, so it
will just happen on first boot, or if you have a new printer; so it's
not a penalty on every boot. (It's still nasty, though)

> My (trained) Ubuntu 10.10 takes 15 seconds from boot menu to
> desktop; how much exactly would be gained when removing bash ?

If you remove dash, your computer wouldn't boot at all, so that's not
quite a valid question :)

> 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.

You need to switch them at some point, though, and if they appear in
network-manager when your desktop is booted, that's kind of nice,
isn't it?

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



More information about the ubuntu-devel mailing list