<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Zugschlusbeobachtungen (Entries tagged as english)</title>
    <link>http://blog.zugschlus.de/</link>
    <description>Das persönliche Blog von Marc Haber</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:mh+blog-zugschlus-de@zugschlus.de" />
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <pubDate>Mon, 20 Jun 2011 12:02:31 GMT</pubDate>

    <image>
        <url>http://blog.zugschlus.de/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Zugschlusbeobachtungen - Das persönliche Blog von Marc Haber</title>
        <link>http://blog.zugschlus.de/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>perl and caches</title>
    <link>http://blog.zugschlus.de/archives/922-perl-and-caches.html</link>
            <category>Freie Software</category>
    
    <comments>http://blog.zugschlus.de/archives/922-perl-and-caches.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=922</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=922</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
From the perl DBI manual page:
&lt;blockquote&gt;
If you&amp;#8217;d like the cache to managed intelligently, you can tie the
hashref returned by &amp;#8220;CachedKids&amp;#8221; to an appropriate caching module,
such as Tie::Cache::LRU
&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
And what happens when I don&amp;#8217;t do this? Will my cache be unintelligently managed then, with the consequence of my
machine exploding when the cache is filled with more than a handful entries?
&lt;/p&gt;

  
    </content:encoded>

    <pubDate>Mon, 20 Jun 2011 14:02:31 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/922-guid.html</guid>
    <category>english</category>
<category>perl</category>

</item>
<item>
    <title>How much added complexity in packages to cater for apt's shortcomings?</title>
    <link>http://blog.zugschlus.de/archives/884-How-much-added-complexity-in-packages-to-cater-for-apts-shortcomings.html</link>
            <category>Debian</category>
    
    <comments>http://blog.zugschlus.de/archives/884-How-much-added-complexity-in-packages-to-cater-for-apts-shortcomings.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=884</wfw:comment>

    <slash:comments>18</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=884</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
It is well known that apt has an issue when it comes to resolving circular dependencies. Therefore, Debian bug reporters
have set out to eradicate circular dependencies from the archive. This does, however, add significant bloat to the
actual packages, and I am questioning why this is really necessary.
&lt;/p&gt;
 &lt;p&gt;
For example, aide. aide has an aide-common package, depending on aide | aide-binary. aide-binary is a virtual package by
aide, aide-dynamic, and aide-xen. All three providers of aide-binary depend on aide-common again, which is a circular
dependency.
&lt;/p&gt;
&lt;p&gt;
If I now follow the request posed in #545852 and remove aide-common&amp;#8217;s dependency on aide | aide-binary, I&amp;#8217;ll
have to cater for the case of the aide-binary bein absent in each and every helper script included in aide-common, which
would drive the script&amp;#8217;s complexity up to a new level. I really hate that idea.
&lt;/p&gt;
&lt;p&gt;
Is it really necessary to work around apt&amp;#8217;s shortcomings by eliminating the case that apt doesn&amp;#8217;t handle
well from the archive, and driving up other packages&amp;#8217; complexity (and the possibility of bugs in this added
complexity)?
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 23 Jan 2010 12:08:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/884-guid.html</guid>
    <category>debian</category>
<category>debian-english</category>
<category>english</category>

</item>
<item>
    <title>Block devices in KVM guests</title>
    <link>http://blog.zugschlus.de/archives/882-Block-devices-in-KVM-guests.html</link>
            <category>Freie Software</category>
    
    <comments>http://blog.zugschlus.de/archives/882-Block-devices-in-KVM-guests.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=882</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=882</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
In the last few days, I found the time to spend some with KVM and libvirt. Unfortunately, there is a subject that I
haven&amp;#8217;t yet found a satisfying solution: Naming of block devices in guest instances.
&lt;/p&gt;
&lt;p&gt;
This is surely a common issue, but solutions are rare. Neither an article on Usenet (in German) nor the German version
of this blog article has found solutions for the main question. I should have written this in English in the first place
and am thus translating from German to english, hoping that there will be some answers and suggestions.
&lt;/p&gt;
&lt;p&gt;
KVM is quite inflexible when it coms to configure block devices. It is possible to define on the host, which files or
whole devices from the host should be visible in the guest. The documentation suggests that devices should be brought
into the guest with the virtio model, which needs suppport in the guest kernel. Importing a device as emulated ATA or
SCSI device brings a performance penalty.
&lt;/p&gt;
&lt;p&gt;
The devices brought into the guest via virtio appear in the guest&amp;#8217;s dev as /dev/vd&amp;lt;x&amp;gt and do also have their
corresponding entries in /dev/disk/by-uuid and /dev/disk/by-path. The vd&amp;lt;x&amp;gt; node is simply numbered in consecutive
order as hd&amp;lt;x&amp;gt; and sd&amp;lt;x&amp;gt;. /dev/disk/by-uuid is the correct UUID of the file system found on the device, at
least if it&amp;#8217;s a block device partitioned inside the guest and formatted with ext3 (I didn&amp;#8217;t try anything
else yet). The terminology of the /dev/disk/by-path node is not yet understood, and I am somewhat reluctant to assume
the PCI paths of emulated hardware as stable.
&lt;/p&gt;
 &lt;p&gt;
Looks like I am forced to configure inside the guest when I have changed the host&amp;#8217;s mass storage system (for
example, after migration to a different file system or after new block devices have been added) to accommodate for the
new order of the /dev/vd&amp;lt;x&amp;gt; or to have the UUID correctly configured. This is like calling for configuration
errors.
&lt;/p&gt;
&lt;p&gt;
This is a reincarnation of the same issue that has been killed by LVM on Linuxes running on &amp;#8220;bare metal&amp;#8221;:
The block device itself has a mnemonic name which is constant even in migration and copy actions. This works without
file-system specific stuff like UUID or label, and wouldn&amp;#8217;t even be possible with a UUID (which won&amp;#8217;t be
unique in this case). The mnemonic names of LVs are also available when the data is directly written to the raw device
such as a CNFS buffer of a news server.
&lt;/p&gt;
&lt;p&gt;
I would love to have something like a &amp;#8220;paravirtualized device mapper interface&amp;#8221; which would allow to say in
the &lt;u&gt;host&amp;#8217;s&lt;/u&gt; configuration which of the host&amp;#8217;s LVs should be visible in the guest with which name in
/dev/mapper. That way, the guest&amp;#8217;s configuration could remain stable during data wrangling operations on the
host.
&lt;/p&gt;
&lt;p&gt;
One solution is to have a single LV for each guest and import this LV as /dev/vda into the guest. /dev/vda would then be
partitioned like a real disk and have its own LVM installation. This would however need kpartx if one wants to access
the data from the host, and loses flexibility when resizing file systems.
&lt;/p&gt;
&lt;p&gt;
These issues appear in every installation of KVM virtualization, and I would expect that there are gazillions of other
possible solutions. I am interested in knowing how other people have tackled this issue and whether there are more
possiblity that I haven&amp;#8217;t thought of before. Maybe there is a solution that doesn&amp;#8217;t leave me with the
feeling of having implemented something ugly. Does the interface between the host&amp;#8217;s KVM and the guest&amp;#8217;s
device mapper that I have been dreaming of maybe exist. Or is there any other possibility of configuring the device
node&amp;#8217;s name in the guest Linux on the host side?
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 22 Jan 2010 14:08:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/882-guid.html</guid>
    <category>debian-english</category>
<category>english</category>
<category>kvm</category>
<category>linux</category>
<category>virtualisierung</category>

</item>
<item>
    <title>TCP and mobile IP</title>
    <link>http://blog.zugschlus.de/archives/849-TCP-and-mobile-IP.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/849-TCP-and-mobile-IP.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=849</wfw:comment>

    <slash:comments>15</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=849</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
