<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>hackerlab</title>
	<atom:link href="http://www.hackerlab.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hackerlab.de</link>
	<description>we&#039;re nothing but the nerds they say we are</description>
	<lastBuildDate>Sat, 14 Apr 2012 18:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Quicktipp &#8211; view fingerprint of SSH key</title>
		<link>http://www.hackerlab.de/2012/03/07/quicktipp-view-fingerprint-of-ssh-key/</link>
		<comments>http://www.hackerlab.de/2012/03/07/quicktipp-view-fingerprint-of-ssh-key/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 19:26:57 +0000</pubDate>
		<dc:creator>jcoder</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=553</guid>
		<description><![CDATA[Due to the recent security problem at GitHub I had to review my SSH key there and I must admit that I was a little confused: I was presented a hexadecimal, colon-separated string that looked more like an IPv6 address than something from SSH. I&#8217;m using SSH for many years, but I never really had [...]]]></description>
			<content:encoded><![CDATA[<p>Due to the recent <a href="https://github.com/blog/1068-public-key-security-vulnerability-and-mitigation">security problem at GitHub</a> I had to review my SSH key there and I must admit that I was a little confused: I was presented a hexadecimal, colon-separated string that looked more like an IPv6 address than something from SSH.</p>
<p>I&#8217;m using SSH for many years, but I never really had to look up the fingerprint of a (public) SSH key, and by searching the web I just found the solution:</p>
<pre>ssh-keygen -lf filename-of-rsa.pub</pre>
<p>(First char is a lowercase L, directly followed by lowercase F)</p>
<p>That easy. <img src='http://www.hackerlab.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=553&amp;md5=c5d974cf74268f0cdd60f65b5c456048" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2012/03/07/quicktipp-view-fingerprint-of-ssh-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2012%2F03%2F07%2Fquicktipp-view-fingerprint-of-ssh-key%2F&amp;language=de_DE&amp;category=text&amp;title=Quicktipp+%26%238211%3B+view+fingerprint+of+SSH+key&amp;description=Due+to+the+recent+security+problem+at+GitHub+I+had+to+review+my+SSH+key+there+and+I+must+admit+that+I+was+a+little+confused%3A+I+was+presented+a...&amp;tags=ssh%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Online kann ja jeder&#8230;</title>
		<link>http://www.hackerlab.de/2011/09/28/online-kann-ja-jeder/</link>
		<comments>http://www.hackerlab.de/2011/09/28/online-kann-ja-jeder/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 00:15:16 +0000</pubDate>
		<dc:creator>darkhawk</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[cooles team]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[cryptsetup]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[zimbra]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=544</guid>
		<description><![CDATA[wie Ihr sicherlich mit bekommen habt, waren wir, das Hackerlab Team, mit sämtlichen Diensten Offline. NEIN! Wir haben keinen Urlaub gemacht. Aber irgendwie wollte der Server am vergangenen Freitag nicht mehr so wie wir es sonst gewohnt waren. Angefangen mit sehr hohen Delay hat es im Bereich Mail Virtualisierung. Den Host hat es kurz darauf [...]]]></description>
			<content:encoded><![CDATA[<p>wie Ihr sicherlich mit bekommen habt, waren wir, das Hackerlab Team, mit sämtlichen Diensten Offline. </p>
<p><strong>NEIN!</strong> Wir haben keinen Urlaub gemacht. Aber irgendwie wollte der Server am vergangenen Freitag nicht mehr so wie wir es sonst gewohnt waren. Angefangen mit sehr hohen Delay hat es im Bereich Mail Virtualisierung. Den Host hat es kurz darauf mit gezogen, eine Load jenseits von gut und böse. Letztendlich half nur ein Reboot per serieller Konsole.</p>
<p>Während des Reboots schien alles soweit in Ordnung. Wie nach jedem Reboot eben noch ein paar Updates installiert. Dann noch eben das Crypto mounten und dann eben das Startscript anstoßen.<br />
Soweit der Plan.<br />
Die Gegenwart hat uns aber eingeholt, das Crypto Device wollte nicht mehr&#8230;-v not available&#8230;es lies sich nicht mounten, zwar war cryptsetup der Meinung das Device eingebunden zu haben, jedoch konnte es nicht gemountet werden. &#8220;Grausame&#8221; 48h folgten, der Raid1 hat sich synchronisiert und ein Deepscan nach superblöcken für das FS Recovery standen an. Ja die Sonne hat draußen auch geschien, so hat man mir berichtet&#8230;.aber wenn man einmal dran ist, kann man sich auch nur sehr schwer wieder trennen und schon gar nicht mit dem Gedanken vertraut machen, daß der Fall eintritt den man NIE haben möchte, Datenverlust.</p>
<p>Auch am Sonntag abend war die Lage nicht wesentlich entspannter&#8230;zwischenzeitlich kamen Pläne auf eine 19&#8243; 2HE Maschine startklar zu machen und bei <a href="http://www.free.de">free.de</a> ins Rack zu schrauben.<br />
Am Sonntag abend nach dem Tatort sah es nicht besser aus oder sagen wir, es sah genauso bescheiden aus wie auch in den letzten 48h&#8230;.</p>
<p>Neuer Tag neues Glück und vor allem neue Gedanken!</p>
<p>Montag abend gegen  20:30 dann der erlösende Hinweis, man hat im hause Debian vor einiger Zeit anscheinend das crypt-mount Verfahrne/script wohl geändert, dem System war ein cryptsetup -y create crypto /dev/bla nicht mehr bekannt, aber das init Script im /etc/init.d/cryptdisks-early und der zugehörigen config im /etc/default liessich dann plötzlich das eine mit dem anderen verbinden.<br />
Schnell noch das Passphrase eintippen und *zittern*warten* da war es&#8230;es lies sich sogar mounten&#8230;</p>
<p>Geschafft. Nach kurzem Check der Sachlage, gingen schon die ersten vServer wieder in Betrieb, angefangen mit dem mx2.hackerlab.de gefolgt von diversen anderen.<br />
Der primäre MailServer hatte noch seine Probleme.<br />
Ein Problem mit dem LDAP, wie die Fehlermeldung verlauten lies&#8230;aber ohne nähere brauchbare Informationen.<br />
Nach weiteren 24h kamen dann birdcage und mir (darkhawk) die Erleuchtung. Der LDAP lief im superduper debug mode&#8230;und spuckte jeden Müll aus den wir mit ihm machten, naja fast jeden&#8230;und dann stand da dieser Fehler mit dem SSL: bla&#8230;Exception &#8230;da war uns schnell klar, es liegt vermutlich ein Fehler im Bereich Zertifikat vor&#8230;UND dann kam es mir wie ein Geistesblitz&#8230;das Zertifikat ist abgelaufen&#8230;.denn der Server läuft nun so ziemlich genau seit 2 Jahren&#8230;.ein kurzer Check verriet das GESTERn Morgen gegen 11:42 das mail.hackerlab.de Zertifikat abgelaufen ist&#8230;.</p>
<p>Nein, es war keine versteckte Kamera-Show&#8230;.und Murphy hat auch nicht mit gearbeitet. Aber mal unter uns&#8230;das hat uns auf gut deutsch den Arsch gerettet und jede Menge Arbeit ersparrt.<br />
Das Hackerlab Team hat sich in dieser Zeit (rund 84h ohne Mails) sehr tapfer geschlagen.<br />
Jetzt wo alles wieder online ist, nutzt den UrlShortener <a href="http://mod4.cc">mod4.cc</a><br />
Danke an birdcage, jsilence, sinned, wall-e.</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=544&amp;md5=fb08957d5aac6f737fdc8978ff66a019" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2011/09/28/online-kann-ja-jeder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2011%2F09%2F28%2Fonline-kann-ja-jeder%2F&amp;language=de_DE&amp;category=text&amp;title=Online+kann+ja+jeder%26%238230%3B&amp;description=wie+Ihr+sicherlich+mit+bekommen+habt%2C+waren+wir%2C+das+Hackerlab+Team%2C+mit+s%C3%A4mtlichen+Diensten+Offline.+NEIN%21+Wir+haben+keinen+Urlaub+gemacht.+Aber+irgendwie+wollte+der+Server+am+vergangenen+Freitag+nicht...&amp;tags=cooles+team%2Ccrypto%2Ccryptsetup%2Cdebian%2Cmail%2Czimbra%2Cblog" type="text/html" />
	</item>
		<item>
		<title>mod4.cc als URL Shortener in Tweetbot</title>
		<link>http://www.hackerlab.de/2011/06/16/mod4-cc-als-url-shortener-in-tweetbot/</link>
		<comments>http://www.hackerlab.de/2011/06/16/mod4-cc-als-url-shortener-in-tweetbot/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 20:26:42 +0000</pubDate>
		<dc:creator>jcoder</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=517</guid>
		<description><![CDATA[Wie zahlreiche andere Twitter-Apps bietet auch Tweetbot die Möglichkeit, neben den vorkonfigurierten URL Shortener Diensten wie goo.gl, bit.ly oder TinyURL auch die Adresse eines eigenen Dienstes anzugeben. Da liegt es doch nahe, einfach mal den URL Shortener mod4.cc einzubinden. Dazu geht man in den Einstellungsdialog, wechselt auf die Account-Einstellungen und wählt dort unter &#8220;URL Kürzung&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Wie zahlreiche andere Twitter-Apps bietet auch <a href="http://tapbots.com/software/tweetbot/">Tweetbot</a> die Möglichkeit, neben den vorkonfigurierten URL Shortener Diensten wie goo.gl, bit.ly oder TinyURL auch die Adresse eines eigenen Dienstes anzugeben. Da liegt es doch nahe, einfach mal den URL Shortener <a href="http://mod4.cc/">mod4.cc</a> einzubinden.</p>
<p>Dazu geht man in den Einstellungsdialog, wechselt auf die Account-Einstellungen und wählt dort unter &#8220;URL Kürzung&#8221; den Eintrag &#8220;Benutzerdefinierte&#8230;&#8221; ganz unten in der Liste. Als API Endpunkt gibt man folgendes an:</p>
<p><code>http://mod4.cc/api.php?url=%@</code></p>
<p>Dann noch den Eintrag mit einem Klick auf &#8220;Fertig&#8221; speichern, und schon werden die URLs über <a href="http://mod4.cc/">mod4.cc</a> gekürzt.</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=517&amp;md5=c1d94adc578e54f97fe97c6574a5c2fd" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2011/06/16/mod4-cc-als-url-shortener-in-tweetbot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2011%2F06%2F16%2Fmod4-cc-als-url-shortener-in-tweetbot%2F&amp;language=de_DE&amp;category=text&amp;title=mod4.cc+als+URL+Shortener+in+Tweetbot&amp;description=Wie+zahlreiche+andere+Twitter-Apps+bietet+auch+Tweetbot+die+M%C3%B6glichkeit%2C+neben+den+vorkonfigurierten+URL+Shortener+Diensten+wie+goo.gl%2C+bit.ly+oder+TinyURL+auch+die+Adresse+eines+eigenen+Dienstes+anzugeben.+Da+liegt+es...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Checking IMAP quota via crontab</title>
		<link>http://www.hackerlab.de/2011/05/27/checking-imap-quota-via-crontab/</link>
		<comments>http://www.hackerlab.de/2011/05/27/checking-imap-quota-via-crontab/#comments</comments>
		<pubDate>Fri, 27 May 2011 15:53:32 +0000</pubDate>
		<dc:creator>jsilence</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Quota]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=501</guid>
		<description><![CDATA[In need of monitoring the quota for a couple of IMAP accounts I found a nice Python script called imapQuotaChecker.py, which I modified to make it read the configuration and several account names and passwords from a config file and to make it check these different accounts. Config file: [codesyntax lang="python" lines="normal"] [setup] # Quota [...]]]></description>
			<content:encoded><![CDATA[<p>In need of monitoring the quota for a couple of IMAP accounts I found a nice Python script called <a title="IMAP Quota Checker" href="http://broobles.com/scripts/imapquotachecker/">imapQuotaChecker.py</a>, which I modified to make it read the configuration and several account names and passwords from a config file and to make it check these different accounts.</p>
<p>Config file:<br />
[codesyntax lang="python" lines="normal"]<br />
[setup]<br />
# Quota percentage above which a notification will be sent<br />
breach_level=90</p>
<p># Parameters of the account to check the quota for<br />
imap_host=imap.host.tld</p>
<p># Login with IMAPS<br />
use_ssl=yes</p>
<p># output on console?<br />
verbose=yes</p>
<p># Email address to send notifications to<br />
send_address=user@domain.tld</p>
<p># SMTP Parameters<br />
smtp_host=smtp.host.tld<br />
smtp_authentication = 0  # set to 1 if your SMTP server requires authentication, 0 if not<br />
# Following used only when authentication is set to 1<br />
smtp_user=username<br />
smtp_pass=password</p>
<p>[accounts]<br />
user1@domain.tld: imap1_password<br />
user2@domain.tld: imap2_password</p>
<p>[/codesyntax]</p>
<p>Script:<br />
[codesyntax lang="python" ]<br />
#!/usr/bin/python</p>
<p>&#8220;&#8221;"<br />
imapQuotaChecker.py 1.1<br />
Last updated: May 27, 2011<br />
Copyright (c) 2006 http://www.broobles.com/<br />
Website: http://www.broobles.com/scripts/imapquotachecker/</p>
<p>Description:<br />
===========<br />
Checks the quota of an IMAP account and sends an email notification if the<br />
specified quota warning level has been breached.</p>
<p>Usage:<br />
=====<br />
- Modify the IMAP and SMTP parameters in /etc/imapQuotaChecker.conf<br />
- Upload the script and the config file into a non-public location on your webserver<br />
- Create a cron job to invoke the script as often as you wish</p>
<p>History:<br />
=======<br />
1.1. (May 27, 2011, jsilence AT hackerlab DOT de):<br />
- Read configuration and accounts from config file<br />
- Can now check multiple IMAP accounts<br />
- Verbose mode prints quota usage on console<br />
1.0  (June 8, 2006):<br />
- Initial Release</p>
<p>Licence:<br />
=======<br />
This script is free software; you can redistribute it and/or modify it under the terms of<br />
the GNU Lesser General Public License as published by the Free Software Foundation;<br />
either version 2.1 of the License, or (at your option) any later version.<br />
Please visit http://www.gnu.org/copyleft/lesser.html for more information.</p>
<p>&#8220;&#8221;"</p>
<p>import imaplib, smtplib, re, ConfigParser<br />
from email.Utils import formatdate</p>
<p>def main():<br />
    config = ConfigParser.RawConfigParser()<br />
    config.read(&#8216;/etc/imapQuotaChecker.conf&#8217;)</p>
<p>    breach_level=config.get(&#8216;setup&#8217;,'breach_level&#8217;)<br />
    imap_host=config.get(&#8216;setup&#8217;,'imap_host&#8217;)<br />
    use_ssl=config.getboolean(&#8216;setup&#8217;, &#8216;use_ssl&#8217;)</p>
<p>    verbose=config.getboolean(&#8216;setup&#8217;,'verbose&#8217;)</p>
<p>    send_address=config.get(&#8216;setup&#8217;,'send_address&#8217;)</p>
<p>    smtp_host=config.get(&#8216;setup&#8217;,'smtp_host&#8217;)<br />
    smtp_authentication=config.get(&#8216;setup&#8217;,'smtp_authentication&#8217;)<br />
    smtp_user=config.get(&#8216;setup&#8217;,'smtp_user&#8217;)<br />
    smtp_pass=config.get(&#8216;setup&#8217;,'smtp_pass&#8217;)</p>
<p>    userlist=config.options(&#8216;accounts&#8217;)</p>
<p>    for imap_user in userlist:<br />
        # Error &#8220;command LOGIN illegal in state LOGOUT&#8221; if I create the imap<br />
        # object outside the for loop. Strange, but this works.<br />
        if use_ssl:<br />
            imap = imaplib.IMAP4_SSL(imap_host)<br />
        else:<br />
            imap = imaplib.IMAP4(imap_host)</p>
<p>        imap_pswd=config.get(&#8216;accounts&#8217;, imap_user)<br />
        imap.login(imap_user, imap_pswd)<br />
        quotaStr = imap.getquotaroot(&#8220;INBOX&#8221;) [1][1][0]<br />
        p = re.compile(&#8216;\d+&#8217;)<br />
        r = p.findall(quotaStr)<br />
        fQuota = (float(r[0])/float(r[1])) * 100<br />
        if verbose:<br />
            print(&#8220;%s %4.2f%%&#8221; % (imap_user, fQuota))<br />
        if fQuota > breach_level:<br />
            emailNotification(fQuota)<br />
        imap.logout()</p>
<p>def emailNotification(quota):<br />
    &#8220;&#8221;" Email the notification &#8220;&#8221;"<br />
    # Form the message<br />
    headers =  &#8220;From: %s\r\n&#8221; % send_address<br />
    headers += &#8220;To: %s\r\n&#8221; % send_address<br />
    headers += &#8220;Date: %s\r\n&#8221; % formatdate()<br />
    headers += &#8220;Subject: IMAP Quota Check WARNING [%4.2f%%]\r\n&#8221; % quota<br />
    body = &#8220;Account %s&#8221; + &#8221; on %s is above the warning limit, the quota is currently at %4.2f%%&#8221; % (imap_user, imap_host,quota)<br />
    fullMessage = headers + &#8220;\r\n&#8221; + body + &#8220;\r\n.\r\n&#8221;</p>
<p>    # Send it<br />
    smtpsession = smtplib.SMTP(smtp_host)<br />
    try:<br />
        if smtp_authentication:<br />
            smtpsession.login(smtp_user,smtp_pass)<br />
        smtpresult = smtpsession.sendmail(&#8220;%s&#8221; % send_address, &#8220;%s&#8221; % send_address, fullMessage)<br />
    finally:<br />
        try: smtpsession.quit()<br />
        except: pass</p>
<p>if __name__ == &#8216;__main__&#8217;: main()</p>
<p>[/codesyntax]</p>
<p>Call the script from crontab.<br />
Have fun!</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=501&amp;md5=f32703fa3e118fd11d730b8f9720df2e" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2011/05/27/checking-imap-quota-via-crontab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2011%2F05%2F27%2Fchecking-imap-quota-via-crontab%2F&amp;language=de_DE&amp;category=text&amp;title=Checking+IMAP+quota+via+crontab&amp;description=In+need+of+monitoring+the+quota+for+a+couple+of+IMAP+accounts+I+found+a+nice+Python+script+called+imapQuotaChecker.py%2C+which+I+modified+to+make+it+read+the+configuration+and...&amp;tags=IMAP%2CPython%2CQuota%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Lazy People&#8217;s Guide to &#8230; RCS</title>
		<link>http://www.hackerlab.de/2011/02/26/lazy-peoples-guide-to-rcs/</link>
		<comments>http://www.hackerlab.de/2011/02/26/lazy-peoples-guide-to-rcs/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 18:42:41 +0000</pubDate>
		<dc:creator>jcoder</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LPGto]]></category>
		<category><![CDATA[RCS]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=479</guid>
		<description><![CDATA[Was ist RCS? RCS steht für &#8220;Revision Control System&#8221; und bietet eine lokale Versionsverwaltung für Dateien. Hierbei werden mehrere Versionen einer Datei archiviert. Wofür ist RCS sinnvoll? RCS kann für die Versionierung von Konfigurationsdateien, Dokumenten oder beliebigen anderen Dateien eingesetzt werden. Zwar können auch Binärdateien verarbeitet werden, aber seine Stärken spielt RCS bei textbasierten Dateien [...]]]></description>
			<content:encoded><![CDATA[<h1><em>Was ist RCS?</em></h1>
<p>RCS steht für &#8220;Revision Control System&#8221; und bietet eine lokale Versionsverwaltung für Dateien. Hierbei werden mehrere Versionen einer Datei archiviert.</p>
<h1><em>Wofür ist RCS sinnvoll?</em></h1>
<p>RCS kann für die Versionierung von Konfigurationsdateien, Dokumenten oder beliebigen anderen Dateien eingesetzt werden. Zwar können auch Binärdateien verarbeitet werden, aber seine Stärken spielt RCS bei textbasierten Dateien aus, wo ein Vergleich (Diff) zwischen verschiedenen Versionen möglich ist.</p>
<h1><em>Terminologie</em></h1>
<ul>
<li><strong>Datei</strong> &#8211; eine beliebige Datei, bevorzugt im Textformat</li>
<li><strong>Revision</strong> &#8211; eine Version einer Datei</li>
<li><strong>Check-In</strong> &#8211; Vorgang des Archivierens einer Datei in RCS</li>
<li><strong>Check-Out</strong> &#8211; Wiederherstellen einer Datei aus RCS</li>
</ul>
<h1><em>Wie funktionierts?</em></h1>
<p>1. Anlegen des Ordners RCS an der Stelle, an der Dateien versioniert werden sollen, falls ein solcher Ordner noch nicht existiert.<br />
2. Check-In einer oder mehrerer Dateien zum Archivieren<br />
3. Check-Out einer Datei zum Bearbeiten<br />
4. Erneuter Check-In der bearbeiteten Datei</p>
<h1><em>Die wichtigsten Befehle im Überblick</em></h1>
<pre><strong>ci [filename]</strong></pre>
<p>Check-In der angegebenen Datei, entfernt die aktuelle Datei</p>
<pre><strong>ci -l [filename]</strong></pre>
<p>Check-In der angegebenen Datei, läßt weiteres Bearbeiten an der aktuellen Datei zu</p>
<pre><strong>ci -u [filename]</strong></pre>
<p>Check-In der angegebenen Datei, lockt die aktuelle Datei (Schreibschutz)</p>
<pre><strong>co [filename]</strong></pre>
<p>Check-Out der angegebenen Datei, lockt die aktuelle Datei (Schreibschutz)</p>
<pre><strong>co -l [filename]</strong></pre>
<p>Check-Out der angegebenen Datei, läßt Änderungen an der aktuellen Datei zu, lockt die letzte Revision für andere Benutzer</p>
<pre><strong>rcsdiff [filename]</strong></pre>
<p>Zeigt die Unterschiede zwischen der aktuellen Version und der zuletzt archivierten Datei an</p>
<pre><strong>rcsdiff -r[rev] [filename]</strong></pre>
<p>Zeigt die Unterschiede zwischen der aktuellen Version und der angegebenen Revision (z.B. 1.1) an</p>
<pre><strong>rcsmerge -r[rev] [filename]</strong></pre>
<p>Führt die Unterschiede zwischen der aktuellen Version und der angegebenen Revision zusammen, erzeugt gegebenenfalls einen Konflikt in der Datei, der mit</p>
<h1><em>Was sonst noch?</em></h1>
<p>Wenn ci zur Eingabe eines Kommentares auffordert, diesen angeben und mit einem Punkt in einer neuen Zeile quittieren.</p>
<p>Empfehlenswert: die Benutzung von &#8220;ci -l&#8221; und &#8220;co -l&#8221;, da das Ergebnis am ehesten dem entspricht, was man erwarten würde (Datei verschwindet nicht und ist editierbar).</p>
<p>Weitere Infos gibts in den man-pages von ci, co, rcsdiff sowie auf der RCS-Webseite <a href="http://www.cs.purdue.edu/homes/trinkle/RCS/">http://www.cs.purdue.edu/homes/trinkle/RCS/</a></p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=479&amp;md5=e51db7fe7d7fbefe97637a07f150041d" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2011/02/26/lazy-peoples-guide-to-rcs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2011%2F02%2F26%2Flazy-peoples-guide-to-rcs%2F&amp;language=de_DE&amp;category=text&amp;title=Lazy+People%26%238217%3Bs+Guide+to+%26%238230%3B+RCS&amp;description=Was+ist+RCS%3F+RCS+steht+f%C3%BCr+%26%238220%3BRevision+Control+System%26%238221%3B+und+bietet+eine+lokale+Versionsverwaltung+f%C3%BCr+Dateien.+Hierbei+werden+mehrere+Versionen+einer+Datei+archiviert.+Wof%C3%BCr+ist+RCS+sinnvoll%3F+RCS+kann+f%C3%BCr...&amp;tags=Linux%2CLPGto%2CRCS%2Cblog" type="text/html" />
	</item>
		<item>
		<title>URL Shortener mod4.cc in Tweetdeck nutzen</title>
		<link>http://www.hackerlab.de/2011/02/24/url-shortener-mod4-cc-in-tweetdeck-nutzen/</link>
		<comments>http://www.hackerlab.de/2011/02/24/url-shortener-mod4-cc-in-tweetdeck-nutzen/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 19:57:09 +0000</pubDate>
		<dc:creator>jcoder</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[mod4.cc]]></category>
		<category><![CDATA[Tweetdeck]]></category>
		<category><![CDATA[url shortener]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=474</guid>
		<description><![CDATA[Interessant für diejenigen unter Euch, die Tweetdeck verwenden: drüben in seinem Blog beschreibt darkhawk kurz und bündig, wie man den URL Shortener auf mod4.cc in Tweetdeck verwenden kann.]]></description>
			<content:encoded><![CDATA[<p>Interessant für diejenigen unter Euch, die Tweetdeck verwenden: drüben in seinem Blog beschreibt darkhawk kurz und bündig, wie man den <a href="http://blog.darkhawk.de/?p=605">URL Shortener auf mod4.cc in Tweetdeck verwenden</a> kann.</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=474&amp;md5=498382436bfa846a7a953444b6a7d285" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2011/02/24/url-shortener-mod4-cc-in-tweetdeck-nutzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2011%2F02%2F24%2Furl-shortener-mod4-cc-in-tweetdeck-nutzen%2F&amp;language=de_DE&amp;category=text&amp;title=URL+Shortener+mod4.cc+in+Tweetdeck+nutzen&amp;description=Interessant+f%C3%BCr+diejenigen+unter+Euch%2C+die+Tweetdeck+verwenden%3A+dr%C3%BCben+in+seinem+Blog+beschreibt+darkhawk+kurz+und+b%C3%BCndig%2C+wie+man+den+URL+Shortener+auf+mod4.cc+in+Tweetdeck+verwenden+kann.&amp;tags=mod4.cc%2CTweetdeck%2Curl+shortener%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Quick Tipp: Details zu offenen Ports unter Linux anzeigen</title>
		<link>http://www.hackerlab.de/2010/12/12/quick-tipp-details-zu-offenen-ports-unter-linux-anzeigen/</link>
		<comments>http://www.hackerlab.de/2010/12/12/quick-tipp-details-zu-offenen-ports-unter-linux-anzeigen/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 12:09:58 +0000</pubDate>
		<dc:creator>jcoder</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[QuickTipp]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=458</guid>
		<description><![CDATA[Nicht nur als Systemadministrator, sondern durchaus auch als Anwendungsentwickler muss man oftmals nachschauen, ob unter Linux ein TCP Server Port geöffnet wurde. Hierzu empfiehlt sich der Befehl netstat, und zwar wie folgt: netstat -nlep Dies zeigt die Portnummer (n) an, dabei nur alle Server-Sockets (l), erweiterte Infos (e) und insbesondere auch den Prozess (p), der [...]]]></description>
			<content:encoded><![CDATA[<p>Nicht nur als Systemadministrator, sondern durchaus auch als Anwendungsentwickler muss man oftmals nachschauen, ob unter Linux ein TCP Server Port geöffnet wurde. Hierzu empfiehlt sich der Befehl <em>netstat</em>, und zwar wie folgt:<br />
<code>netstat -nlep</code><br />
Dies zeigt die Portnummer <em>(n)</em> an, dabei nur alle Server-Sockets <em>(l)</em>, erweiterte Infos <em>(e)</em> und insbesondere auch den Prozess <em>(p)</em>, der den Port geöffnet hat.</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=458&amp;md5=2334eb168f5b66d3eaeaa8cf2d9bc6f0" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2010/12/12/quick-tipp-details-zu-offenen-ports-unter-linux-anzeigen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2010%2F12%2F12%2Fquick-tipp-details-zu-offenen-ports-unter-linux-anzeigen%2F&amp;language=de_DE&amp;category=text&amp;title=Quick+Tipp%3A+Details+zu+offenen+Ports+unter+Linux+anzeigen&amp;description=Nicht+nur+als+Systemadministrator%2C+sondern+durchaus+auch+als+Anwendungsentwickler+muss+man+oftmals+nachschauen%2C+ob+unter+Linux+ein+TCP+Server+Port+ge%C3%B6ffnet+wurde.+Hierzu+empfiehlt+sich+der+Befehl+netstat%2C+und+zwar...&amp;tags=Linux%2CQuickTipp%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Attach the Host DVD drive to a Virtualbox VM</title>
		<link>http://www.hackerlab.de/2010/12/01/attach-the-host-dvd-drive-to-a-virtualbox-vm/</link>
		<comments>http://www.hackerlab.de/2010/12/01/attach-the-host-dvd-drive-to-a-virtualbox-vm/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 11:08:39 +0000</pubDate>
		<dc:creator>jsilence</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Virtualbox]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=449</guid>
		<description><![CDATA[Just a quick note because it took me a while to figure it out. If you have a Virtualbox VM running headless and would like to attach the host DVD drive without having to boot into the Virtualbox GUI, use VBoxManage: VBoxManage storageattach "VM-Name" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium Host:/dev/cdrom [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note because it took me a while to figure it out. </p>
<p>If you have a Virtualbox VM running headless and would like to attach the host DVD drive without having to boot into the Virtualbox GUI, use VBoxManage:<br />
<code><br />
VBoxManage storageattach "VM-Name" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium Host:/dev/cdrom<br />
</code></p>
<p>Port 1, device 0 ist secondary master. If you configured the DVD drive of the VM to be secondary slave, you&#8217;d have to use port 0, device 1. </p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=449&amp;md5=cdc65386b72933025d7f1659a72d83fa" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2010/12/01/attach-the-host-dvd-drive-to-a-virtualbox-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2010%2F12%2F01%2Fattach-the-host-dvd-drive-to-a-virtualbox-vm%2F&amp;language=de_DE&amp;category=text&amp;title=Attach+the+Host+DVD+drive+to+a+Virtualbox+VM&amp;description=Just+a+quick+note+because+it+took+me+a+while+to+figure+it+out.+If+you+have+a+Virtualbox+VM+running+headless+and+would+like+to+attach+the+host+DVD...&amp;tags=Administration%2CCLI%2CVirtualbox%2CVirtualization%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Installing a Debian based Linux with debootstrap</title>
		<link>http://www.hackerlab.de/2010/11/18/installing-a-debian-based-linux-with-debootstrap/</link>
		<comments>http://www.hackerlab.de/2010/11/18/installing-a-debian-based-linux-with-debootstrap/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 15:37:27 +0000</pubDate>
		<dc:creator>jsilence</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=317</guid>
		<description><![CDATA[Quick summary The command line tool debootstrap allows you to install a Debian based Linux system while keeping running an already installed Linux system, which need not be from the Debian family. So you can install a new system, while the current system is running. Why would you want to do that? Maybe you installed [...]]]></description>
			<content:encoded><![CDATA[<h2>Quick summary</h2>
<p>The command line tool <code>debootstrap</code> allows you to <a href="http://d-i.alioth.debian.org/manual/en.i386/apds03.html" target="_blank">install a Debian based Linux system</a> while keeping running an already installed Linux system, which need not be from the Debian family.</p>
<p>So you can install a new system, while the current system is running.<br />
Why would you want to do that?</p>
<ul>
<li>Maybe you installed a new hard disk in your server and want to move the OS to this disk with minimum downtime.</li>
<li>Or you would like to dry run a critical update without risking to break your installed system. Therefore you clone your current system to a separate disk.</li>
<li>Or maybe just because you can.</li>
</ul>
<h2>Training with Virtualbox</h2>
<p>The reason why I went down this path was because I wanted to reconfigure the four disks in one of our servers into a different RAID configuration. But before laying my hands on our real server, I examined the whole procedure with a Debian Squeeze virtual machine on Virtualbox. The different aha! effects on the way made me write this article.</p>
<p>I generated a new disk image and attached it to the VM, partitioned it with one primary  partition (<strong><code>/dev/sdb1</code></strong>) for the root system and a logical partition (<strong><code>/dev/sdb5</code></strong>) for swap. So my virtual machine had two disks with four partitions: <strong><code>/dev/sda1</code></strong>, <strong><code>/dev/sda5</code></strong>, <strong><code>/dev/sdb1</code></strong>, <strong><code>/deb/sdb5</code></strong>. First steps are to install the disk, partition and format it and to turn on swap. Then mount the new disk to a mountpoint. <strong><code>/mnt/debinst</code></strong> for example.</p>
<p>[codesyntax lang="bash" lines="normal"]</p>
<p>hostname:~# mount<br />
/dev/sda1 on / type ext3 (rw,errors=remount-ro)<br />
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)<br />
proc on /proc type proc (rw,noexec,nosuid,nodev)<br />
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)<br />
udev on /dev type tmpfs (rw,mode=0755)<br />
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)<br />
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)<br />
hostname:~#</p>
<p>hostname:~# ls /dev/disk/by-uuid<br />
insgesamt 0<br />
lrwxrwxrwx 1 root root 10 15. Nov 2010  4051fed5-17fe-493c-af96-cc3df5cd6229 -&gt; ../../sdb1<br />
lrwxrwxrwx 1 root root 10 15. Nov 2010  409a1d6b-a668-4b96-9ae9-22975e5debb4 -&gt; ../../sda1<br />
lrwxrwxrwx 1 root root 10 15. Nov 2010  6dc8fa2f-744c-47a9-b64f-05e8c9c318c2 -&gt; ../../sda5<br />
lrwxrwxrwx 1 root root 10 15. Nov 2010  8eaf21d0-c7b4-45cf-9e59-35187eac7939 -&gt; ../../sdb5<br />
hostname:~#</p>
<p>hostname:~# mkfs.ext4 /dev/sdb1<br />
mke2fs 1.41.12 (17-May-2010)</p>
<p>[ mkfs output ]</p>
<p>hostname:~# mkswap /dev/sdb5<br />
hostname:~# sync; sync; sync<br />
hostname:~# swapon /dev/sdb5</p>
<p>hostname:~# mkdir /mnt/debinst/<br />
hostname:~# mount /dev/sdb1 /mnt/debinst<br />
hostname:~#<br />
[/codesyntax]</p>
<p>After that I installed debootstrap. On a Debian based system this can simply be done with aptitude or apt-get:</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
hostname:~#<br />
hostname:~# aptitude install debootstrap<br />
hostname:~#<br />
[/codesyntax]</p>
<p>For other Linux derivates see the article mentioned above.</p>
<h2>Using debootstrap to install a minimal system into a directory</h2>
<p><code>debootstrap</code> can download the required files directly from the net and will install a minimal Debian system into a directory. Substitute ARCH with the required architecture, choosing from <code>alpha</code>, <code>amd64</code>, <code>arm</code>, <code>armel</code>, <code>hppa</code>, <code>i386</code>, <code>ia64</code>, <code>m68k</code>, <code>mips</code>, <code>mipsel</code>, <code>powerpc</code>, <code>s390</code>, or <code>sparc</code>. You can use a mirror that is closer to your location of course.</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
hostname:~#<br />
hostname:~# debootstrap  &#8211;arch ARCH squeeze    /mnt/debinst http://ftp.de.debian.org/debian<br />
hostname:~#<br />
[/codesyntax]</p>
<p>After that I changerooted into the directory and continued configuring the new system.</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
hostname:~#<br />
hostname:~# LANG=C chroot /mnt/debinst /bin/bash<br />
hostname:~#    &lt;- Note that this probably looks<br />
hostname:~#       just like your normal root prompt<br />
[/codesyntax]</p>
<p>To make it less likely to confuse the new system with the already running system I changed the  prompt by editing my .bashrc in the chrooted system and exported PS1  with something I could easily recognize. I added the following lines  which include one of my favourite bash magic snippets with the PWD  function. This prompt always displays the last two directory levels, no matter how deep you are into the rabbit hole.</p>
<p>[codesyntax lang="bash" lines="normal"]</p>
<p>function PWD {<br />
  tmp=${PWD%/*/*};<br />
  [ ${#tmp} -gt 0 -a "$tmp" != "$PWD" ] &amp;&amp;<br />
  echo ${PWD:${#tmp}+1} || echo $PWD;<br />
}</p>
<p>export PS1=&#8221;\[\033[0;31m\]CHROOTED:\[\033[0;31m\]\$(PWD 3)\[\033[0m\]::&gt;~ &#8220;;</p>
<p>[/codesyntax]</p>
<h2>Creating device nodes</h2>
<p>Section D.3.4.1. of the cited article is a bit sparse on the topic. It recommends using <code>MAKEDEV</code> or leaving it to udev, but does not go into the details. For me there are two possibilities, a quick and dirty one and a cleaner solution which I prefer.<br />
The problem is that you can not yet boot into the new system, upon which udev would populate your <code>/dev</code> section with the required device nodes. In order to easily install grub and stuff you need these devices now, without a reboot.</p>
<p>If you take the quick and dirty approach with <code>MAKEDEV</code>, the tool will complain that udev is obviously in use and will abort. You can trick <code>MAKEDEV</code> by temporarily moving /dev/.udev aside and moving it back later:</p>
<p>[codesyntax lang="bash" lines="normal"]</p>
<p>CHROOTED:~::&gt;~ cd /dev<br />
CHROOTED:/dev::&gt;~ mv .udev .udev-begone<br />
CHROOTED:/dev::&gt;~ MAKEDEV generic<br />
[lot of stuff happening]<br />
CHROOTED:/dev::&gt;~ mv .udev-begone .udev</p>
<p>[/codesyntax]</p>
<p>This way you will end up with a lot of static device nodes, old school style, while actually using the dynamic udev mechanism which is meant to generate the device nodes upon system startup. This will probably work fine, but might be a source for confusion and problems if you plan on using this system for a while.</p>
<p>A cleaner way is to get udev to generate the device nodes without a reboot. udev relies on information from sysfs and proc, so these have to be mounted first. Restarting the udev demon will populate the device section with some device nodes. If the disk nodes don&#8217;t show up, use the udevadm tool.</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
CHROOTED:/dev::&gt;~ ls /sys/           # these two<br />
CHROOTED:/dev::&gt;~ ls /proc/          # come up empty<br />
CHROOTED:/dev::&gt;~ mount -t sysfs sysfs /sys<br />
CHROOTED:/dev::&gt;~ mount -t proc proc /proc<br />
CHROOTED:/dev::&gt;~ /etc/init.d/udev restart<br />
CHROOTED:/dev::&gt;~ ls /dev/disk<br />
ls: cannot access /dev/disk: No such file or directory<br />
CHROOTED:/dev::&gt;~<br />
CHROOTED:/dev::&gt;~ udevadm test /sys/block/sda<br />
[ lot of stuff rushes by ]<br />
CHROOTED:/dev::&gt;~ ls /dev/disk<br />
by-id by-path<br />
CHROOTED:/dev::&gt;~ ls /dev/sda*<br />
/dev/sda<br />
CHROOTED:/dev::&gt;~<br />
CHROOTED:/dev::&gt;~ udevadm trigger<br />
CHROOTED:/dev::&gt;~ ls /dev/sda*<br />
brw-rw&#8212;- 1 root disk 8, 0 Nov 17 16:15 /dev/sda<br />
brw-rw&#8212;- 1 root disk 8, 1 Nov 17 16:15 /dev/sda1<br />
brw-rw&#8212;- 1 root disk 8, 2 Nov 17 16:15 /dev/sda2<br />
brw-rw&#8212;- 1 root disk 8, 5 Nov 17 16:15 /dev/sda5<br />
CHROOTED:/dev::&gt;~<br />
[ rinse and repeat for sdb ]<br />
[/codesyntax]</p>
<p>If all this fails you can also simply copy the <code>/dev/disk</code> directory from the host to the chrooted environment. </p>
<p>[codesyntax lang="bash" lines="normal"]<br />
hostname:~#<br />
hostname:~# cd /dev; cp -a disk /mnt/debinst/dev<br />
hostname:~#<br />
[/codesyntax]</p>
<h3>Follow the original article</h3>
<p>Editing the fstab as well as reconfiguring tzdata, locales and console-data and all the other steps described in the original article worked just fine.<br />
Copy <code>/etc/network/interfaces</code> and any other required configuration file to the new system. Or take a peek and follow the &#8220;migrating data&#8221; section of this article.</p>
<h2>Install a kernel</h2>
<p>As described in the original article. </p>
<p>If you are already running a Debian based system you can easily recreate all the packages you have installed in the new system. This will of course include a kernel and grub.</p>
<p>Debian allows to save the installed package list and the package configurations to  a file and to install and configure the packages from this list, allowing you to clone whatever software packages you have installed.<br />
The tools are <code>aptitude-create-state-bundle</code> and<br />
<code>aptitude-run-state-bundle</code>. </p>
<p>Create the package and configuration state on the running host:</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
hostname:~#<br />
hostname:~# aptitude-create-state-bundle /mnt/debinst/var/backups/aptitude_state<br />
hostname:~#<br />
[/codesyntax]</p>
<p>By using this file the packages can be reproduced in the chrooted system.<br />
The packages <code>file</code> and <code>bzip2</code> need to be pre-installed for the restore.</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
CHROOTED:~::&gt;~<br />
CHROOTED:~::&gt;~ aptitude install file bzip2<br />
[ aptitude does its job ]<br />
CHROOTED:~::&gt;~ aptitude-run-state-bundle /var/backups/aptitude_state<br />
CHROOTED:~::&gt;~ aptitude update<br />
CHROOTED:~::&gt;~ aptitude install<br />
[ stuff rushes by and configuration panels pop up. for example the grub config ]<br />
CHROOTED:~::&gt;~<br />
[/codesyntax]</p>
<p>Note that it is not easily possible to sort of upgrade your operating system on the fly like this. Taking the package state and replaying it on the fresh system will only work when your are on the same major release. If you host is on Lenny and your fresh system on Squeeze, then aptitude-run-state will choke a lot an will eventually abort, leaving you with a mess. </p>
<p>If you wish to transfer your packages with this method, it is recommended to install the same major release with debootstrap, transfer the package state and perform a dist-upgrade after that.</p>
<p>BTW, a nice overview over the apt and dpkg system state files can be found <a title="apt and dpkg system state files" href="http://algebraicthunk.net/~dburrows/blog/entry/images/apt-files-diagram-2-simple.png">here</a>.</p>
<p>If your curently running system is not Debian based, you&#8217;ll have to find a way to recreate your packages. YMMV.</p>
<h2>Installing grub</h2>
<p>The last step also installed the grub package and came up with a configuration panel. It was not be able to completely determine the disk devices and asked where grub should be installed. I installed grub onto /dev/sdb.</p>
<p>It is a good idea to check <code>/boot/grub/grub.cfg</code> and take a close look at the disk IDs that are used, since you might be swapping the hard drives or changing the RAID configuration, resulting in a change of the sda and sbd naming schema. UUIDs will stay the same, no matter whether the disk is primary master oder secondary slave. Using UUIDs reduces confusion.</p>
<p>If you find any occurrance of <code>/dev/sda</code> or <code>/dev/sdb</code>, you might want to change that into the respective UUIDs. Note that grub.cfg is being generated by <code>update-grub</code>, so your changes will be lost. But that is okay, since everything should be fine with the disk device symlinks by udev once you boot into the new system.</p>
<p>If you want to keep the current disk, but would like to boot from the fresh system, you can run <code>update-grub</code> on the host. It will recognize the new system on the fresh disk and will generate a grub entry for this system as well. Again, check whether UUIDs are being used in <code>/boot/grub/grub.cfg</code> and correct if neccessary.</p>
<h2>Migrating data</h2>
<p>This step obviously depends a lot on what software you have installed and how this data needs to be transferred. Using <code>rsync -avR</code> might be a good idea. Good candidates for directories that should be copied are <code>/home, /var/www, /var/mail, /var/spool, /srv, /etc, /usr/local/bin</code>, but as said, this really depends on what you have installed on your machine. Be aware that trailing slashes are significant with rsync and that <code>rsync -avR /sourcedir /targetdir</code> is different from <code>rsync -avR /sourcedir/ /targetdir</code>. Also when telling rsync to do deletes on the target it is recommended to <code>--dry-run</code> and check whether it is doing the right thing.</p>
<p>I have the habit of versioning my config files with rcs. The <a title="Revision Control System Homepage" href="http://www.cs.purdue.edu/homes/trinkle/RCS/">Revision Control System</a> is pretty simple and only works locally on single files. No remote distributed mumbo jumbo. Simply <code>mkdir</code> a RCS directory and <code>ci -l file.conf</code> to make a revision. I am using <a title="backup rcs and check rcs scripts " href="https://wiki.ctdo.de/browser/scripts/rcs">two scripts</a> to manage my versioned files and to make backups of those.</p>
<p>If you copy the backup over to the chrooted directory <code>/mnt/debinst/var/backups/rcs</code> and unpack into your chrooted system, you can easily recall your configurations and settings.</p>
<p>If you do not migrate the user accounts and leave <code>/etc/passwd</code> the way <code>debootstrap</code> set it up, then you should set the root password of your chrooted system, otherwise you will not be able to log into the new system.</p>
<h2>Reboot</h2>
<p>Before the first reboot into the new system it might be a good idea to deactivate certain services. For example if you are using fetchmail, I would deactivate that via <code>/etc/defaults/fetchmail</code>. </p>
<p>Just in case.<br />
&#8220;In case of what?&#8221;, you ask?<br />
JUST IN CASE! </p>
<p>Chances are you forgot something or some stupid error makes you want to repeat the whole procedure from scratch. If your system processed some real life data after the first experimental boot, you might have a tough time repairing this.<br />
The reason why you chose debootstrap over the default debian installer was the required uptime of a real life system, right?<br />
Be careful. Think twice. Don&#8217;t hurry.</p>
<p>Now it is time to reboot into your fresh and shiny new system. If you kept the old disk, you should select the additional grub entry the <code>update-grub</code> script entered into your grub.cfg. Carefully watch the boot process for failures. These are pointers to chunks of data and configurations which have not been migrated correctly.</p>
<p>I deliberately swapped the two disk images from primary slave to primary master and vice versa simply to make sure the grub installation on the new system really works (compare with above):</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
CHROOTED:~::&gt;~ ls -l /dev/disk/by-uuid/<br />
insgesamt 0<br />
lrwxrwxrwx 1 root root 10 18. Nov 2010  409a1d6b-a668-4b96-9ae9-22975e5debb4 -> ../../sdb1<br />
lrwxrwxrwx 1 root root 10 18. Nov 2010  6dc8fa2f-744c-47a9-b64f-05e8c9c318c2 -> ../../sdb5<br />
lrwxrwxrwx 1 root root 10 18. Nov 2010  8eaf21d0-c7b4-45cf-9e59-35187eac7939 -> ../../sda5<br />
lrwxrwxrwx 1 root root 10 18. Nov 2010  a246d75a-d8e4-41c7-984c-0e4d3bead43f -> ../../sda1<br />
CHROOTED:~::&gt;~<br />
[/codesyntax]</p>
<h2>Cleanup</h2>
<p>After the new system is running, it is a good idea to invoke <code>aptitude update</code> and <code>aptitude safe-upgrade</code> to make the APCI work.</p>
<p>If neccessary, mount the old disk read only and copy the files and data you were missing.</p>
<p>Copy the root directory, change the hostname and your prompt, cleanup.</p>
<p>[codesyntax lang="bash" lines="normal"]<br />
CHROOTED:~::&gt;~ mkdir /mnt/oldsystem<br />
CHROOTED:~::&gt;~ mount -o ro /dev/sdb1 /mnt/oldsystem<br />
CHROOTED:~::&gt;~<br />
[/codesyntax]</p>
<p>Comments, corrections and additions are welcome.</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=317&amp;md5=bda1714500691ad5c8d2a5ec1e1fbb4e" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2010/11/18/installing-a-debian-based-linux-with-debootstrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2010%2F11%2F18%2Finstalling-a-debian-based-linux-with-debootstrap%2F&amp;language=de_DE&amp;category=text&amp;title=Installing+a+Debian+based+Linux+with+debootstrap&amp;description=Quick+summary+The+command+line+tool+debootstrap+allows+you+to+install+a+Debian+based+Linux+system+while+keeping+running+an+already+installed+Linux+system%2C+which+need+not+be+from+the...&amp;tags=Administration%2Cdebian%2CLinux%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Aktualisierter URL Shortener auf mod4.cc</title>
		<link>http://www.hackerlab.de/2010/11/15/aktualisierter-url-shortener-auf-mod4-cc/</link>
		<comments>http://www.hackerlab.de/2010/11/15/aktualisierter-url-shortener-auf-mod4-cc/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 19:08:46 +0000</pubDate>
		<dc:creator>jcoder</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[mod4.cc]]></category>
		<category><![CDATA[url shortener]]></category>

		<guid isPermaLink="false">http://www.hackerlab.de/?p=332</guid>
		<description><![CDATA[Vielleicht hat es der eine oder die andere schon gesehen: unser URL Shortener http://mod4.cc/ hat einen neuen Anstrich bekommen. Wobei &#8220;Anstrich&#8221; in aller Bescheidenheit stark untertrieben ist. Bis auf das Datenbank-Schema, das aus Gründen der Abwärtskompatibilität von urlShort stammt, ist alles durch eine in PHP realisierte Eigenentwicklung ersetzt worden. Neben der API-Kompatibilität zu urlShort gibt [...]]]></description>
			<content:encoded><![CDATA[<p>Vielleicht hat es der eine oder die andere schon gesehen: unser URL Shortener <a href="http://mod4.cc/">http://mod4.cc/</a> hat einen neuen Anstrich bekommen.</p>
<p>Wobei &#8220;Anstrich&#8221; in aller Bescheidenheit stark untertrieben ist. Bis auf das Datenbank-Schema, das aus Gründen der Abwärtskompatibilität von <a href="http://mavrev.org/urlshort/">urlShort</a> stammt, ist alles durch eine in PHP realisierte Eigenentwicklung ersetzt worden. Neben der API-Kompatibilität zu urlShort gibt es natürlich zahlreiche innere und äußere Erweiterungen.</p>
<p>So ist z.B. die Implementierung objektorientiert umgesetzt werden. Dies schafft mehr Möglichkeiten für zukünftige Anpassungen. Zudem ist über die API nun möglich, die &#8220;Lang-URL&#8221; in verschiedenen Ausgabeformaten wie JSON und XML zu bekommen, was die Integration in eigene Projekte erleichtert. Und als kleines Schmankerl kann man sich sogar einen QR-Code für die Short URL generieren lassen. Für die Vorsichtigen gibt es zudem eine Preview-Funktion, über die die &#8220;Lang-URL&#8221; zuerst angesehen werden kann, wenn man eine Short URL aufruft.</p>
<p>Eine Übersicht über alle Features findet Ihr direkt auf der URL Short Webseite <a href="http://mod4.cc/">http://mod4.cc/</a></p>
<p>Alle, die sich für den Quellcode interessieren, mögen sich noch ein bisschen gedulden, da das Ganze immer noch in einer Testphase ist, und evaluiert wird, ob und wie eine Veröffentlichung der Quelltexte machbar ist.</p>
 <p><a href="http://www.hackerlab.de/?flattrss_redirect&amp;id=332&amp;md5=5e11df7127b0bdf5e8de28f269dbdbe0" title="Flattr" target="_blank"><img src="https://www.hackerlab.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hackerlab.de/2010/11/15/aktualisierter-url-shortener-auf-mod4-cc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=j5ilence&amp;popout=1&amp;url=http%3A%2F%2Fwww.hackerlab.de%2F2010%2F11%2F15%2Faktualisierter-url-shortener-auf-mod4-cc%2F&amp;language=de_DE&amp;category=text&amp;title=Aktualisierter+URL+Shortener+auf+mod4.cc&amp;description=Vielleicht+hat+es+der+eine+oder+die+andere+schon+gesehen%3A+unser+URL+Shortener+http%3A%2F%2Fmod4.cc%2F+hat+einen+neuen+Anstrich+bekommen.+Wobei+%26%238220%3BAnstrich%26%238221%3B+in+aller+Bescheidenheit+stark+untertrieben+ist.+Bis+auf+das...&amp;tags=coding%2Cmod4.cc%2Curl+shortener%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