Steinar H. Gunderson, sesse, has written an &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2394&amp;amp;entry_id=849&quot;  onmouseover=&quot;window.status=&#039;http://blog.sesse.net/blog/tech/2009-08-30-11-33_trying_to_understand_tcp_performance&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to
sesse&#039;s blog&quot;&gt;interesting article about TCP performance.&lt;/a&gt; I didn&amp;#8217;t find your blog&amp;#8217;s comment function, so
I am commenting with a trackback. (note: which didn&amp;#8217;t work either, &amp;#8220;The auto-discovered trackback URI does
not match our target URI&amp;#8221;)
&lt;/p&gt;
&lt;p&gt;
I frequently use mobile internet, using various of the German GSM/UMTS network operators, out of a moving train. As you
have written, this frequently causes packet loss which is not only not caused by congestion, but sends the congestion
avoidance algorithms on a false path.
&lt;/p&gt;
&lt;p&gt;
For example, when the train passes through the 3575 m long &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2395&amp;amp;entry_id=849&quot;  onmouseover=&quot;window.status=&#039;http://de.wikipedia.org/wiki/Schlüchterner_Tunnel&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;
title=&quot;external link to the german language wikipedia&quot;&gt;Distelrasentunnel&lt;/a&gt; between Frankfurt and Fulda, my network
link is broken for like two minutes. Passing through other parts of Germany sometimes gives me a ping response of
hundreds of thousands of microseconds by virtue of the rather huge send buffer the UMTS equipment has.
&lt;/p&gt;
&lt;p&gt;
In these circumstances, ssh sessions frequently take tens of minutes to notice that the network is back before the
session is useable again. Frequently, it doesn&amp;#8217;t come up again before an hour has passed. And I have not found a
way to work myself around this. Can you explain what&amp;#8217;s happening here, and do you have any ideas to solve the
issue?
&lt;/p&gt;
  
    </content:encoded>

    <pubDate>Fri, 04 Sep 2009 16:00:11 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/849-guid.html</guid>
    <category>debian-english</category>
<category>english</category>
<category>network</category>
<category>tcp</category>
<category>umts</category>

</item>
<item>
    <title>The grub drama</title>
    <link>http://blog.zugschlus.de/archives/826-The-grub-drama.html</link>
            <category>Freie Software</category>
    
    <comments>http://blog.zugschlus.de/archives/826-The-grub-drama.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=826</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=826</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
This is a rant. A rant which goes to the grub maintainers, and one that could go nearly identically to many people in
the KDE environment or many other open source projects.
&lt;/p&gt;
&lt;p&gt;
I really like grub. I really like grub 0.97 despite that it&amp;#8217;s been unmaintained for years and not booting on two
of my important machines. I should like grub 2 because its configuration looks more straightforward and for its better
features - direct booting of .iso images, from LVM and RAID. But actually, I have learned to hate grub 2 since it is not
finished and badly documented, and that its existence is already being used as an excuse for grub 0&amp;#8217;s development
having stopped years ago (and it being renamed to &amp;#8220;grub-legacy&amp;#8221; to clearly show that it&amp;#8217;s the unloved
child)  - and things looks like this is not going to change any time soon.
&lt;/p&gt;
 &lt;p&gt;
grub 0.97 is the de facto standard in booting Linux, its most prevalent advantages probably being its capability of
reading filesystems and its command shell, which allows booting kernels and other software that one wasn&amp;#8217;t
planning to boot when the system was shut down. There is a small fraction of people who still use lilo despite its
disadvantages, for example on achitectures that are not supported by grub, if one wants to have the boot FS on LVM, if
one just prefers lilo for non-technical reasons or on systems that grub doesn&amp;#8217;t work on.
&lt;/p&gt;
&lt;p&gt;
The last three systems, by the way, that I still run lilo on are Pyramid pizzaboxes with supermicro-made mainboards from
2002, which just refuse to boot if grub is used and the vendor just says that grub 0.97 is still beta and that they do
not support grub on their systems: &amp;#8220;Use Lilo.&amp;#8221;
&lt;/p&gt;
&lt;p&gt;
Grub&amp;#8217;s last upstream release, 0.97, dates back to 2005, and upstream has stopped developing this grub release
years ago. grub 2, the new way to go, had its first release in 2003, and the last &amp;#8220;stable&amp;#8221; release that
people are supposed to use dates back to februar 2008. grub 2 is clearly a step in the right direction, but there are
still bugs, and the most prevalent show stopper against grub 2 is the almost complete absence of any documentation. I
have, for example, not yet found good documentation about the new config file format, which is a completely different
deal from what we are used to with grub 0. The commands&amp;#8217; manual pages do little more than list the (obvious!)
command line options without giving much more information about what the actually do, let alone usage examples. The
documentation (which used to be really excellent for grub 0), has been &amp;#8220;moved&amp;#8221; to a wiki, which has some
useful content but cannot keep up with the excellent documentation that grub 0 used to have.
&lt;/p&gt;
&lt;p&gt;
Additionally, grub2 does not seem to have a grub shell which can be called from within the host system, which makes
installing grub 2 in &amp;#8220;exotic&amp;#8221; situations much harder than it used to be with grub 0.
&lt;/p&gt;
&lt;p&gt;
I am also quite disappointed that despite the grub upstream web pages claiming that grub 2 is under active development,
the last release is more than fifteen months in the past while there are still so many shortcomings. The Debian
maintainers of grub 2 are regularly packaging grub 2 subversion snapshots, which is a good idea in face of
upstream&amp;#8217;s release policy which is quite different from what&amp;#8217;s being told in the wiki. I am, however,
reluctant to rely on a development snapshot of a software to boot productive systems.
&lt;/p&gt;
&lt;p&gt;
Guys, you cannot declare a widely used, well-documented software legacy when the replacement is still in a nearly
unuseable shape and the docs are hidden in the helpful files named &lt;strong&gt;.c and &lt;/strong&gt;.h. This is simply
unacceptable. It&amp;#8217;s a drama that the docs are still in such a pitiful shape fifteen months after your last
release.
&lt;/p&gt;
&lt;p&gt;
But, grub is not the only free software project that so blatantly scores developer fun over the needs of the end user. I
know that it is a boring task to fix bugs and to work around design shortcomings in the existing version of software,
and that it is much more fun to hack away on new designs and new code, but dropping old versions before the new version
is up to par with the old one is annoying the users and driving people away to other software packages. This applies to
grub, a quite low-level program, but also to larger and more complex projects like KDE who has recently pulled the same
stunt by dropping development and support for KDE 3.5 while KDE 4 is still missing many many features and KDE
3.5&amp;#8217;s stablity, thus driving people (back) to GNOME or alternative desktop environments. This &amp;#8220;we give a
damn about people who actually use our software, our compilers run without users as well&amp;#8221; attitude is a show of
disrespect for the user base and makes me very sad as this does indeed show that free software is in no way superior to
its commercial counterparts.
&lt;/p&gt;
&lt;p&gt;
Sadly, I do not have a solution for this issue since I know that free software developers are usually volunteers who do
not have to report to anybody, and that they do not need to care for their user base. But I hope that people begin to
reconsider their attitude and think about what kind of horrible damage is being done to the user base and to free
software&amp;#8217;s reputation.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 30 May 2009 15:22:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/826-guid.html</guid>
    <category>debian</category>
<category>debian-english</category>
<category>english</category>
<category>grub</category>
<category>kde</category>
<category>rant</category>

</item>
<item>
    <title>Pushing a packet back and forth between Linux subsystems</title>
    <link>http://blog.zugschlus.de/archives/821-Pushing-a-packet-back-and-forth-between-Linux-subsystems.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/821-Pushing-a-packet-back-and-forth-between-Linux-subsystems.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=821</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=821</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
Linux policy routing is still incredibly painful if one wants to have more sophisticated routing than just &amp;#8220;take
source and destination IP address for the routing decision&amp;#8221;. The mechanisms that have been in use seven years ago
still work though, and I didn&amp;#8217;t find any possibility to do it any easier. In this article, I&amp;#8217;ll try to
explain the &amp;#8220;old&amp;#8221; mechanisms and hope that somebody from lazyweb will comment and say &amp;#8220;it can be done
so much easier&amp;#8221;.
&lt;/p&gt;
&lt;p&gt;
This is a translation of the Usenet article &amp;lt;gu48cs$rul$1@news1.tnib.de&amp;gt; in de.comp.os.unix.networking.misc in the
hope that the english-speaking blogosphere can give additional insights.
&lt;/p&gt;

 &lt;p&gt;
Given a Linux-based router with one internal network (int0), one perimeter network (per0) and two Internet connections
(ext0, ext1) with one IP address each. We need to do source NAT to deliver Internet to the internal and perimeter
networks. The internet connection on ext0 will be used for http and https, while all other traffic needs to go out on
ext1. The perimeter network is reachable from the outside via destination NAT.
&lt;blockquote&gt;&lt;pre&gt;
1: ext0: &lt;BROADCAST,MULTICAST,UP,10000 /&gt; mtu 1500 qdisc noqueue
    inet 10.81.221.145/29 brd 10.1.221.151 scope global ext0
2: ext1: &lt;BROADCAST,MULTICAST,UP,10000 /&gt; mtu 1500 qdisc noqueue
    inet 10.82.83.225/29 brd 10.82.83.231 scope global ext1
3: per0: &lt;BROADCAST,MULTICAST,UP,10000 /&gt; mtu 1500 qdisc noqueue
    inet 172.16.1.254/24 brd 172.16.1.255 scope global per0
4: int0: &lt;BROADCAST,MULTICAST,UP,10000 /&gt; mtu 1500 qdisc noqueue
    inet 192.168.8.254/24 brd 192.168.8.255 scope global int0
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
We have the following routing rules:
&lt;blockquote&gt;&lt;pre&gt;
0:      from all lookup 255
10:     from all lookup main
32:     from all fwmark 0x12e lookup to_ext0
32:     from all fwmark 0x12f lookup to_ext1
32000:  from all lookup defaultroute
32000:  from all lookup defaultroute
32766:  from all lookup main
32767:  from all lookup default
&lt;/pre&gt;&lt;/blockquote&gt;
Table main contains all rules for the directly connected networks, but no default route. Both to_ tables have one
default route each, pointing to the respective ISP, and the table defaultroute has once more a default gateway pointing
to ext1&amp;#8217;s gateway.
&lt;/p&gt;
&lt;p&gt;
The PREROUTING chain of the mangle table has these rules:
&lt;blockquote&gt;&lt;pre&gt;
iptables --protocol tcp --dport 80 --in-int int+ --set-mark 0x12e
iptables --protocol tcp --dport 443 --in-int int+ --set-mark 0x12e
iptables --in-int int+ --set-mark 0x12f
&lt;/pre&gt;&lt;/blockquote&gt;
and the POSTROUTING chain of the nat table has these:
&lt;blockquote&gt;&lt;pre&gt;
iptables --match mark --mark 0x12e --out-int ext0 --jump SNAT --to-source 10.81.221.145
iptables --match mark --mark 0x12f --out-int ext1 --jump SNAT --to-source 10.82.83.225
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
If now somebody from the internal network accesses a web server on the Internet. The outgoig packet will first be marked
in the PREROUTING chain, then the routing rules will use the firewall mark to consult the correct routing table and pass
the packet back to the packet filter, where the POSTROUTING chain will use the outgoing interface and the firewall mark
to SNAT the packet to the correct source IP so that the answer will actually reach us.
&lt;/p&gt;
&lt;p&gt;
Has a less ugly way available way to do this become available in the last five years? Or is it still necessary to have
the different parts of the networking subsystems play ping-pong with the packet? I particularly dislike that someone not
familiar with policy routing will not see any default route in the routing table printed by &amp;#8220;route&amp;#8221; or
&amp;#8220;ip route&amp;#8221;, which will probably be very confusing.
&lt;/p&gt;
&lt;p&gt;
Is there any possibility to interact with the routing code without firewall marks, maybe by directly setting a gateway
from a firewall rule?
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sun, 10 May 2009 10:01:04 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/821-guid.html</guid>
    <category>debian-english</category>
<category>english</category>
<category>iptables</category>
<category>lazyweb</category>
<category>linux</category>
<category>policy routing</category>
<category>routing</category>

</item>
<item>
    <title>Serial Console Server for the Poor III</title>
    <link>http://blog.zugschlus.de/archives/731-Serial-Console-Server-for-the-Poor-III.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/731-Serial-Console-Server-for-the-Poor-III.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=731</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=731</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
This is the third installment of my article about the Serial Console Server for the Poor. &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2328&amp;amp;entry_id=731&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/archives/707-Serial-Console-Server-for-the-Poor-I.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;link to the first
installment.&quot;&gt;First installment here, &lt;/a&gt;&lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2329&amp;amp;entry_id=731&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/archives/708-Serial-Console-Server-for-the-Poor-II.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;link to the second
installment.&quot;&gt;Second installment here.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The first part of the article having covered the hardware and the udev part creating the device nodes, and the second
part explaining how to solve the software part using ser2net, this part explains why ser2net was ditched in favor of &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2330&amp;amp;entry_id=731&quot;  onmouseover=&quot;window.status=&#039;http://packages.debian.org/sid/cereal&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to cereal&#039;s debian Package Page&quot;&gt;cereal&lt;/a&gt; and how
the console server operates with cereal now.
&lt;/p&gt;
 &lt;p&gt;
Cereal (which I was pointed to on IRC as a reaction to article II) is a nifty combination of runit&amp;#8217;s runsv and
screen. One of the less-known features of screen is that screen can also connect to a serial port instead of a
&amp;#8220;real&amp;#8221; console. cereal makes use of this feature, putting up with the fact that screen can only set a baud
rate. I have not seen a serial application with other parameters than 8n1 (8 data bits, no parity, 1 stop bit) in a
decade, so I cannot comment whether this is a real disadvantage. I guess that it might be possible to set the serial
port to the desired set of parameters before starting up screen, but I didn&amp;#8217;t actually try it since I do not need
it.
&lt;/p&gt;
&lt;p&gt;
Cereal uses a set of configuration parameters and processes called a &amp;#8220;session&amp;#8221; to associate a serial port
with a baud rate and a set of user/group settings to control who is able to start, stop, attach or detach a session. It
doesn&amp;#8217;t have a &amp;#8220;real&amp;#8221; configuration file. Instead, it has an admin program, cereal_admin, which takes
the parameters associated with a session and writes them to an (intentionally? undocumented?) set of config files in
/var/lib/cereal. Only a single user is able to attach to a session read/write, while an entire group can attach to a
session read-only and can thus access the logs. A session is automatically started when the sysem boots and can be
stopped and started using cereal_admin as well. Once a session is running, a specially configured screen process runs
attached to the serial port, and users simply attach and detach to and from it as one would to a normally running
screen. That way, one can scroll back and examine what was shown on the serial port while nobody was attached. This is
quite handy when the device connected to the port prints out warnings, errors and status information to its serial
port.
&lt;/p&gt;
&lt;p&gt;
The screen configuration that is used is rather sophisticated. So, a permanent log file is written, which is also used
for read-only access to the serial session. Also, a very informative status line is configured.
&lt;/p&gt;
&lt;p&gt;
Unfortunately, one of screen&amp;#8217;s biggest disadvantages applies here as well: User X cannot attach to a session
started by User Y unless Y has access privileges for X&amp;#8217;s pty (or vice versa, I never can remember), which can be a
security risk. Additionally, it is not possible to su or sudo to X and then to attach to the session - one needs to have
the original pty opened by the correct user, which usually means that one needs to do a &amp;#8220;real&amp;#8221; log in with
the correct account (via /bin/login or sshing in to the box).
&lt;/p&gt;
&lt;p&gt;
If one has the privileges necessary, one can use the cereal executeable to attach to the screen (which gives read-write
access) or to tail -F the log file (giving timestamped read-only access). That way, one never knows that one is actually
working with an appropriately configured screen that is kept running by runit.
&lt;/p&gt;
&lt;p&gt;
The restrictions coming with cereal suggest a setup similiar to what I did with ser2net previously: Each session has its
own user account, which forces an attach to the appropriately named cereal shell on login:
&lt;blockquote&gt;&lt;pre&gt;
my-device-name:x:1801:1801:my-device-name,,,:/home/my-device-name:/usr/local/sbin/cerealshell
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;pre&gt;
$ cat /usr/local/sbin/cerealshell
#!/bin/bash

set -eu

cereal attach $(id --user --name)
$
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
You can see that I decided to name the sessions after the actual device name, allowing the unterlying ttyUSB device name
to change without change in the user interface. The actual users and sessions were created with a small shell script:
&lt;blockquote&gt;&lt;pre&gt;
#!/bin/bash

createconsole() {
  NAME=&amp;#8220;$1&amp;#8221;
  PORT=&amp;#8220;$2&amp;#8221;
  BAUD=&amp;#8220;$3&amp;#8221;
  MUID=&amp;#8220;${PORT/USBserial/180}&amp;#8221;
  echo sudo addgroup --force-badname --gid $MUID $NAME
  echo sudo adduser --force-badname --gecos &amp;#8220;$NAME,,,&amp;#8221; --ingroup $NAME --uid $MUID --disabled-password
$NAME
  echo sudo adduser $NAME dialout
  echo sudo mkdir -p /home/$NAME/.ssh
  echo sudo chmod 755 /home/$NAME/.ssh
  echo sudo touch /home/$NAME/.ssh/authorized_keys
  echo sudo chmod 644 /home/$NAME/.ssh/authorized_keys
  echo sudo chown $NAME:$NAME /home/$NAME/.ssh /home/$NAME/.ssh/authorized_keys
  echo sudo cereal-admin create $1 /dev/$2 $3 $1 $1
  echo sleep 2
    echo sudo cereal-admin start $1
  echo echo -----
}

createconsole my-device-1 USBserial1 9600
createconsole my-device-2 USBserial3 115200
&lt;/pre&gt;&lt;/blockquote&gt;
Note that the script also uses a hardcoded UID range which might need adaption to your local needs (and breaks for more
than ten serial ports), and that it also takes care of creating an empty authorized_keys file with correct permissions.
&lt;/p&gt;
&lt;p&gt;
That way one can simply ssh to my-devlce-1@consoleserver and find oneself immediately connected to the serial console,
seeing the last things that happened on the serial port, and immediately being able to work with the device.
That&amp;#8217;s fine, comfortable and useable. I actually like that better than what I built with ser2net previously.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Mon, 30 Jun 2008 15:00:26 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/731-guid.html</guid>
    <category>cereal</category>
<category>console</category>
<category>debian-english</category>
<category>english</category>
<category>serial</category>

</item>
<item>
    <title>kbd seems to be the way to go</title>
    <link>http://blog.zugschlus.de/archives/723-kbd-seems-to-be-the-way-to-go.html</link>
            <category>Debian</category>
    
    <comments>http://blog.zugschlus.de/archives/723-kbd-seems-to-be-the-way-to-go.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=723</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=723</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
This is just a small reminder (for me and others) that Debian is currently migrating from console-tools to kbd (back
again, yes, those who have been around for a few years remember).
&lt;/p&gt;
&lt;p&gt;
This information is obviously a closely-guarded secret. Console-tools is still Priority: important, and kbd is still
Priority: extra. However, kbd seems to be much better maintained (current uploads happening, while console-log has seen
its last maintainer upload two years ago), and unfortunately, neither package description suggests which package is the
way to go. And Debian-installer still installs console-tools by default.
&lt;/p&gt;
&lt;p&gt;
However, a few bugs were filed a year ago by the console-tools maintainer to drop console-tools from depends as
console-tools is going away. So I guess that he knows what he&amp;#8217;s doing...
&lt;/p&gt;
&lt;p&gt;
Before I get around to adding console-tools back to console-log&amp;#8217;s depends (as I almost did accidentally),
I&amp;#8217;ll better blog this to remind people of console-log going away. Maybe we&amp;#8217;ll get the Priorities changed
just in time for lenny.
&lt;/p&gt;
  
    </content:encoded>

    <pubDate>Sat, 21 Jun 2008 15:48:35 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/723-guid.html</guid>
    <category>console-log</category>
<category>debian</category>
<category>debian-english</category>
<category>english</category>
<category>kbd</category>

</item>
<item>
    <title>Serial Console Server for the Poor II</title>
    <link>http://blog.zugschlus.de/archives/708-Serial-Console-Server-for-the-Poor-II.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/708-Serial-Console-Server-for-the-Poor-II.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=708</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=708</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
This is the second installment of my article about the Serial Console Server for the Poor. &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2322&amp;amp;entry_id=708&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/archives/707-Serial-Console-Server-for-the-Poor-I.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;link to the first
installment.&quot;&gt;First installment here.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The last part of the article having covered the hardware and the udev part creating the device nodes, this part
addresses the part of the software that connects the user to the device node.
&lt;/p&gt;
 &lt;p&gt;
The idea of the software side is to allow users access only to certain serial ports without giving out a shell account
on the server itself. Communication between user and the console server should be encrypted (which certainly means ssh),
and users should be able to authenticate both with a key and with a password. Serial parameters (baud rate, parity, stop
bits etc) should be configured on the console server to keep this possible error source away from the users.
&lt;/p&gt;
&lt;p&gt;
For years, I have been thinking about using UUCP&amp;#8217;s cu to access the serial port. This time, it&amp;#8217;s not going
to be used because it offers a shell escape which cannot be turned off. That would give a user shell to the users
indirectly, which is not what I want.
&lt;/p&gt;
&lt;p&gt;
Minicom seems still to be the most-used application to access a serial port. I have never understood the sense of using
a terminal emulator inside a terminal emulator, especially if one has to break the terminal emulator&amp;#8217;s habit of
trying to initialize a non-existent modem.
&lt;/p&gt;
&lt;p&gt;
So I settled on the application that I usually use to access a serial port: ser2net. This is a Linux implementation of
Cisco&amp;#8217;s &amp;#8220;reverse telnet&amp;#8221; feature which &amp;#8220;connects&amp;#8221; a TCP port to a serial port with a given
set of parameters. For example,
&lt;blockquote&gt;&lt;pre&gt;
4016:telnet:600:/dev/USBserial6:38400 8DATABITS NONE 1STOPBIT banner
&lt;/pre&gt;&lt;/blockquote&gt;
connects TCP port 4016 with /dev/USBserial6 with an 38400 8n1 parameter set. If you telnet to localhost 4016,
you&amp;#8217;ll find yourself talking to the device connected to the appropriate serial port.
&lt;/p&gt;
&lt;p&gt;
This moves the security risk to the telnet client, which - unfortunately - offers a shell escape function from the
telnet command line reachable with the escape character. The only way to remove this is to use the -E command line
option, which turns off the escape function completely. This unfortunately excludes the user from cleanly quitting the
telnet session, so the only way to get out of a telnet -E is to have the remote side close the serial port (which
ain&amp;#8217;t happening on a serial console) or to kill the telnet process, for example by closing the carrying ssh
session. That&amp;#8217;s a turn-off, but one that one can live with.
&lt;/p&gt;
&lt;p&gt;
Now, the only challenge left is to have the appropriate telnet client started automatically for the user. I decided on
connecting this to the account being connected to, so that ssh USBserial4@hostname will automatically do the right
thing. Since password authentication needs to work (optionally), this precludes the use of the command modifier in an
authorized_keys file.
&lt;/p&gt;
&lt;p&gt;
Another possibility to force a command being executed on login is to set it as the users&amp;#8217; login shell in
/etc/passwd. One drawback: The command must not have any parameters, so one needs to pass needed parameters to the
program some other way. Additionally, the program must be listed in /etc/shells or it will be silently ignored.
&lt;/p&gt;
&lt;p&gt;
My /etc/passwd entries look like
&lt;blockquote&gt;&lt;pre&gt;
USBserial2:x:1002:1002:USBserial2,,,:/home/USBserial2:/usr/local/sbin/serialconnect-shell
&lt;/pre&gt;&lt;/blockquote&gt;
with /usr/local/sbin/serialconnect-shell looking like
&lt;blockquote&gt;&lt;pre&gt;
#!/bin/bash

set -eu

case &amp;#8220;$(id --user --name)&amp;#8221; in
  USBserial1) PORT=&amp;#8220;2011&amp;#8221;;; 
  USBserial2) PORT=&amp;#8220;2012&amp;#8221;;;
  USBserial3) PORT=&amp;#8220;6013&amp;#8221;;;
  USBserial4) PORT=&amp;#8220;6014&amp;#8221;;;
  USBserial5) PORT=&amp;#8220;2015&amp;#8221;;;
  USBserial6) PORT=&amp;#8220;2016&amp;#8221;;;
  USBserial7) PORT=&amp;#8220;6017&amp;#8221;;;
  *) echo &amp;#8220;called from unknown account, terminating.&amp;#8221;; exit 1;;
esac

telnet -E localhost $PORT
&lt;/pre&gt;&lt;/blockquote&gt;
Just for reference, here are the appropriate entries in /etc/ser2net.conf:
&lt;blockquote&gt;&lt;pre&gt;
2011:telnet:600:/dev/USBserial1:9600 8DATABITS NONE 1STOPBIT banner
2012:telnet:600:/dev/USBserial2:9600 8DATABITS NONE 1STOPBIT banner
6013:telnet:600:/dev/USBserial3:115200 8DATABITS NONE 1STOPBIT banner
6014:telnet:600:/dev/USBserial4:115200 8DATABITS NONE 1STOPBIT banner
2015:telnet:600:/dev/USBserial5:9600 8DATABITS NONE 1STOPBIT banner
2016:telnet:600:/dev/USBserial6:9600 8DATABITS NONE 1STOPBIT banner
6017:telnet:600:/dev/USBserial7:115200 8DATABITS NONE 1STOPBIT banner
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;
If one wants to authenticate for a given serial port with an ssh key, all you need to do is put the appropriate key into
the authorized_keys file of the appropriate account, and you&amp;#8217;re all set.
&lt;/p&gt;
&lt;p&gt;
I do sincerely hope that I didn&amp;#8217;t put any blatant security goofs into this setup, but if I did, you&amp;#8217;ll tell
me in the comments, right?
&lt;/p&gt;
&lt;p&gt;
Just one more challenge for my valued readers: The port numbers in my ser2net.conf have a system. Can you explain it to
me?
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Thu, 05 Jun 2008 22:51:19 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/708-guid.html</guid>
    <category>console</category>
<category>cu</category>
<category>debian-english</category>
<category>english</category>
<category>minicom</category>
<category>pl2303</category>
<category>ser2net</category>
<category>serial</category>
<category>telnet</category>

</item>
<item>
    <title>Serial Console Server for the Poor I</title>
    <link>http://blog.zugschlus.de/archives/707-Serial-Console-Server-for-the-Poor-I.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/707-Serial-Console-Server-for-the-Poor-I.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=707</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=707</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
The serial port is still &lt;u&gt;the&lt;/u&gt; way to access network components out of band. It is slow, but reliable, and
remarkably well standardized. It does not have technical whiz-bangs that can fail when one needs things to just work.
That makes it the natural way to access critical infrastructure and still being sure that this access vector still works
when most other things are down.
&lt;/p&gt;
&lt;p&gt;
Every communication link has two sides, so there is a market for devices with a network link and a bigger number of
serial ports to connect the actual devices to. Commercial vendors have a broad choice of serial console servers. Most of
them, especially the small products with five to ten ports, are quite expensive, so I have been investigating how do
build a serial console server with el cheapo hardware.
&lt;/p&gt;
 &lt;p&gt;
USB comes to mind here, of course.
&lt;/p&gt;
&lt;p&gt;
&lt;div class=&quot;serendipity_imageComment_right&quot; style=&quot;width: 68px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a
class=&#039;serendipity_image_link&#039; href=&#039;http://blog.zugschlus.de/uploads/serial-USB.jpg&#039;&gt;&lt;!-- s9ymdb:77 --&gt;&lt;img class=&quot;serendipity_image_right&quot; width=&quot;68&quot; height=&quot;90&quot; src=&quot;http://blog.zugschlus.de/uploads/serial-USB.serendipityThumb.jpg&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div
class=&quot;serendipity_imageComment_txt&quot;&gt;Picture of the fully equipped USB hub&lt;/div&gt;&lt;/div&gt;The hardware side is actually
quite easy: A seven-port USB hub, and seven USB-to-serial adaptors (using the widely-deployed Prolific PL2303) are
easily purchased for well below a hundred Euros, and naively connected. In my test setup, connected to the hp compaq
nc8000 that my blog readers should know only too well by now, the hub does not even need to have its power supply
connected. The notebook can power the hub and the seven adaptors just fine.
&lt;/p&gt;
&lt;p&gt;
When the &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2320&amp;amp;entry_id=707&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/archives/704-Automatic-initialization-of-a-Option-3G-Datacard.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;
title=&quot;link to the UMTS init article in this blog&quot;&gt;UMTS card&lt;/a&gt; is plugged in, the ttyUSBx device nodes appear in the
order of plugging in the devices. When the system is booted, the order is not very predictable, so one needs - again -
udev to give predictable device node names.
&lt;/p&gt;
&lt;p&gt;
udevinfo is an important tool to obtain the data set of an USB device which is available to match a device and to act
appropriately when it is connected. udevinfo sorts the devices into a tree and shows the relationship of the devices,
which device is &amp;#8220;behind&amp;#8221; which other device from the system&amp;#8217;s point of view. udevinfo&amp;#8217;s output
starts at the leaf of the device tree and shows the information for each node up the tree until its root is reached.
&lt;/p&gt;
&lt;p&gt;
One pitfall is that one can only match against the leaf and &lt;u&gt;_one_&lt;/u&gt; other node more up the tree. So you cannot do
matches like &amp;#8220;the pl2303-based device connected to port 3 on hub 2-3 will be designated USBserial3&amp;#8221;. If you
try this, your rule will silently be ignored. This is a major turn-off in udev&amp;#8217;s implementation. I didn&amp;#8217;t
try it on sid, but etch definetely shows this behavior. So one can only match like &amp;#8220;the tty on the USB subsystem
connected to port 3 on hub 2-3 will be designated USBserial3&amp;#8221;, but that&amp;#8217;s probably as good as it&amp;#8217;ll
get.
&lt;/p&gt;
&lt;p&gt;
The cause for my hub having only seven ports clearly shows itself when one looks at the udevinfo outputs of the fully
equipped USB hub: The adapters are connected to ports 1, 2, 3, 4.1, 4.2, 4.3 and 4.4. The seven-port hub is actually two
four-port hubs in a single case, with the second one connected to the first one&amp;#8217;s port 4. This reflects itself, of
course, in the udev rules necessary to address the adapters by the hub port they&amp;#8217;re plugged in:

&lt;blockquote&gt;&lt;pre&gt;
SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.1&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial1&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.2&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial2&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.3&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial3&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.4.1&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial4&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.4.2&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial5&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.4.3&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial6&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;usb&amp;#8221;, \
   KERNELS==&amp;#8220;&amp;#x2a;-*.4.4&amp;#8221;, \
   SYMLINK=&amp;#8220;USBserial7&amp;#8221;
&lt;/pre&gt;&lt;/blockquote&gt;
These rules will only work for a similary structured hub that is &lt;u&gt;directly&lt;/u&gt; connected to the notebook. If there are
more hubs in between the &amp;#8220;final&amp;#8221; hub and the host, the address matched against in the KERNELS matches are
going to have a different structure. In the test setup, the first two parts of the address needed to be wildcarded since
these addresses keep changing when the host is booted or the hub plugged out and in. So I guess that these udev rules
are probably going to fail miserably when more hubs and/or USB-to-serial adaptors are connected.
&lt;/p&gt;
&lt;p&gt;
But if one does not do too many changes, things are just fine, and it is possible to put numbers on the USB hub ports
and be sure that the USB-to-serial adaptor connected to port 4 is going to be /dev/USBserial4 in the host system. I
tried plugging in and out the adaptors in random order, unplugged and plugged the hub itself, booted the host, and the
relationship between the port and the device node was stable.
&lt;/p&gt;
&lt;p&gt;
If you have an USB 2.0 hub connected to an USB 2.0 port of the host, you might see error messages like
&amp;#8220;pl2303_open - failed submitting interrupt urb, error -28&amp;#8221; in your log, while the serial ports plagued by
this message are not going to work. This is due to an issue in the USB 2.0 code in the kernel (see the thread starting
with &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2349&amp;amp;entry_id=707&quot;  onmouseover=&quot;window.status=&#039;http://lkml.indiana.edu/hypermail/linux/kernel/0812.0/00546.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to a threading
archive of linux-kernel&quot;&gt;my message on linux-kernel)&lt;/a&gt;, Greg KH says that running USB 1.1 devices behind a USB 2.0 hub
is a very difficult thing to do. A possible remedy is using an USB 1.1 hub, which is quite hard to obtain these days.
But one can also unload the EHCI driver, disabling USB 2.0 completely, or do
&lt;blockquote&gt;
echo P &amp;gt;/sys/class/usb_host/usb_hostB/companion
&lt;/blockquote&gt;
to force port P of the EHCI controller on Bus B to run at low/full speed (so, Alan Stern says in the linux-kernel
thread). After a few tries, I found out that my test notebook needs P=1 and B=1 for the correct port. If you have found
the correct port, you&amp;#8217;ll see your devices disconnect and reconnect below the USB 1.1 root hub in lsusb and the urb
error messages should be gone.
&lt;/p&gt;
&lt;p&gt;
In the test environment, I only tested one adapter at a time, but all these tests were successful as well. I guess that
many more of these adaptors will eventually need a powered USB hub, but with seven adaptors on a single hub, the power
from the USB host is sufficient to live without extra power on the hub. And, I guess, there is some hard limit for the
number of USB adapters being used, and some soft limit when managing the ports and adapters is going to get harder. But,
I think that a site in need of more than, say, sixteen serial ports on the console server can afford a
&amp;#8220;real&amp;#8221; console server from one of the major vendors, which can be accessed via ethernet, UMTS, ISDN and
whatever you can think of.
&lt;/p&gt;
&lt;p&gt;
This concludes the hardware part of my serial console server for the poor. Tomorrow, I&amp;#8217;ll blog about the software
side needed on the host to allow the serial ports to be accessed from the network while still being reasonably secure.
The next article will involve ssh, /etc/passwd shells, /etc/shells, a small perl script, ser2net and telnet. And, shell
escape is the cue word for grey hairs sprouting on my head.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Tue, 03 Jun 2008 23:41:47 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/707-guid.html</guid>
    <category>console</category>
<category>debian-english</category>
<category>english</category>
<category>pl2303</category>
<category>serial</category>
<category>udev</category>
<category>usb</category>

</item>
<item>
    <title>Works with a more recent card as well</title>
    <link>http://blog.zugschlus.de/archives/706-Works-with-a-more-recent-card-as-well.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/706-Works-with-a-more-recent-card-as-well.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=706</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=706</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
Today, I had the opportunity to try my &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2318&amp;amp;entry_id=706&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/archives/704-Automatic-initialization-of-a-Option-3G-Datacard.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Link to the
other article in this blog&quot;&gt;UMTS initialization mechanism&lt;/a&gt; that I built this weekend with more recent hardware, a
newer Option Globetrotter 3G Express Card with Vodafone branding (reporting itself to be a &amp;#8220;Globetrotter HSDPA
Modem&amp;#8221; with Vendor ID 0xaf0 and Product ID 0x6701). To get the card connected to my test Notebook, a hp compaq
nc8000, I had a &amp;#8220;Expresscard in a PC card slot&amp;#8221; adapter and a passive &amp;#8220;Expresscard at a normal USB
port&amp;#8221; adapter. The USB adapter had cost about ten Euros, and I don&amp;#8217;t imagine the PC card adapter to be much
more expensive.
&lt;/p&gt;
 &lt;p&gt;
The later Option card is recognized as three USB-connected serial ports by the Option kernel driver
(CONFIG_USB_SERIAL_OPTION) as the older one is, and it works just fine. The only difference is that the udev rule needs
a different value for the ATTRS{modalias} setting. My umts-pin script complains about an &amp;#8220;illegal seek&amp;#8221;
after entering the PIN, but the card registers itself with the network nevertheless. Both gammu to send SMS and pppd for
IP connectivity worked out of the box.
&lt;/p&gt;
&lt;p&gt;
Especially the &amp;#8220;Expresscard-to-USB&amp;#8221; adapter setup is very sexy for setups where neither an Expresscard nor a
PC Card slot is available, and USB cables can be nice and long. So one could even mount the UMTS interface near the
window and pull a longer USB cable to the actual system. I decided on putting the UMTS interface into a notebook,
though, and mount the notebook near the window to be able to monitor the monitoring systems and send out SMS even when
the whole datacenter is without power (by virtue of the notebook having a built-in UPS).
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Tue, 03 Jun 2008 17:16:17 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/706-guid.html</guid>
    <category>debian-english</category>
<category>english</category>
<category>gsm</category>
<category>hardware</category>
<category>option-3g</category>
<category>udev</category>
<category>umts</category>
<category>vodafone</category>

</item>
<item>
    <title>Automatic initialization of a Option 3G Datacard</title>
    <link>http://blog.zugschlus.de/archives/704-Automatic-initialization-of-a-Option-3G-Datacard.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/704-Automatic-initialization-of-a-Option-3G-Datacard.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=704</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=704</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
For mobile UMTS/GSM, I have been using an Option 3G Data Card for two and a half years now. I blogged about getting the
card to work (in German, sorry) on Linux in &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2314&amp;amp;entry_id=704&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/archives/114-UMTS-unter-Linux-funktioniert.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;link to a German blog
article&quot;&gt;July 2005&lt;/a&gt;. I never found the time - until now - to automate the card initialization so that I had been
using a horrible chat script for card initialization when the PPP connection was built.
&lt;/p&gt;
&lt;p&gt;
I recently took the time to automate this, so that the PIN is transmitted to the card automatically when the card is
plugged in. This article documents what I did.
&lt;/p&gt;
&lt;p&gt;
On a side note: Unfortunately, the vendors&amp;#8217; attitude towards Linux hasn&amp;#8217;t changed since 2005. Their Hotlines
still deny that their products can be used with Linux at all, and they surely do not publish any documentation that can
be of help. Otoh, Vodafone has published a software that supposedly aids usage of their products under Linux. I
haven&amp;#8217;t tried it yet since it is not packaged yet for Debian. Additionally, Vodafone support media and sales do
not seem to know about this effort, they still deny that their products work with Linux. Windows users happily install
proprietary software products that do little more than sending a handful of AT commands to the emulated USB modem and
hand over the connection to Windows&amp;#8217; PPP Stack. A very unsatisfying situation.
&lt;/p&gt;
&lt;p&gt;
Just for the record: Dear Vodafone DE, a week ago you missed the sale of a new USB UMTS interface because you
don&amp;#8217;t even document it on Linux. This motivated me to look into the drawer that holds the old, non-HSDPA PC cards
that have been decommissioned at the customers&amp;#8217; site and use an old, used device. Your fault.
&lt;/p&gt;
 &lt;p&gt;
But now back on topic: For a data center monitoring system, I want to send out alerts as text message (for German
speakers: SMS - we have a rather strange vocabulary for mobile communications), and am reluctant to do so via IP: IP is
one of the things that can fail, so it is preferred to directly inject the text messages into the network of the
operator that provides service to the recipients of the text messages. Fortunately, most of the recipients are in the
same network.
&lt;/p&gt;
&lt;p&gt;
After evaluating current hardware solutions that could be plugged directly into the &amp;#8220;real&amp;#8221; server doing the
monitoring and running into the wall of non-support provided by the network operators and hardware vendors, I decided on
taking things a little further and to build an Ethernet-Connected text message device. An old hp compaq nc8000 (no, not
mine, mine still works fine and is in daily use) and an old, first generation Option Datacard 3G will be mounted near
the datacenter&amp;#8217;s windows and equipped with Debian and Nagios. That way, the text message device can itself monitor
the monitoring system and even send out a warning message when the data center goes out of power: It has a built-in
UPS.
&lt;/p&gt;
&lt;p&gt;
But now back on topic: For the text messages to go out reliably, it is necessary that the UMTS card is initialized
automatically when the system comes up. A great opportunity to finally address this issue for Linux, on customers&amp;#8217;
expense **grins**.
&lt;/p&gt;
&lt;p&gt;
UMTS card initialization is done in two steps: First, when the card is plugged in, the virtual OHCI host port appears.
Initialization of the virtual OHCI happens automatically. Most documentation on the web says that you now need to load
an appropriately parametrized usbserial module, and I did it this way for years, but that&amp;#8217;s not necessary any
more. CONFIG_USB_SERIAL_OPTION is a dedicated kernel module for the Option 3G data card, which gets automatically loaded
if it is available.
&lt;/p&gt;
&lt;p&gt;
If you don&amp;#8217;t have the Option module for some reason, you still need the following udev rule to automatically load
the generic USB serial module. I figured that out yesterday before I learned about the Option module in a comment made
to the original version of this article.
&lt;blockquote&gt;&lt;pre&gt;
SUBSYSTEM==&amp;#8220;usb&amp;#8221;, \
   SYSFS{idProduct}==&amp;#8220;5000&amp;#8221;, SYSFS{idVendor}==&amp;#8220;0af0&amp;#8221;, \
   ACTION==&amp;#8220;add&amp;#8221;, \
   RUN+=&amp;#8220;/sbin/modprobe usbserial vendor=0x$attr{idVendor} product=0x$attr{idProduct}&amp;#8221;

SUBSYSTEM==&amp;#8220;usb&amp;#8221;, \
   SYSFS{idProduct}==&amp;#8220;5000&amp;#8221;, SYSFS{idVendor}==&amp;#8220;0af0&amp;#8221;, \
   ACTION==&amp;#8220;remove&amp;#8221;, \
   RUN+=&amp;#8220;/sbin/modprobe -r usbserial&amp;#8221;
&lt;/pre&gt;&lt;/blockquote&gt;
Unfortunately, the usbserial and option modules stay around after the card is pulled. This doesn&amp;#8217;t hurt though.
&lt;/p&gt;
&lt;p&gt;
Next, we see three virtual serial interfaces, which we can detect via udev, and assign &amp;#8220;speaking&amp;#8221; device
names and transmit the PIN. This goes into /etc/udev/rules.d/50-option3g.rules:
&lt;blockquote&gt;&lt;pre&gt;
SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;option&amp;#8221;, \
   ATTRS{bInterfaceNumber}==&amp;#8220;00&amp;#8221;, \
   ATTRS{modalias}==&amp;#8220;usb:v0AF0p5000d0000dc00dsc00dp00icFFiscFFipFF&amp;#8221;, \
   SYMLINK=&amp;#8220;UMTS-DATA&amp;#8221;

SUBSYSTEM==&amp;#8220;tty&amp;#8221;, SUBSYSTEMS==&amp;#8220;usb&amp;#8221;, DRIVERS==&amp;#8220;option&amp;#8221;, \
   ATTRS{bInterfaceNumber}==&amp;#8220;02&amp;#8221;, \
   ATTRS{modalias}==&amp;#8220;usb:v0AF0p5000d0000dc00dsc00dp00icFFiscFFipFF&amp;#8221;, \
   RUN+=&amp;#8220;/usr/local/sbin/umts-pin --device %k --symlink UMTS-CONTROL&amp;#8221;
&lt;/pre&gt;&lt;/blockquote&gt;
I am not sure what the modalias attribute identifies, but it looks like it identifies the hardware model: An identical
Option Datacard 3G, plugged into the other PC Card Slot gets properly initialized as well.
&lt;/p&gt;
&lt;p&gt;
These two udev stanzas do two different things: First, they make sure that the new devices are symlinked to
/dev/UMTS-DATA and /dev/UMTS-CONTROL, suggesting the intended use of the interface. The second virtual interface of the
3G Data Card does not seem to be useable at all, and you cannot build an actual data connection over the third. So, we
baptize the first interface /dev/UMTS-DATA and ignore the second. The third gets called /dev/UMTS-CONTROL.
&lt;/p&gt;
&lt;p&gt;
Now to the real magic: &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2353&amp;amp;entry_id=704&quot;  onmouseover=&quot;window.status=&#039;http://blog.zugschlus.de/uploads/umts-pin.txt&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Link to the actual
script&quot;&gt;/usr/local/sbin/umts-pin&lt;/a&gt; is a perl script that sends the PIN to the Card. %k gets expanded to the device
name of the device that has just been detected, so umts-pin gets called with &amp;#8220;--device ttyUSB2&amp;#8221;. Please note
that this udev stanza does not have a SYMLINK clause, but instead umts-pin creates the symlink after sending the PIN to
keep other processes from trying to grab the device before it was properly initialized.
&lt;/p&gt;
&lt;p&gt;
It makes use of Cosimo Streppone&amp;#8217;s Device::Modem module (Device::Gsm is not yet packaged for Debian and might be
of better use here) to talk to the UMTS device. Unfortunately, I have not yet fully understood the logging and answer
processing features of Device::Modem, so the implementation might look a little clumsy. I hope that it can be clearly
understood anyway.
&lt;/p&gt;
&lt;p&gt;
The actual PIN is read from a configuration file in an apache-like format, which is by default looked for in
/etc/umts/pin.conf:
&lt;blockquote&gt;&lt;pre&gt;
&amp;lt;pin&amp;gt;
        &amp;lt;default&amp;gt;
                pin xyzw
        &amp;lt;/default&amp;gt;
&amp;lt;/pin&amp;gt;
&lt;/pre&gt;&lt;/blockquote&gt;
The reason I settled for this rather complex configuration file format is that the ultimate goal is to automatically
detect which of my SIMs is currently inserted in the UMTS card and to automatically send the correct PIN. I
haven&amp;#8217;t been successful in doing so since I didn&amp;#8217;t find an AT command yet to get the UMTS card to divulge
the SIM serial number or the IMSI &lt;u&gt;before&lt;/u&gt; the PIN is transmitted to the SIM. So currently, the only things that
are supported are the &amp;#8220;default&amp;#8221; stanza and an identically formatted &amp;#8220;override&amp;#8221; stanza which
takes precedence over the default stanza if present.
&lt;/p&gt;
&lt;p&gt;
If the first attempt to send the PIN fails, the script tries again ten seconds later. On my test system, this happens
about once in twenty times. That must be some weird timing issue. So, if you have the wrong PIN configured, you&amp;#8217;ll
need the PUK after plugging in the card for the second time, since the first try will eat two of your three attempts.
Beware.
&lt;/p&gt;
&lt;p&gt;
If you feel uncomfortable with all this scripting and the &amp;#8220;quality&amp;#8221; of my code, you can also use
gammu&amp;#8217;s entersecuritycode function. I discovered this after my PIN script was already written, and gammu currently
forces you to expose the PIN on the command line (see &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2317&amp;amp;entry_id=704&quot;  onmouseover=&quot;window.status=&#039;http://bugs.debian.org/484102&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to
the Debian BTS&quot;&gt;#484102&lt;/a&gt;), and of course my script&amp;#8217;s PIN handling is vastly superior **grins**.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sun, 01 Jun 2008 11:17:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/704-guid.html</guid>
    <category>debian-english</category>
<category>english</category>
<category>gsm</category>
<category>hardware</category>
<category>option-3g</category>
<category>udev</category>
<category>umts</category>
<category>vodafone</category>

</item>
<item>
    <title>Universal boot stick for Debian, grml and the Debian installer</title>
    <link>http://blog.zugschlus.de/archives/648-Universal-boot-stick-for-Debian,-grml-and-the-Debian-installer.html</link>
            <category>Debian</category>
    
    <comments>http://blog.zugschlus.de/archives/648-Universal-boot-stick-for-Debian,-grml-and-the-Debian-installer.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=648</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=648</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
For various reasons, I have the kernel and the initrd that my notebook needs to boot Linux on an USB stick. I recently
added the &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url=aHR0cDovL3d3dy5kZWJpYW4ub3JnL2RldmVsL2RlYmlhbi1pbnN0YWxsZXIv&amp;amp;entry_id=648&quot;  onmouseover=&quot;window.status=&#039;http://www.debian.org/devel/debian-installer/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to the Debian Installer&quot;&gt;Debian
Installer&lt;/a&gt; and &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2287&amp;amp;entry_id=648&quot;  onmouseover=&quot;window.status=&#039;http://www.grml.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to grml&quot;&gt;grml&lt;/a&gt; to the stick to allow additional
uses of the stick.
&lt;/p&gt;
 &lt;p&gt;
Usually, USB sticks are formated with FAT32 and when they&amp;#8217;re used to boot Linux, &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2288&amp;amp;entry_id=648&quot;  onmouseover=&quot;window.status=&#039;http://packages.debian.org/syslinux&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external Link to Syslinux&quot;&gt;Syslinux&lt;/a&gt; or some derivative is used.
&lt;/p&gt;
&lt;p&gt;
I do it differently on my boot stick, most prominently because I&amp;#8217;d like to have Unixoid privileges on the stick,
and because I&amp;#8217;d like to continue using grub. So, my stick is formatted as ext3, and feels like an additional hard
disk.
&lt;/p&gt;
&lt;p&gt;
Booting from an USB stick is sometimes tricky. I have made the best experiences with formatting the USB stick as an USB
ZIP, which basically means having 64 heads, 32 sectors and a single partition in the &lt;u&gt;fourth&lt;/u&gt; primary partition
slot. This can be done using mkdiskimage and is documented on Debian in /usr/share/doc/syslinux/usbkey.doc. Partitioning
and generation of the file system is as straightforward as is installing grub using the standard, documented methods for
hard disks.
&lt;/p&gt;
&lt;p&gt;
I tried using grub 2, but have found it not sufficiently well-documented and stable to be used in this kind of critical
environment. I am therefore still using grub-legacy despite the fact that the grub maintainers have ceased fixing
grub-legacy bugs some months ago, refering to the pending release of grub 2.
&lt;/p&gt;
&lt;p&gt;
I use &lt;a href=&quot;http://blog.zugschlus.de/exit.php?url_id=2289&amp;amp;entry_id=648&quot;  onmouseover=&quot;window.status=&#039;http://packages.debian.org/unison&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link to the unison package page&quot;&gt;unison&lt;/a&gt; to keep
/boot on the stick in sync with /boot of the Linux system, which is on a crypted filesystem on the hard disk and thus
unuseable until the system has booted. The hard disk /boot thus serves only as installation target and sync source so
that the stick does not need to be plugged in during upgrades. update-grub is configured so that running it creates a
menu.lst which can be used from the stick. This concludes booting the production system from the stick.
&lt;/p&gt;
&lt;p&gt;
For the other systems, I have decided not to put them in the &amp;#8220;default&amp;#8221; boot menu from menu.lst, but instead
include foo.lst files to the root of the stick, and when I need them, shell out from the grub menu to a command line by
pressing &amp;#8220;c&amp;#8221; and then pulling in the new grub config file with the &amp;#8220;configfile /foo.lst&amp;#8221;
command.
&lt;/p&gt;
&lt;p&gt;
grml is my favorite rescue system. I use it all the time once a system starts acting up. One of its biggest advantages
is its extremely flexible bootup process. That made it predestined to be the rescue system on my USB boot stick. grml is
currently making a transition to a new build environment, which has had the side effect that the boot process has
changed in some details. grml-small, the 60 MB variant that I had been using before, has been discontinued and replaced
by grml-medium, a 170 MB variant which does definetely not fit any more on a business card CD, but 128 MB USB sticks
have become relatively seldom.
&lt;/p&gt;
&lt;p&gt;
For both grml flavours, all one needs to do is mount the .iso file loopback, copy the file&amp;#8217;s contents to a
subdirectory of the boot stick, and to drop this menu file to the stick:
&lt;pre&gt;
&lt;code&gt;
title           grml-small
root            (hd0,3)
kernel          /grml-small/boot/isolinux/linux26 toram grml_dir=/grml-small/GRML/ grml_name=GRML ramdisk_size=100000
init=/etc/init lang=us BOOT_IMAGE=grml
initrd          /grml-small/boot/isolinux/minirt26.gz

title           grml-medium
root            (hd0,3)
kernel          /grml-medium/boot/grmlmedium/linux26 live-media-path=/grml-medium/live/ toram=grml-medium.squashfs
lang=us boot=live noeject noprompt keyboard=de
initrd          /grml-medium/boot/grmlmedium/initrd.gz
&lt;/code&gt;
&lt;/pre&gt;
Since grml-medium works reasonably well, I do not expect to need grml-small very often any more.
&lt;/p&gt;
&lt;p&gt;
The Debian Installer guys have published an initrd which can browse nearly arbitrary media for an debian-installer .iso
file, mount it and install from that image. I have made use of that feature to allow Debian to be installed from my boot
stick. /d-i holds a current debian-testing-i386-netinst.iso, and vmlinux and initrd.gz from &lt;a
href=&quot;http://blog.zugschlus.de/exit.php?url_id=2290&amp;amp;entry_id=648&quot;  onmouseover=&quot;window.status=&#039;http://ftp.nl.debian.org/debian/dists/testing/main/installer-i386/current/images/hd-media/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;external link
to a Debian repository&quot;&gt;http://ftp.nl.debian.org/debian/dists/testing/main/installer-i386/current/images/hd-media/.&lt;/a&gt;
With that, this d-i.lst:
&lt;pre&gt;
&lt;code&gt;
title debian installer
root (hd0,3)
kernel /d-i/vmlinuz
initrd /d-i/initrd.gz
&lt;/code&gt;
&lt;/pre&gt;
does the trick and boots up the Installer, ready to start.
&lt;/p&gt;
&lt;p&gt;
I guess that it would be easily possible to include these grub config stanzas to the default menu.lst, including grml
and the Installer into the main grub menu, but I deliberately decided not to have these options directly in the menu for
the time being.
&lt;/p&gt;
&lt;p&gt;
It is always amazing how flexible today&amp;#8217;s systems have become when it comes to boot Linux. For both rescue and
installation, this is needed, and the respective authors have done a remarkable job.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 19 Mar 2008 23:27:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/648-guid.html</guid>
    <category>boot</category>
<category>debian</category>
<category>debian-english</category>
<category>english</category>
<category>grml</category>
<category>grub</category>
<category>installation</category>
<category>usb</category>

</item>
<item>
    <title>Mobile Internet is affordable in Germany</title>
    <link>http://blog.zugschlus.de/archives/572-Mobile-Internet-is-affordable-in-Germany.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/572-Mobile-Internet-is-affordable-in-Germany.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=572</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=572</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
Last thursday and friday, I spent around eleven hours in the InterCity Express (ICE) of Deutsche Bahn. I was online,
using Simyo GPRS, during this entire time. Thanks to the cellular network repeaters in ICE&amp;#8217;s coach 3 and 23, this
has worked reasonably well and has cost me EUR 5,27 - in a tariff with no basic charge and no commitment.
&lt;/p&gt;
 &lt;p&gt;
I really like that, because this usage of the mobile cellular network would have cost about fifty times more just a year
ago. Thanks, Simyo, E Plus and the other E Plus resellers who have made the first step to reducing the cost of mobile
Internet in Germany.
&lt;/p&gt;
&lt;p&gt;
A few technical notes:
&lt;ul&gt;
&lt;li&gt;The repeaters in the ICE coaches do only repeat GSM and thus GPRS, but not UMTS. It is advised to lock the UMTS card
to GPRS when using Internet from inside the ICE, since the card will otherwise move back and forth between UMTS and GPRS
millions of times, which will always result in more than just a few seconds outage. It is much better to live with
GPRS&amp;#8217; abysmally large latency.&lt;/li&gt;
&lt;li&gt;I took the opportunity to empty my still-active, old, GPRS only, Simyo SIM which still holds like fifteen Euros. I
suspect that I&amp;#8217;ll need two more trips of this magnitude to successfully get rid of the amount on that prepaid
card.&lt;/li&gt;
&lt;li&gt;I need an external antenna for my UMTS card - it worked really really bad in my mom&amp;#8217;s apartment right in the
middle of Hamburg.&lt;/li&gt;
&lt;li&gt;There seem to be a number of independent issues in Debian sid (the reason why I am blogging this in English): The
connection occasionally hangs (a couple of times an hour) and does not come back by itself. Often, poff/pon is enough,
but sometimes it is necessary to pull the UMTS card (an Option 3G PC-Card Datacard) and to re-insert it since there was
no answer any more on ttyUSB0. Very annoying.&lt;/li&gt;
&lt;li&gt;The Option 3G Datacard behaves differently depending on the SIM that is inserted. With my older, GPRS-only Simyo
SIM, the response to AT+CPIN? is &amp;#8220;SIM PUK2&amp;#8221; after sending the PIN to the card, while it is &amp;#8220;SIM
PIN2&amp;#8221; in the same situation with the newer UMTS-enabled Simyo SIM.&lt;/li&gt;
&lt;li&gt;chat(8) sucks badly, because it doesn&amp;#8217;t seem to elegantly handle this case - no regexps, no if/then, every
command sent needs to generate exactly one answer from the card, everything else is an error after timeout.&lt;/li&gt;
&lt;li&gt;When I do this more often, one of the now available flat rates (or, for starters, a 5 GB commitment tariff) for like
20 Euros becomes attractive.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 04 Aug 2007 22:02:28 +0200</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/572-guid.html</guid>
    <category>debian</category>
<category>debian-english</category>
<category>english</category>
<category>gprs</category>
<category>ppp</category>
<category>simyo</category>
<category>umts</category>

</item>
<item>
    <title>About Acronyms and non-Acronyms?</title>
    <link>http://blog.zugschlus.de/archives/526-About-Acronyms-and-non-Acronyms.html</link>
            <category>Computer und Netze</category>
    
    <comments>http://blog.zugschlus.de/archives/526-About-Acronyms-and-non-Acronyms.html#comments</comments>
    <wfw:comment>http://blog.zugschlus.de/wfwcomment.php?cid=526</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://blog.zugschlus.de/rss.php?version=2.0&amp;type=comments&amp;cid=526</wfw:commentRss>
    

    <author>mh+blog-zugschlus-de@zugschlus.de (Marc 'Zugschlus' Haber)</author>
    <content:encoded>
    &lt;p&gt;
I keep wondering why people keep writing HUB, WEB and SPAM, where the correct technical terms are Hub, Web and Spam.
Neither of the three expressions is an acronym.
&lt;/p&gt;
&lt;p&gt;
Well, SPAM is, but Spiced Pork and Ham is a Trademark of Hormel Industries, and they ask people not to use their
trademark to talk about Unsolicited Commercial/Bulk E-Mail on the Internet. They do, however, allow the expression Spam
to be used for UCE/UBE.
&lt;/p&gt;
&lt;p&gt;
Any idea why people keep treating Hub and Web as an acronym? It disturbes my reading tremendously.
&lt;/p&gt;
  
    </content:encoded>

    <pubDate>Fri, 23 Mar 2007 19:22:18 +0100</pubDate>
    <guid isPermaLink="false">http://blog.zugschlus.de/archives/526-guid.html</guid>
    <category>acronyms</category>
<category>debian-english</category>
<category>english</category>
<category>language</category>

</item>

</channel>
</rss>