<?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>Autarchy of the Private Cave &#187; Debian</title> <atom:link href="https://bogdan.org.ua/tags/debian/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>How to: convert your VPS root filesystem to btrfs (using rescue boot)</title><link>https://bogdan.org.ua/2016/02/15/how-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html</link> <comments>https://bogdan.org.ua/2016/02/15/how-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html#comments</comments> <pubDate>Mon, 15 Feb 2016 17:04:25 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[btrfs]]></category> <category><![CDATA[convert]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[filesystem]]></category> <category><![CDATA[VPS]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2349</guid> <description><![CDATA[I&#8217;m moving from (a kind of&#8230;) a dedicated server to a VPS, to decrease my frightful anticipation of hardware failures. Honestly though, that server had been freezing up and restarting spontaneously for several months now, causing sometimes really long down-times&#8230; That server is now about 6-7 years old, built with off-the-shelf components, some of which [&#8230;]]]></description> <content:encoded><![CDATA[<p>I&#8217;m moving from (a kind of&#8230;) a dedicated server to a VPS, to decrease my frightful anticipation of hardware failures.<br
/> <em>Honestly though, that server had been freezing up and restarting spontaneously for several months now, causing sometimes really long down-times&#8230;</em><br
/> That server is now about 6-7 years old, built with off-the-shelf components, some of which (the HDD <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> ) had weird noises from the very start.<br
/> Definitely time to move!</p><p>I&#8217;ve purchased a fairly cheap VPS with an easy, one-click upgrade option for after I&#8217;m done configuring it.<br
/> It comes with a wide selection of OSes to pre-install; I&#8217;ve chosen <strong>Debian Jessie</strong>, version 8.3 as of this writing.</p><p>I wanted to use <strong>btrfs</strong> from the beginning, so could have installed Debian myself, but&#8230; VPS provider does some initial configuration (like their Debian mirror and some other things), so I&#8217;ve felt that converting to btrfs <em>after the fact</em> would be easier. Now that I&#8217;ve done this &#8211; I guess it was fairly easy, although preparation did take some time.</p><p>Below, I&#8217;m providing step-by-step instructions on how to convert your root filesystem from (most likely) <strong>ext4 to btrfs</strong>.<br
/> <span
id="more-2349"></span><br
/> I&#8217;ll be using my provider&#8217;s <em>rescue boot</em> mode: this is a live Debian system which is network-booted on my own VPS, and thus has access to the SSD/HDD of my VPS. Hopefully, your provider has a similar feature.</p><p>Preparing for this conversion, I had mostly used two sources:</p><ul><li>an older <a
href="https://www.howtoforge.com/how-to-convert-an-ext3-ext4-root-file-system-to-btrfs-on-ubuntu-12.10-p2">howtoforge conversion tutorial</a>, and</li><li><a
href="https://btrfs.wiki.kernel.org/index.php/SysadminGuide">Sysadmin Guide</a></li></ul><p>Before we begin with actual conversion, here is a</p><h3>List of hints and useful practices/commands for a future btrfs user</h3><ul><li>Changing the default subvolume with <code>btrfs subvolume set-default</code> will make the top level of the filesystem inaccessible, except by use of the <code>subvol=/</code> or <code>subvolid=5</code> mount options.</li><li>If top level is no longer your default subvolume, it is useful to have an <strong>fstab</strong> entry for the top level (note the <strong>noauto</strong> option!):<br
/> <code>LABEL=toplevel   /root/btrfs-top-lvl   btrfs  subvol=/,defaults,noauto,noatime   0  0</code></li><li><a
href="http://marc.merlins.org/perso/btrfs/post_2014-03-19_Btrfs-Tips_-Btrfs-Scrub-and-Btrfs-Filesystem-Repair.html">scurbbing and repairing btrfs</a>; most of the hints below originate from Marc&#8217;s <a
href="http://events.linuxfoundation.org/sites/events/files/slides/Btrfs_1.pdf">2014 btrfs presentation</a></li><li>scrub script: <a
href="http://marc.merlins.org/linux/scripts/btrfs-scrub">http://marc.merlins.org/linux/scripts/btrfs-scrub</a></li><li><code>mount -o compress=lzo</code> is fast and best for SSDs; <code>mount -o compress=zlib</code> compresses better but is slower</li><li>you can turn off COW (copy-on-write) for specific files and directories with <code>chattr Â­-C /path</code> (new files will inherit this)</li><li>for a highly fragmented VM, <code>btrfs filesystem defragment vbox.vdi</code> could take hours; <code>cp -reflink=never vbox.vdi vbox.vdi.new; rm vbox.vdi</code> is much faster</li><li><code>cp -reflink=always</code> copies within and between subvolumes without duplicating data</li><li>run scrub nightly or weekly on all btrfs filesystems</li><li><strong>noatime</strong> is the best fstab mount option for btrfs <em>IF USING SNAPSHOTS</em>, because <strong>relatime</strong> still causes at least 1 write every 24h</li><li>if you have <strong>errors=remount-ro</strong> in your <strong>fstab</strong> for extX-filesystem, you should remove it after converting to <strong>btrfs</strong> as it does not understand the option.</li></ul><h3>We are almost ready to start! Just one last thing: partitioning!</h3><p>On my previous server, I did have a certain partition scheme, with separate <strong>/boot</strong>, <strong>/home</strong>, <strong>/var</strong>, <strong>/usr</strong>, and everything else under <strong>/</strong> partition.<br
/> It worked very well for me, never ran into problems (although this is more like a Debian&#8217;s feature, not that of my partition scheme <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> ).<br
/> However&#8230; With the current VPS, it started initially with just everything under <strong>/</strong>, in a single partition.<br
/> I could have re-partitioned everything from the rescue system while converting to <strong>btrfs</strong>, but what for? What would be the benefits?</p><p>Let&#8217;s have a look and evaluate</p><h3>Advantages/disadvantages of keeping specific partitions separate.</h3><ul><li><strong>/boot</strong> comes the first. Normally I format it with ext2, and set aside just 100-200 megabytes for this small partition.<br
/> This improves boot-reliability of the system. With <strong>btrfs</strong>, it was also the case that grub could not use <strong>/boot</strong> on a btrfs volume.<br
/> However,</p><blockquote><p> Newer GRUBs can handle a /boot partition which is btrfs, so you need not have a separate /boot partition formatted as ext3/4.</p></blockquote><p>So this time I&#8217;m going without a separate /boot.<br
/> I will not even create a separate subvolume for it: for snapshotting purposes, <strong>/boot</strong> fits perfectly under the <strong>/</strong> snapshots.</li><li>Next comes <strong>/home</strong>.<br
/> The reason to separate it is to safeguard user data when upgrading/reinstalling the OS.<br
/> This, however, can be achieved with <strong>btrfs subvolumes</strong> &#8211; no need for partitions!<br
/> I&#8217;m going with a &#8220;subvolume for home&#8221; here, then.</li><li>Next comes <strong>/var</strong>, or more precisely <strong>/var/log</strong>.<br
/> One of the reasons to keep <strong>/var/log</strong> separate is to prevent filesystem overfill if logs suddenly start growing too fast.<br
/> This, however, can be achieved with <strong>subvolume quotas</strong>. No need for a partition!</li><li>There is also <strong>/var/lib/<databasename></strong> (and also <strong>/var/lib/lxc/&#8230;</strong>), which hold fairly big data files, often with random write access patterns.<br
/> There are two reasons to make them subvolumes:</p><ol><li>for data-only snapshots</li><li>to enable <code>nocow</code>/<code>nodatacow</code> at mount time, to avoid high fragmentation with random writes</li></ol><p>However, this can be done later, when these databases/LXC get installed &#8211; in just a few commands, without rebooting.</li><li>Finally, <strong>/</strong> itself should be a separate subvolume &#8211; mostly for snapshot and reinstall/upgrade reasons.</li></ul><p>Ok, now we are <strong>really</strong> going to</p><h3>Convert the filesystem</h3><ol><li>Enable rescue system, write down access credentials. You may need to restart your VPS to boot into rescue system, but check with your VPS provider first.</li><li>Connect to and log in to the rescue system.</li><li>Install <strong>btrfs-tools</strong> in the rescue system, if not there yet. We&#8217;ll need <strong>btrfs-convert</strong>, which should be included in <strong>btrfs-tools</strong>.</li><li>I&#8217;m assuming that your SSD/HDD is device <strong>/dev/sda</strong>, and that the only (root) partition there is <strong>/dev/sda1</strong>; adjust the next steps if your setup is different. <em>Only proceed with commands if you understand what they are doing!</em></li><li>It never hurts to <code>fsck /dev/sda1</code> before doing filesystem conversion <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> You should see something like <em>/dev/sda1: clean, 27282/1564672 files, 351853/6249472 blocks</em>.</li><li><code>btrfs-convert -l toplevel /dev/sda1</code>; note that I&#8217;m adding a &#8220;toplevel&#8221; <em>LABEL</em> to the top level of btrfs, for easier mounting it later. The output should look like this:<br
/><blockquote><p> creating btrfs metadata.<br
/> creating ext2fs image file.<br
/> cleaning up system chunk.<br
/> conversion complete.</p></blockquote><p> At this point the system is already btrfs! <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></li><li>If you forgot to set btrfs label, or decide to do it later: list the filesystems with <code>btrfs filesystem show</code>, or just look for the label with <code>btrfs filesystem label /dev/sda1</code> (which will produce an empty line if there is no label), then simply <code>btrfs filesystem label /dev/sda1 toplevel</code>; it will produce no output on success.</li><li>Let&#8217;s change into the new system, and start configuring it:<br
/> <code>mount /dev/sda1 /mnt<br
/> for fs in proc sys dev dev/pts; do mount --bind /$fs /mnt/$fs; done<br
/> chroot /mnt</code></li><li><code>ls</code> now should show your root filesystem files and directories, plus the <strong>ext2_saved</strong> &#8220;directory&#8221; (which is a subvolume, actually):<br
/><blockquote><p> bin   dev  ext2_saved  initrd.img         installimage.debug  lib64       media  opt   root  sbin  sys  usr  vmlinuz<br
/> boot  etc  home        installimage.conf  lib                 lost+found  mnt    proc  run   srv   tmp  var</p></blockquote></li><li>Run <code>blkid /dev/sda1</code> to find out the UUID of the new btrfs top-level volume. You can also see it with <code>btrfs filesystem show</code>:<br
/><blockquote><p> /dev/sda1: LABEL=&#8221;toplevel&#8221; UUID=&#8221;3124c827-c3bd-4a62-843f-1d5a552f1858&#8243; UUID_SUB=&#8221;ffad5668-2ac7-4ea4-83ad-e6ccba7ccf96&#8243; TYPE=&#8221;btrfs&#8221; PARTUUID=&#8221;750b31a7-01&#8243;</p></blockquote></li><li>Edit <strong>/etc/fstab</strong> (with e.g. <code>nano /etc/fstab</code>):<ul><li>change <strong>UUID</strong> of <strong>/</strong> to the new one</li><li>change the filesystem type from ext3/ext4 to <strong>btrfs</strong></li><li>change the options to <strong>subvol=root,defaults,noatime,compress=lzo,ssd,discard</strong> (yes, <strong>subvol=root</strong> does not exist yet&#8230; also, <strong>ssd,discard</strong> are for SSDs only, and instead of adding <strong>discard</strong> here it might be better to setup an <strong>fstrim</strong> cronjob. Finally, <strong>noatime</strong> can be left out if you are not going to make snapshots.)</li><li>change the last number in the line from 1 to 0 (the fsck passes &#8211; btrfs does not want boot-time filesystem checking)</li></ul></li><li>Some guides mention editing /etc/grub.d/00_header in a specific way, running <em>grub-mkconfig | grep &#8221; ro &#8220;</em> to see if it adds the proper <em>rootflags=subvol=root</em>, then even run <em>update-grub</em> and <em>grub-install /dev/sda</em> here&#8230; But all of this seems redundant or plain unnecessary. First of all, the <em>root</em> subvolume simply does not exist yet, so <em>grub-mkconfig</em> will <strong>not</strong> produce correct <em>rootflags</em>. Secondly, we are not yet done with setting up subvolumes, and we are not going to reboot right now, so running <em>update-grub</em>/<em>grub-install</em> is a bit premature at this stage <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></li><li>Now we are going to create some subvolumes. As I want to name the <strong>root</strong> subvolume simply <em>root</em>, I should first move the root user&#8217;s home files somewhere else (otherwise <code>btrfs snapshot</code> complains &#8220;ERROR: incorrect snapshot name &#8216;/&#8217;&#8221;):<br
/> <code>mv /root /root_orig<br
/> btrfs subvolume snapshot / /root</code></li><li>The same <em>problem</em> with <strong>/home</strong>, need to move it as well: <code>mv /home /home_orig</code></li><li>I can NOT snapshot <strong>/home</strong> like I did with <strong>/</strong>, because it is just a directory, not a volume like <strong>/</strong>, so:<br
/> <code>btrfs subvolume create /home</code><br
/> Note: my <strong>/home</strong> (/home_orig) is still empty, as this is a brand-new installation with only the root user, so double-check steps below, as I haven&#8217;t really run them.<br
/> <code>rsync --progress -aHAX /home_orig/* /home<br
/> ls -la /home/<br
/> ls -la /home_orig/<br
/> rm -fr /home_orig/*<br
/> ls -la /root/home/<br
/> rm -fr /root/home/*</code> # be sure to leave the empty /root/home/ in place: it will be the mount point.</li><li><code>nano /etc/fstab</code> to add the <strong>/home</strong> mount line, using <strong>the same UUID as earlier for the / partition</strong>, but a different <strong>subvol</strong> option:<br
/> <strong>UUID=3124c827-c3bd-4a62-843f-1d5a552f1858 /home               btrfs   subvol=home,defaults 0       0</strong><br
/> Feel free to add more mount options, similar to those for root subvolume. While we are editing /etc/fstab, it also makes sense to add a <strong>non-automount /toplevel</strong> entry (<strong>UUID=3124c827-c3bd-4a62-843f-1d5a552f1858 /toplevel               btrfs   subvol=/,defaults,noauto 0       0</strong>) and create mountpoint for it: <code>mkdir /root/toplevel</code></li><li>Follow the same procedure to create the <strong>/var/log</strong> subvolume. I&#8217;m using <em>flat subvolumes</em> layout here:<br
/> <code>btrfs subvolume create /log<br
/> rsync --progress -aHAX /var/log/* /log<br
/> ls -la /log/<br
/> ls -la /var/log/<br
/> rm -fr /var/log/*<br
/> ls -la /root/var/log/<br
/> rm -fr /root/var/log/*<br
/> </code></li><li>Add <strong>/var/log</strong> entry to <strong>fstab</strong>:<br
/> <strong>UUID=&#8221;3124c827-c3bd-4a62-843f-1d5a552f1858&#8243; /var/log   btrfs   subvol=log,defaults,ssd,discard,compress=lzo,noatime   0   0</strong></li><li>/var/lib/<name> &#8211; databases, LXC, nodatacow/nocow &#8211; can be created later, not doing it here and now.</li><li><code>cp /etc/fstab /root/etc/fstab</code></li><li><code>exit</code> # chroot</li><li> <code>for fs in proc sys dev/pts dev; do umount /mnt/$fs; done<br
/> umount /mnt</code></li><li>Let&#8217;s enter the new root subvolume!<br
/> <code>mount -o subvol=root /dev/sda1 /mnt<br
/> for fs in proc sys dev dev/pts; do mount --bind /$fs /mnt/$fs; done<br
/> chroot /mnt</code></li><li>Oh, we forgot to move back root_orig into /root! That&#8217;s easy: <code>mv root_orig root</code>. If you want your root&#8217;s aliases/profile to load, then just <code>exit</code> and <code>chroot /mnt</code> again (I had to do that for the nice pre-configured prompt colours <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_biggrin.gif" alt=":D" class="wp-smiley" /> )</li><li><code>btrfs subvolume list /</code> to see our new and shiny subvolumes:<br
/><blockquote><p> ID 256 gen 8 top level 5 path ext2_saved<br
/> ID 260 gen 49 top level 5 path root<br
/> ID 261 gen 35 top level 5 path home<br
/> ID 262 gen 42 top level 5 path log</p></blockquote></li><li>Let&#8217;s make <strong>root</strong> the default subvolume! If suddenly <em>rootflags</em> get lost during grub configuration, then the system should still be able to boot. Subvol ID comes from the output of the command above (260 in my case):<br
/> <code>btrfs subvolume set-default 260 /</code> # no output<br
/> <code>btrfs subvolume get-default /</code> # to verify</p><blockquote><p>ID 260 gen 49 top level 5 path root</p></blockquote></li><li>Now let&#8217;s check grub-mkconfig output: <code>grub-mkconfig | grep " ro "</code>. Now that the subvolume exists, it does show all the desired <em>rootflags=subvol=root</em>.</li><li>Let&#8217;s make sure our system will be bootable:<br
/> <code>update-grub<br
/> grub-install /dev/sda</code></li><li>Leave the chroot:<br
/> <code>exit<br
/> for fs in proc sys dev/pts dev; do umount /mnt/$fs; done<br
/> umount /mnt</code></li><li>Now let&#8217;s mount top-level again, for cleanup. If you remember, we had all the <strong>/</strong> files there &#8211; which are now in the <strong>root</strong> subvolume:<br
/> <code>mount -o subvol=/ /dev/sda1 /mnt</code></li><li>Navigate to /mnt (<code>cd /mnt</code>, yes <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> ) and delete from here everything that is <strong>NOT</strong> a subvolume.<br
/> The command which supposedly does this is <code>find /mnt -xdev -delete</code> (<strong>-xdev</strong> is supposed to not descend into mounts of other filesystems), but I haven&#8217;t used it &#8211; was a bit tired and did not want to screw up the so-far-successful conversion, so I just did <code>rm -rf bin boot dev etc initrd.img lib lib64 lost+found media mnt opt proc run sbin srv sys tmp usr vmlinuz var root_orig</code> &#8211; basically, deleted everything except for ext2_saved, home, root, and log &#8211; which are all subvolumes.</li><li>Confirm that only subvolumes are left now:<br
/> <code>ls -la</code>:</p><blockquote><p> drwxr-xr-x 1 root root  10 Feb 13 21:30 ext2_saved<br
/> drwxr-xr-x 1 root root   0 Feb 13 22:04 home<br
/> drwxr-xr-x 1 root root 510 Feb 13 22:13 log<br
/> drwxr-xr-x 1 root root 318 Feb 13 22:18 root</p></blockquote><p><code>btrfs subvolume list /mnt</code>:</p><blockquote><p> ID 256 gen 8 top level 5 path ext2_saved<br
/> ID 260 gen 52 top level 5 path root<br
/> ID 261 gen 35 top level 5 path home<br
/> ID 262 gen 42 top level 5 path log</p></blockquote><p><code>btrfs subvolume get-default /mnt</code>:</p><blockquote><p>ID 260 gen 52 top level 5 path root</p></blockquote></li><li>We can leave now: <code>cd / &#038;&#038; umount /mnt</code></li><li>Reboot into the new system. If this fails: can boot rescue again, chroot and check what went wrong&#8230;</li><li>In my case, conversion seemed to have succeeded, BUT: a) for some reason <strong>/toplevel</strong> was mounted at boot and full of root-like files which should not have been there anymore; b) I could not delete <strong>ext2_saved</strong>, at all, neither from <strong>/</strong> nor from <strong>/toplevel</strong>. The problem was with the <strong>toplevel</strong> mount line in <strong>/etc/fstab</strong> (initially, I forgot to specify the filesystem type). After fixing this and rebooting once more, everything was perfect: <strong>/toplevel</strong> not mounted, and when mounted it only had subvolumes in it. And of course the system booted without any problems. Now I could delete the previous filesystem snapshot: <code>mount /toplevel; btrfs subvolume delete /toplevel/ext2_saved; umount /toplevel</code>. Note that there was also another, different <strong>ext2_saved</strong> in the <strong>root</strong> subvolume: it is NOT a subvolume, which was not carried over when we created the <strong>/</strong> snapshot &#8211; only the empty directory was left in place. (Yes, snapshots do not descend into subvolumes.)</li></ol><p>The last 2 commands to issue (after <code>mount /toplevel</code>) are <code>btrfs filesystem defragment -r /toplevel</code> and <code>btrfs balance start /toplevel</code>.<br
/> I&#8217;m not including them in the instructions above: they are not strictly required, and if your filesystem had some heavy use before conversion, you may want to run these 2 commands more intelligently, in phases (metadata first, then big files, then smaller, etc). Another reason is that it may produce significant system load. On my fresh system both finished very quickly.</p><p>&#8230;And we are done!</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F15%2Fhow-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html&amp;linkname=How%20to%3A%20convert%20your%20VPS%20root%20filesystem%20to%20btrfs%20%28using%20rescue%20boot%29" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F15%2Fhow-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html&amp;linkname=How%20to%3A%20convert%20your%20VPS%20root%20filesystem%20to%20btrfs%20%28using%20rescue%20boot%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F15%2Fhow-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html&amp;linkname=How%20to%3A%20convert%20your%20VPS%20root%20filesystem%20to%20btrfs%20%28using%20rescue%20boot%29" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F15%2Fhow-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html&amp;linkname=How%20to%3A%20convert%20your%20VPS%20root%20filesystem%20to%20btrfs%20%28using%20rescue%20boot%29" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F15%2Fhow-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html&amp;linkname=How%20to%3A%20convert%20your%20VPS%20root%20filesystem%20to%20btrfs%20%28using%20rescue%20boot%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F15%2Fhow-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html&#038;title=How%20to%3A%20convert%20your%20VPS%20root%20filesystem%20to%20btrfs%20%28using%20rescue%20boot%29" data-a2a-url="https://bogdan.org.ua/2016/02/15/how-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html" data-a2a-title="How to: convert your VPS root filesystem to btrfs (using rescue boot)"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2016/02/15/how-to-convert-your-vps-root-filesystem-to-btrfs-using-rescue-boot.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to fix: mod_proxy&#8217;s ProxyPass directive does not work</title><link>https://bogdan.org.ua/2016/02/10/how-to-fix-mod_proxy-proxypass-directive-does-not-work.html</link> <comments>https://bogdan.org.ua/2016/02/10/how-to-fix-mod_proxy-proxypass-directive-does-not-work.html#comments</comments> <pubDate>Wed, 10 Feb 2016 19:37:24 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[mod_proxy]]></category> <category><![CDATA[ProxyPass]]></category> <category><![CDATA[proxy_http]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2341</guid> <description><![CDATA[So&#8230; You had finally built a nice LXC container for your web-facing application, and even configured Apache (Debian package version 2.14.18-1 in my case) to serve some static/web-only components. From your client-side JavaScript UI you talk (in JSON) to the API, which is implemented as a separate node.js/Python/etc server &#8211; say, on port 8000 in [&#8230;]]]></description> <content:encoded><![CDATA[<p>So&#8230; You had finally built a nice LXC container for your web-facing application, and even configured Apache (Debian package version 2.14.18-1 in my case) to serve some static/web-only components.<br
/> From your client-side JavaScript UI you talk (in JSON) to the API, which is implemented as a separate node.js/Python/etc server &#8211; say, on port 8000 in the same LXC container.</p><p>The simplest solution to forward requests from the web-frontend to your API is by using <strong>mod_proxy</strong>.<br
/> If you want to forward any requests to /api/* to your custom back-end server on port 8000, you just add the following lines to your VirtualHost configuration:</p><blockquote><p> ProxyPass               &#8220;/api&#8221;  &#8220;http://localhost:8000&#8243;<br
/> ProxyPassReverse        &#8220;/api&#8221;  &#8220;http://localhost:8000&#8243;</p></blockquote><p>I&#8217;d suggest <em>not</em> wrapping this fragment with the classical <strong>IfModule</strong>: as your application will not really work without its API back-end, you actually <em>want</em> Apache to fail as soon as possible if <strong>mod_proxy</strong> is missing.</p><p>That was easy, right? What, it doesn&#8217;t work? Can&#8217;t be! It&#8217;s dead simple! No way you could make a mistake in 2 lines of configuration!!! :mad_rage: <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p><p>Oh wait&#8230; I remember I had this problem before&#8230;<span
id="more-2341"></span></p><p>Let&#8217;s check:</p><ol><li><strong>Step 1.</strong> Did you disable (using <code>a2dissite default</code> or <code>a2dissite 000-default</code>, depending on your Debian-based GNU/Linux) the default website? If your application and the default website are configured in a similar way, then it might be the <em>default</em> site which is serving your app&#8217;s pages. The most sure way is to just disable it.</li><li><strong>Step 2.</strong> Did you enable also the <strong>proxy_http</strong> sub-module? (Using <code>a2enmod proxy_http</code>, followed by <code>service apache2 restart</code>) <strong>mod_proxy</strong> is only the core module, actual per-protocol work is done by these sub-modules.</li></ol><p>Your requests to /api should now be passed on to your API server. If not &#8211; please write in the comments what was the problem in your case and how you solved it. HTH!</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F10%2Fhow-to-fix-mod_proxy-proxypass-directive-does-not-work.html&amp;linkname=How%20to%20fix%3A%20mod_proxy%E2%80%99s%20ProxyPass%20directive%20does%20not%20work" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F10%2Fhow-to-fix-mod_proxy-proxypass-directive-does-not-work.html&amp;linkname=How%20to%20fix%3A%20mod_proxy%E2%80%99s%20ProxyPass%20directive%20does%20not%20work" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F10%2Fhow-to-fix-mod_proxy-proxypass-directive-does-not-work.html&amp;linkname=How%20to%20fix%3A%20mod_proxy%E2%80%99s%20ProxyPass%20directive%20does%20not%20work" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F10%2Fhow-to-fix-mod_proxy-proxypass-directive-does-not-work.html&amp;linkname=How%20to%20fix%3A%20mod_proxy%E2%80%99s%20ProxyPass%20directive%20does%20not%20work" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F10%2Fhow-to-fix-mod_proxy-proxypass-directive-does-not-work.html&amp;linkname=How%20to%20fix%3A%20mod_proxy%E2%80%99s%20ProxyPass%20directive%20does%20not%20work" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2016%2F02%2F10%2Fhow-to-fix-mod_proxy-proxypass-directive-does-not-work.html&#038;title=How%20to%20fix%3A%20mod_proxy%E2%80%99s%20ProxyPass%20directive%20does%20not%20work" data-a2a-url="https://bogdan.org.ua/2016/02/10/how-to-fix-mod_proxy-proxypass-directive-does-not-work.html" data-a2a-title="How to fix: mod_proxy’s ProxyPass directive does not work"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2016/02/10/how-to-fix-mod_proxy-proxypass-directive-does-not-work.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tools to manage Debian services and start-up scripts</title><link>https://bogdan.org.ua/2015/04/08/tools-to-manage-debian-services-and-start-up-scripts.html</link> <comments>https://bogdan.org.ua/2015/04/08/tools-to-manage-debian-services-and-start-up-scripts.html#comments</comments> <pubDate>Wed, 08 Apr 2015 09:52:21 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[bum]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[rcconf]]></category> <category><![CDATA[runlevel]]></category> <category><![CDATA[sysv-rc-conf]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2269</guid> <description><![CDATA[sysv-rc-conf: text-UI, allows editing multiple runlevels, but seems to be failing recently rcconf: another good-looking text-UI alternative; can only modify current runlevel bum: GUI tool (BootUp Manager) More details about these tools and runlevels (in German).]]></description> <content:encoded><![CDATA[<ul><li>sysv-rc-conf: text-UI, allows editing multiple runlevels, but seems to be failing recently</li><li>rcconf: another good-looking text-UI alternative; can only modify current runlevel</li><li>bum: GUI tool (BootUp Manager)</li></ul><p>More details about these <a
href="http://wiki.ubuntuusers.de/Dienste">tools and runlevels</a> (in German).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F04%2F08%2Ftools-to-manage-debian-services-and-start-up-scripts.html&amp;linkname=Tools%20to%20manage%20Debian%20services%20and%20start-up%20scripts" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F04%2F08%2Ftools-to-manage-debian-services-and-start-up-scripts.html&amp;linkname=Tools%20to%20manage%20Debian%20services%20and%20start-up%20scripts" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F04%2F08%2Ftools-to-manage-debian-services-and-start-up-scripts.html&amp;linkname=Tools%20to%20manage%20Debian%20services%20and%20start-up%20scripts" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F04%2F08%2Ftools-to-manage-debian-services-and-start-up-scripts.html&amp;linkname=Tools%20to%20manage%20Debian%20services%20and%20start-up%20scripts" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F04%2F08%2Ftools-to-manage-debian-services-and-start-up-scripts.html&amp;linkname=Tools%20to%20manage%20Debian%20services%20and%20start-up%20scripts" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2015%2F04%2F08%2Ftools-to-manage-debian-services-and-start-up-scripts.html&#038;title=Tools%20to%20manage%20Debian%20services%20and%20start-up%20scripts" data-a2a-url="https://bogdan.org.ua/2015/04/08/tools-to-manage-debian-services-and-start-up-scripts.html" data-a2a-title="Tools to manage Debian services and start-up scripts"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2015/04/08/tools-to-manage-debian-services-and-start-up-scripts.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Saving and restoring the list of packages installed on a Debian system using aptitude or deborphan</title><link>https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html</link> <comments>https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html#comments</comments> <pubDate>Fri, 18 Oct 2013 00:08:13 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[aptitude]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[deborphan]]></category> <category><![CDATA[dpkg]]></category> <category><![CDATA[package]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2011</guid> <description><![CDATA[The usual, or even classical way is to create the list of installed packages with sudo dpkg --get-selections > package_list, and then restore when/if necessary with cat package_list &#124; xargs sudo apt-get -y install. As VihangD points out in his serverfault answer, the same can be achieved with aptitude, while also excluding dependent, automatically installed [&#8230;]]]></description> <content:encoded><![CDATA[<p>The usual, or even <em>classical</em> way is to create the list of installed packages with <strong><code>sudo dpkg --get-selections > package_list</code></strong>, and then restore when/if necessary with <strong><code>cat package_list | xargs sudo apt-get -y install</code></strong>.</p><p>As VihangD points out in his <a
href="http://serverfault.com/a/61472/25852">serverfault answer</a>, the same can be achieved with aptitude, while also excluding dependent, automatically installed packages (which are included by the <em>classical</em> method). To create the list of packages, run <strong><code>aptitude search -F '%p' '~i!~M' > package_list</code></strong>. Here, <strong><code>-F '%p'</code></strong> asks aptitude to only print package names (instead of the default output, which also contains package state and description); search term <strong>&#8216;~i!~M&#8217;</strong> asks for all non-automatically installed packages.</p><p>To install packages using the created list, run <strong><code>xargs aptitude --schedule-only install < package_list; aptitude install</code></strong>. The first of these two commands instructs aptitude to mark all the packages from the list as scheduled for installation. The second command actually performs the installation.</p><p>Hamish Downer <a
href="http://serverfault.com/a/1333/25852">suggests</a> an alternative way of getting the initial package_list: using the deborphan utility, <strong><code>deborphan -a --no-show-section > package_list</code></strong>. This command asks deborphan to show a list of packages, which have no dependencies on them. Sounds very similar to what we did with aptitude above, but using deborphan will most likely result in a much shorter list of packages (on my system, deborphan printed 291 package names, aptitude printed 847, and dpkg printed 3650 package names). One more potentially important difference between aptitude- and deborphan-produced package lists is that aptitude only specifies package architecture when it is different from native (e.g. 'googleearth:i386' on a 64-bit system), while deborphan specifies architectures for all the packages (resulting in e.g. 'google-talkplugin:amd64' and 'googleearth-package:all' on a 64-bit system).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F18%2Fsaving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html&amp;linkname=Saving%20and%20restoring%20the%20list%20of%20packages%20installed%20on%20a%20Debian%20system%20using%20aptitude%20or%20deborphan" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F18%2Fsaving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html&amp;linkname=Saving%20and%20restoring%20the%20list%20of%20packages%20installed%20on%20a%20Debian%20system%20using%20aptitude%20or%20deborphan" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F18%2Fsaving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html&amp;linkname=Saving%20and%20restoring%20the%20list%20of%20packages%20installed%20on%20a%20Debian%20system%20using%20aptitude%20or%20deborphan" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F18%2Fsaving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html&amp;linkname=Saving%20and%20restoring%20the%20list%20of%20packages%20installed%20on%20a%20Debian%20system%20using%20aptitude%20or%20deborphan" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F18%2Fsaving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html&amp;linkname=Saving%20and%20restoring%20the%20list%20of%20packages%20installed%20on%20a%20Debian%20system%20using%20aptitude%20or%20deborphan" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F18%2Fsaving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html&#038;title=Saving%20and%20restoring%20the%20list%20of%20packages%20installed%20on%20a%20Debian%20system%20using%20aptitude%20or%20deborphan" data-a2a-url="https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html" data-a2a-title="Saving and restoring the list of packages installed on a Debian system using aptitude or deborphan"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Debian: how to whitelist IP addresses in tumgrey-SPF</title><link>https://bogdan.org.ua/2013/08/07/debian-how-to-whitelist-ip-address-in-tumgrey-spf.html</link> <comments>https://bogdan.org.ua/2013/08/07/debian-how-to-whitelist-ip-address-in-tumgrey-spf.html#comments</comments> <pubDate>Wed, 07 Aug 2013 12:13:38 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[mxguarddog]]></category> <category><![CDATA[spam]]></category> <category><![CDATA[SPF]]></category> <category><![CDATA[tumgreyspf]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1970</guid> <description><![CDATA[SPF is nice for protecting your mail server from spam, but sometimes there is a need to bypass SPF checking. For example, if you rely on 3rd party servers to do spam protection for you Current setup: MX records point to the spam protection mail servers, which then connect to my server and deliver (hopefully [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">SPF</a> is nice for protecting your mail server from spam, but sometimes there is a need to bypass SPF checking. For example, if you rely on 3rd party servers to do spam protection for you <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p><p>Current setup:</p><ul><li>MX records point to the spam protection mail servers, which then</li><li>connect to my server and deliver (hopefully spam-free) mail.</li></ul><p>Problem: some senders (like last.fm) do have proper, strict SPF records. <a
href="http://packages.debian.org/squeeze/tumgreyspf">Tumgreyspf</a> on my server then rejects emails relayed through the spam-protection service.</p><p>If these spam protection relay servers are the only which send mail to your server, then it makes sense to fully disable/uninstall tumgreyspf. Putting tumgreyspf into the permanent &#8220;learning mode&#8221; (set <code>defaultSeedOnly = 1</code> in <code>/etc/tumgreyspf/tumgreyspf.conf</code>) may not fix the SPF problem described above, as SeedOnly seems to only affect greylisting, and not rejecting unauthorized senders.</p><p>Solution: whitelist relay server IPs.<br
/> <span
id="more-1970"></span></p><p>I will use MXGuardDog <a
href="http://mxguarddog.com">spam blocker</a> as an example. This solution is a slightly extended version of <a
href="http://noe.wikidot.com/tumgreyspf-whitelist">this one</a>, and used <a
href="https://github.com/linsomniac/tumgreyspf/blob/master/README">tumgreyspf README</a> as the reference.</p><ul><li>For each of the IPs you want to whitelist, create a directory tree under <code>/var/lib/tumgreyspf/config/client_address</code>. Here is a copy-pasteable example for MXGuardDog, based on their <a
href="http://www.mxguarddog.com/faq.ip_list/">list of server IPs</a>, valid as of August 2013:<br
/> <code><br
/> mkdir -p /var/lib/tumgreyspf/config/client_address/108/166/117<br
/> mkdir -p /var/lib/tumgreyspf/config/client_address/174/129/28<br
/> mkdir -p /var/lib/tumgreyspf/config/client_address/216/58/39<br
/> mkdir -p /var/lib/tumgreyspf/config/client_address/222/229/219<br
/> mkdir -p /var/lib/tumgreyspf/config/client_address/64/15/147<br
/> mkdir -p /var/lib/tumgreyspf/config/client_address/66/85/178<br
/> </code></li><li>Into each of these IP range-specific directories, put a config file, which disables checks (or symlink one). First, create <code>/etc/tumgreyspf/disable.conf</code> with the following lines in it:<br
/> <code><br
/> SPFSEEDONLY = 0<br
/> GREYLISTTIME = 600<br
/> CHECKERS =<br
/> OTHERCONFIGS =<br
/> </code><br
/> It is just like the <code>default.conf</code>, but has empty <code>CHECKERS</code> and <code>OTHERCONFIGS</code> lines.<br
/> Now, symlink it into each of the IP range directories:<br
/> <code><br
/> ln -s /etc/tumgreyspf/disable.conf /var/lib/tumgreyspf/config/client_address/108/166/117/__default__<br
/> ln -s /etc/tumgreyspf/disable.conf /var/lib/tumgreyspf/config/client_address/174/129/28/__default__<br
/> ln -s /etc/tumgreyspf/disable.conf /var/lib/tumgreyspf/config/client_address/216/58/39/__default__<br
/> ln -s /etc/tumgreyspf/disable.conf /var/lib/tumgreyspf/config/client_address/222/229/219/__default__<br
/> ln -s /etc/tumgreyspf/disable.conf /var/lib/tumgreyspf/config/client_address/64/15/147/__default__<br
/> ln -s /etc/tumgreyspf/disable.conf /var/lib/tumgreyspf/config/client_address/66/85/178/__default__<br
/> </code></li></ul><p>Note the double-underscores to the left and right of <code>default</code>.</p><p>That&#8217;s it.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F08%2F07%2Fdebian-how-to-whitelist-ip-address-in-tumgrey-spf.html&amp;linkname=Debian%3A%20how%20to%20whitelist%20IP%20addresses%20in%20tumgrey-SPF" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F08%2F07%2Fdebian-how-to-whitelist-ip-address-in-tumgrey-spf.html&amp;linkname=Debian%3A%20how%20to%20whitelist%20IP%20addresses%20in%20tumgrey-SPF" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F08%2F07%2Fdebian-how-to-whitelist-ip-address-in-tumgrey-spf.html&amp;linkname=Debian%3A%20how%20to%20whitelist%20IP%20addresses%20in%20tumgrey-SPF" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F08%2F07%2Fdebian-how-to-whitelist-ip-address-in-tumgrey-spf.html&amp;linkname=Debian%3A%20how%20to%20whitelist%20IP%20addresses%20in%20tumgrey-SPF" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F08%2F07%2Fdebian-how-to-whitelist-ip-address-in-tumgrey-spf.html&amp;linkname=Debian%3A%20how%20to%20whitelist%20IP%20addresses%20in%20tumgrey-SPF" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F08%2F07%2Fdebian-how-to-whitelist-ip-address-in-tumgrey-spf.html&#038;title=Debian%3A%20how%20to%20whitelist%20IP%20addresses%20in%20tumgrey-SPF" data-a2a-url="https://bogdan.org.ua/2013/08/07/debian-how-to-whitelist-ip-address-in-tumgrey-spf.html" data-a2a-title="Debian: how to whitelist IP addresses in tumgrey-SPF"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/08/07/debian-how-to-whitelist-ip-address-in-tumgrey-spf.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to remotely convert live 1xHDD/LVM Linux server to 2xHDD RAID1/LVM (GRUB2, GPT)</title><link>https://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html</link> <comments>https://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html#comments</comments> <pubDate>Tue, 17 May 2011 13:23:05 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[GPT]]></category> <category><![CDATA[grub2]]></category> <category><![CDATA[LVM]]></category> <category><![CDATA[mdadm]]></category> <category><![CDATA[RAID]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1593</guid> <description><![CDATA[Assumptions: current HDD is /dev/sda, it has a GPT (with bios_grub being /dev/sda1), separate /boot partition (/dev/sda2), and a physical LVM volume (/dev/sda3), where LVM holds all the remaining partitions (root, /home, /srv, &#8230;); LVM is properly configured, and system reboots with no problems your new drive is /dev/sdb, it is identical to /dev/sda, and [&#8230;]]]></description> <content:encoded><![CDATA[<p>Assumptions:</p><ul><li>current HDD is /dev/sda, it has a GPT (with bios_grub being /dev/sda1), separate /boot partition (/dev/sda2), and a physical LVM volume (/dev/sda3), where LVM holds all the remaining partitions (root, /home, /srv, &#8230;); LVM is properly configured, and system reboots with no problems</li><li>your new drive is /dev/sdb, it is identical to /dev/sda, and it comes empty from the manufacturer (this is important! wipe the drive if it is not empty, especially if it used to be a part of another RAID)</li><li>your system is Debian or Debian-based; in this exact example I&#8217;ve been using Ubuntu Server 10.04</li><li>your LVM volume group is named vg0</li><li>make sure you understand what each command does before executing it</li><li>you do have an external backup of all your important data, and you do understand that the following operations are potentially dangerous to your data integrity</li></ul><p>Inspired by: <a
href="http://www200.pair.com/mecham/raid/raid1-degraded-etch.html" class="broken_link" rel="nofollow">Debian Etch RAID guide</a>, <a
href="http://serverfault.com/questions/267819/convert-1x2tb-hdd-with-lvm-into-2x2tb-hdd-with-raid1lvm-or-with-lvm-mirroring">serverfault question</a>.<br
/> <span
id="more-1593"></span></p><ol><li>Create the GPT on the new drive:<br
/> <strong>parted /dev/sdb mklabel gpt</strong></li><li>Get the list of partitions on /dev/sda:<br
/> <strong>parted -m /dev/sda print</strong></li><li>Create /dev/sdb partitions similarly to what you have on /dev/sda (my example numbers follow, use your numbers here):<br
/> <strong>parted /dev/sdb mkpart bios_grub 1049kB 2097kB</strong><br
/> <strong>parted /dev/sdb mkpart boot 2097kB 258MB</strong><br
/> <strong>parted /dev/sdb mkpart lvm 258MB 2000GB</strong></li><li>Set proper flags on partitions:<br
/> <strong>parted /dev/sdb set 1 bios_grub on</strong> (GPT doesn&#8217;t have MBR, so you create a 1-MB partition instead to hold grub2&#8242;s boot code)<br
/> <em>(possibly optional)</em> <strong>parted /dev/sdb set 2 raid on</strong><br
/> <em>(possibly optional)</em> <strong>parted /dev/sdb set 3 raid on</strong></li><li><em>(possibly optional)</em> To make sure /dev/sdb1 (the bios_grub) indeed contains grub&#8217;s boot code, I did <strong>dd if=/dev/sda1 of=/dev/sdb1</strong></li><li><strong>apt-get install mdadm</strong></li><li>Note: at this point, older tutorials suggest adding a bunch of raid* kernel modules to /etc/modules and to grub&#8217;s list of modules to load. I&#8217;m not sure this is really necessary, but do see the tutorials mentioned at the top for more information. If you do modify the lists of modules &#8211; don&#8217;t forget to run <strong>update-initramfs -u</strong>.</li><li>Create two initially-degraded RAID1 devices (one for /boot, another for LVM):<br
/> <strong>mdadm &ndash;&ndash;create /dev/md0 &ndash;&ndash;level=1 &ndash;&ndash;raid-devices=2 /dev/sdb2 missing</strong><br
/> <strong>mdadm &ndash;&ndash;create /dev/md1 &ndash;&ndash;level=1 &ndash;&ndash;raid-devices=2 /dev/sdb3 missing</strong></li><li>Store the configuration of your RAID1 to the mdadm.conf file (important! this is not done automatically!)<br
/> <strong>mdadm -Es >> /etc/mdadm/mdadm.conf</strong></li><li>Verify the contents of your mdadm.conf:<br
/> <strong>cat /etc/mdadm/mdadm.conf</strong><br
/> <strong>dpkg-reconfigure mdadm</strong>, and enable booting in degraded mode</li><li>Copy your current /boot (/dev/sda2) to the new /dev/md0 /boot partition:<br
/> (one can use something like <strong>dd -if /dev/sda2 -of /dev/md0</strong> here as well, but for some reason my attempt at dd failed writing 1 last byte of data)<br
/> <strong>mkdir /mnt/md0</strong><br
/> <strong>mkfs.ext4 /dev/md0</strong> (one can also use other filesystems here, e.g. mkfs.ext3 or even mkfs.ext2)<br
/> <strong>mount /dev/md0 /mnt/md0</strong><br
/> <strong>cp -a /boot/* /mnt/md0/</strong><br
/> <strong>umount /dev/md0</strong><br
/> <strong>rmdir /mnt/md0</strong></li><li>Now extend your existing volume group to include the newly-created /dev/md1:<br
/> <strong>pvcreate /dev/md1</strong><br
/> <strong>vgextend vg0 /dev/md1</strong></li><li>Verify the list of logical volumes you curently have: enter <strong>lvm</strong> shell, and type <strong>lvs</strong>. Here&#8217;s what I had:<br
/> LV   VG    Attr   LSize   Origin Snap%  Move Log Copy%  Convert<br
/> home vg0   -wi-ao   1.70t<br
/> logs vg0   -wi-ao   4.66g<br
/> root vg0   -wi-ao  10.24g<br
/> srv  vg0   -wc-ao 100.00g<br
/> swap vg0   -wi-ao   1.86g<br
/> tmp  vg0   -wi-ao   4.66g</li><li>Now, you can move all the logical volumes to new physical volume in one command: <strong>pvmove /dev/sda3 /dev/md1</strong>. Personally, remembering the problem I had with dd from /dev/sda2 to /dev/md0, I decided to move all logical volumes one-by-one; as this takes time, you may consider joining these operations with <strong>;</strong> or <strong>&#038;&#038;</strong>, and putting the /tmp last (as the easiest one to re-create if it fails to move):<br
/> <strong>pvmove &ndash;&ndash;name home /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name srv /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name logs /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name swap /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name root /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name tmp /dev/sda3 /dev/md1</strong></li><li>To be safer, I ran FS check on a few volumes I could umount:<br
/> <strong>umount /dev/mapper/vg0-srv</strong><br
/> <strong>fsck -f /dev/mapper/vg0-srv</strong><br
/> <strong>mount /dev/mapper/vg0-srv</strong><br
/> <strong>umount /dev/mapper/vg0-tmp</strong><br
/> <strong>fsck -f /dev/mapper/vg0-tmp</strong><br
/> <strong>mount /dev/mapper/vg0-tmp</strong></li><li>Remove /dev/sda3 from the physical space available to your volume group:<br
/> <strong>vgreduce vg0 /dev/sda3</strong></li><li>Install grub2 to both drives, so as to make them both bootable in case of failure:<br
/> <strong>grub-install &#8216;(hd0)&#8217;</strong><br
/> <strong>grub-install &#8216;(hd1)&#8217;</strong></li><li>Edit <strong>/etc/fstab</strong>, pointing /boot to /dev/md0. You may use UUIDs here, but please do not use UUIDs from mdadm.conf &#8211; those are different from FS-UUIDs, instead do <strong>ls -l /dev/disk/by-uuid</strong> to find the UUID of /dev/md0. Personally, I had no problems just using /dev/md0.</li><li>Now is the time to add your original /dev/sda to the RAID1; be absolutely sure you have moved all the data off that drive, because these commands will destroy it:<br
/> <strong>mdadm &ndash;&ndash;manage &ndash;&ndash;add /dev/md0 /dev/sda2</strong><br
/> <strong>mdadm &ndash;&ndash;manage &ndash;&ndash;add /dev/md1 /dev/sda3</strong><br
/> Re-syncing array will take some time.</li><li>To be on the safe side, you may want to run again <strong>update-initramfs -u</strong> and <strong>update-grub</strong>; I have also edited /etc/grub.d/40_custom, adding there 2 more boot options: from /dev/sda2 and /dev/sdb2 (/boot on both drives) &#8211; have no idea if that will work, but having more boot options didn&#8217;t hurt</li><li>Reboot into your new system. Actually, at this point reboot is only necessary to verify that your system is bootable &#8211; you may delay this reboot as long as you want to.</li><li>Many tutorials also suggest testing your RAID1 by manually &#8220;degrading&#8221; it, trying to boot, and then rebuilding it back. I haven&#8217;t done that, but you may want to.</li></ol><p>Improvement suggestions, criticism and thank-you are welcome in the comments.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fhow-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html&amp;linkname=How%20to%20remotely%20convert%20live%201xHDD%2FLVM%20Linux%20server%20to%202xHDD%20RAID1%2FLVM%20%28GRUB2%2C%20GPT%29" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fhow-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html&amp;linkname=How%20to%20remotely%20convert%20live%201xHDD%2FLVM%20Linux%20server%20to%202xHDD%20RAID1%2FLVM%20%28GRUB2%2C%20GPT%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fhow-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html&amp;linkname=How%20to%20remotely%20convert%20live%201xHDD%2FLVM%20Linux%20server%20to%202xHDD%20RAID1%2FLVM%20%28GRUB2%2C%20GPT%29" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fhow-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html&amp;linkname=How%20to%20remotely%20convert%20live%201xHDD%2FLVM%20Linux%20server%20to%202xHDD%20RAID1%2FLVM%20%28GRUB2%2C%20GPT%29" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fhow-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html&amp;linkname=How%20to%20remotely%20convert%20live%201xHDD%2FLVM%20Linux%20server%20to%202xHDD%20RAID1%2FLVM%20%28GRUB2%2C%20GPT%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F05%2F17%2Fhow-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html&#038;title=How%20to%20remotely%20convert%20live%201xHDD%2FLVM%20Linux%20server%20to%202xHDD%20RAID1%2FLVM%20%28GRUB2%2C%20GPT%29" data-a2a-url="https://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html" data-a2a-title="How to remotely convert live 1xHDD/LVM Linux server to 2xHDD RAID1/LVM (GRUB2, GPT)"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>rtorrent-enhanced with ipfilter and GeoIP: Debian Squeeze amd64 package</title><link>https://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html</link> <comments>https://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html#comments</comments> <pubDate>Thu, 31 Mar 2011 23:15:49 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[amd64]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[geoip]]></category> <category><![CDATA[ipfilter]]></category> <category><![CDATA[package]]></category> <category><![CDATA[rtorrent]]></category> <category><![CDATA[squeeze]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1530</guid> <description><![CDATA[rtorrent is an excellent ncurses rtorrent client. There are a few highly-popular patches, which haven&#8217;t yet made it into the Squeeze&#8217;s rtorrent version 0.8.6. Note: ArchLinux already has an rtorrent-extended package, so you may want to look at that one (instead of my Debian package below). I might use Arch&#8217;s patchset next time to generate [&#8230;]]]></description> <content:encoded><![CDATA[<p><img
src="http://bogdan.org.ua/wp-content/uploads/2011/03/shot.png" alt="rtorrent-eyecandy" title="rtorrent-eyecandy (from http://karabaja.pondi.hr/packages/rtorrent-mod/shot.png)" width="698" height="380" class="alignnone size-full wp-image-1533" /><br
/> rtorrent is an excellent ncurses <del
datetime="2011-03-31T21:25:09+00:00">r</del>torrent client.</p><p>There are a few highly-popular patches, which haven&#8217;t yet made it into the Squeeze&#8217;s rtorrent version 0.8.6.</p><p><strong>Note</strong>: ArchLinux already has an <a
href="http://aur.archlinux.org/packages.php?ID=33756">rtorrent-extended package</a>, so you may want to look at that one (instead of my Debian package below). I might use Arch&#8217;s patchset next time to generate a truly extended rtorrent package.</p><p>I&#8217;ve incorporated 3 of such patches (<a
href="http://libtorrent.rakshasa.no/ticket/239" class="broken_link" rel="nofollow">#239</a> ipfilter, <a
href="http://libtorrent.rakshasa.no/ticket/2064" class="broken_link" rel="nofollow">#2064</a> GeoIP support, and <a
href="http://libtorrent.rakshasa.no/ticket/2171" class="broken_link" rel="nofollow">#2171</a> colours/eyecandy), and built a <a
href="/wp-content/uploads/2011/04/rtorrent_0.8.6-1_amd64.deb">squeeze amd64 rtorrent-enhanced package</a>.</p><p><img
src="http://bogdan.org.ua/wp-content/uploads/2011/04/rtorrent-features.png" alt="" title="rtorrent-features" width="675" height="107" class="alignnone size-full wp-image-1537" /></p><p>A few excerpts to explain how these extra features are to be configured and used (all come from the above-mentioned trac tickets, some were edited/extended).</p><p><strong>ipfilter</strong></p><blockquote><p>ipfilter allows to selectively blacklist/whitelist peers &#8211; based on IP address range files (so-called ipfilter files). The ipfilter files may, for example, come from bluetack.co.uk. Each line of the file contains a record in this format: <strong>range_description:start_IP-end_IP</strong>, where <em>start_IP</em> should be less than or equal to <em>end_IP</em>. Multiple files can be used. Overlapping ranges are merged automatically. Both incoming and outgoing connections are checked against the filter. Exclusions are not supported, so connection to/from IPs in all the loaded ranges will be disallowed and dropped.</p></blockquote><blockquote><p>Include &#8220;ip_filter=<file,...>&#8221; directive in .rtorrent.rc. For example (paths are specified relative to user&#8217;s home directory):<br
/> <strong>ip_filter=ipfilter/level1,ipfilter/level2</strong></p></blockquote><blockquote><p>It is probably a good idea to reload ipfilter files once in a while, so you can also include &#8220;reload_ip_filter&#8221; directive on schedule to refresh the filter. The same files named in &#8220;ip_filter&#8221; will be reloaded.</p><p><strong>schedule = filter,18:30:00,24:00:00,reload_ip_filter=</strong></p></blockquote><blockquote><p>To support the feature you may want to setup cron job to reload and unzip files from bluetack. Examples <a
href="http://libtorrent.rakshasa.no/ticket/239#comment:26" class="broken_link" rel="nofollow">here</a> and <a
href="http://pastebin.com/jLqT3qxL">here</a>.</p></blockquote><p><strong>GeoIP</strong></p><blockquote><p>In the Peers view of each torrent a new column &#8211; CC, country code &#8211; is added, which shows peer&#8217;s country code. When examining each peer, you will see more data from the GeoIP database (if you have the relevant files installed): AS num and city. At the very least, you need to have <strong>geoip-database</strong> installed. You can get free &#8220;lite&#8221; versions of <a
href="http://www.maxmind.com/app/geolitecity">city</a>/<a
href="http://geolite.maxmind.com/download/geoip/database/asnum/" class="broken_link" rel="nofollow">AS</a>-databases, rename them (removing &#8220;lite&#8221;) and put into an appropriate location to make rtorrent+geoip use them as well. Geop-isp data support isn&#8217;t integrated into this rtorrent package.</p></blockquote><p><strong>Colours</strong></p><blockquote><p>This patch somewhat changes the way rtorrent shows torrents. Seeding torrents have bold titles, there are no half-displayed torrents at the top/bottom when scrolling, and you can configure colours for active/done torrents (ticket libtorrent.rakshasa.no/ticket/1382, which seems to be gone now). Source code and testing hint at these configurable colours: <em>done_fg_color, done_bg_color, active_fg_color, active_bg_color</em>, and at these possible values: 1 (red), 2 (green), 3 (yellow).</p></blockquote><p><strong>Geek&#8217;s cellar</strong><br
/> A related (though not used in any way for the preparation of the package) resource is <a
href="https://calomel.org/rtorrent_mods.html">rtorrent mods page</a>.</p><p>Relatively schematically, applying patches and building the package was performed in these steps (starting within some newly-created directory):</p><ol><li>sudo aptitude install cdbs devscripts [and whatever else you find you're missing]</li><li>apt-get source rtorrent</li><li>dpkg-source -x rtorrent_0.8.6-1.dsc</li><li>cd rtorrent-0.8.6</li><li>cdbs-edit-patch 01-ipfilter.patch</li><li>patch -p1 < /path/to/patch/239</li><li>exit 0</li><li>cdbs-edit-patch 02-geoip.patch</li><li>patch -p1 < /path/to/patch/2064-after-ipfilter</li><li>exit 0</li><li>cdbs-edit-patch 03-eyecandy.patch</li><li>patch -p1 < /path/to/patch/2171-mod-with-canvas</li><li>exit 0 [you could do all 3 patches together, but I prefer cleaner and manageable approaches]</li><li>[some weird operation to be explained below]</li><li>dpkg-buildpackage</li></ol><p>Weird operation: I didn&#8217;t know how to make dpkg-buildpackage run autorun.sh (which is required for one of the patches I&#8217;ve used) before configure (could someone enlighten me how to do that?), so I started a new patch with cdbs-edit-patch, then ran one by one `autoreconf -if`, `./autorun.sh`, `./configure`, exited with zero status and was done with that problem. The resulting &#8220;patch&#8221; was 2MB large <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F04%2F01%2Frtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html&amp;linkname=rtorrent-enhanced%20with%20ipfilter%20and%20GeoIP%3A%20Debian%20Squeeze%20amd64%20package" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F04%2F01%2Frtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html&amp;linkname=rtorrent-enhanced%20with%20ipfilter%20and%20GeoIP%3A%20Debian%20Squeeze%20amd64%20package" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F04%2F01%2Frtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html&amp;linkname=rtorrent-enhanced%20with%20ipfilter%20and%20GeoIP%3A%20Debian%20Squeeze%20amd64%20package" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F04%2F01%2Frtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html&amp;linkname=rtorrent-enhanced%20with%20ipfilter%20and%20GeoIP%3A%20Debian%20Squeeze%20amd64%20package" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F04%2F01%2Frtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html&amp;linkname=rtorrent-enhanced%20with%20ipfilter%20and%20GeoIP%3A%20Debian%20Squeeze%20amd64%20package" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F04%2F01%2Frtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html&#038;title=rtorrent-enhanced%20with%20ipfilter%20and%20GeoIP%3A%20Debian%20Squeeze%20amd64%20package" data-a2a-url="https://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html" data-a2a-title="rtorrent-enhanced with ipfilter and GeoIP: Debian Squeeze amd64 package"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to easily install any PyPi/easy_install python module on Debian</title><link>https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html</link> <comments>https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html#comments</comments> <pubDate>Wed, 16 Feb 2011 17:22:20 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[debianize]]></category> <category><![CDATA[easy_install]]></category> <category><![CDATA[pycassa]]></category> <category><![CDATA[PyPi]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1430</guid> <description><![CDATA[Imagine you need to install pycassa (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu: if you don&#8217;t have the python-stdeb package: sudo aptitude install python-stdeb pypi-install pycassa That&#8217;s it. Refer to stdeb readme for more information. You will need that if [&#8230;]]]></description> <content:encoded><![CDATA[<p>Imagine you need to install <a
href="https://github.com/pycassa/pycassa">pycassa</a> (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu:</p><ul><li>if you don&#8217;t have the python-stdeb package: <strong>sudo aptitude install python-stdeb</strong></li><li><strong>pypi-install pycassa</strong></li></ul><p>That&#8217;s it.</p><p>Refer to <a
href="https://github.com/astraw/stdeb#readme">stdeb readme</a> for more information. You will need that if there are dependencies &#8211; which might not be resolved automatically by stdeb.</p><p>Before stdeb, it wasn&#8217;t exactly trivial to <a
href="http://showmedo.com/videotutorials/video?name=linuxJensMakingDeb">make a .deb from python module</a>.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&amp;linkname=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2011%2F02%2F16%2Fhow-to-easily-install-any-pypi-easy_install-python-module-on-debian.html&#038;title=How%20to%20easily%20install%20any%20PyPi%2Feasy_install%20python%20module%20on%20Debian" data-a2a-url="https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html" data-a2a-title="How to easily install any PyPi/easy_install python module on Debian"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to relay outgoing postfix emails via another mail server (e.g. your ISP)</title><link>https://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html</link> <comments>https://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html#comments</comments> <pubDate>Sat, 04 Dec 2010 18:01:37 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[postfix]]></category> <category><![CDATA[relay]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1218</guid> <description><![CDATA[Here&#8217;s a simple and clear guide for gmail, which also definitely works with other relay hosts. I&#8217;ve used it to configure my ISP&#8217;s mail relay (they block outgoing port 25) on a Debian Squeeze laptop.]]></description> <content:encoded><![CDATA[<p>Here&#8217;s a <a
href="http://ubuntu-tutorials.com/2008/11/11/relaying-postfix-smtp-via-smtpgmailcom/">simple and clear guide for gmail</a>, which also definitely works with other relay hosts. I&#8217;ve used it to configure my ISP&#8217;s mail relay (they block outgoing port 25) on a Debian Squeeze laptop.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F12%2F04%2Fhow-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html&amp;linkname=How%20to%20relay%20outgoing%20postfix%20emails%20via%20another%20mail%20server%20%28e.g.%20your%20ISP%29" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F12%2F04%2Fhow-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html&amp;linkname=How%20to%20relay%20outgoing%20postfix%20emails%20via%20another%20mail%20server%20%28e.g.%20your%20ISP%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F12%2F04%2Fhow-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html&amp;linkname=How%20to%20relay%20outgoing%20postfix%20emails%20via%20another%20mail%20server%20%28e.g.%20your%20ISP%29" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F12%2F04%2Fhow-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html&amp;linkname=How%20to%20relay%20outgoing%20postfix%20emails%20via%20another%20mail%20server%20%28e.g.%20your%20ISP%29" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F12%2F04%2Fhow-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html&amp;linkname=How%20to%20relay%20outgoing%20postfix%20emails%20via%20another%20mail%20server%20%28e.g.%20your%20ISP%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F12%2F04%2Fhow-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html&#038;title=How%20to%20relay%20outgoing%20postfix%20emails%20via%20another%20mail%20server%20%28e.g.%20your%20ISP%29" data-a2a-url="https://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html" data-a2a-title="How to relay outgoing postfix emails via another mail server (e.g. your ISP)"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ask.debian.net: stackoverflow for Debian with Shapado</title><link>https://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html</link> <comments>https://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html#comments</comments> <pubDate>Mon, 18 Oct 2010 22:41:13 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[shapado]]></category> <category><![CDATA[stackoverflow]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1158</guid> <description><![CDATA[ask.debian.net is a StackOverflow-like Q&#038;A website built with OSS Shapado. That&#8217;s my first encounter of Shapado, so it was interesting to read Shapado authors&#8217; justification and a related question on meta.SO.]]></description> <content:encoded><![CDATA[<p><img
src="http://bogdan.org.ua/wp-content/uploads/2010/10/4b917d9519ce95468f00000b.png" alt="" title="ask.debian.net" width="140" height="60" class="alignleft size-full wp-image-1160" /><a
href="http://ask.debian.net/" class="broken_link" rel="nofollow">ask.debian.net</a> is a <a
href="http://stackoverflow.com/">StackOverflow</a>-like Q&#038;A website built with OSS <a
href="http://shapado.com/">Shapado</a>.</p><p>That&#8217;s my first encounter of Shapado, so it was interesting to read Shapado authors&#8217; <a
href="http://blog.ricodigo.com/2009/9/27/shapado-a-foss-replacement-for-stackoverflow/shapado">justification</a> and a related question on <a
href="http://meta.stackoverflow.com/questions/45988/will-a-clone-force-stack-overflow-to-open-source">meta.SO</a>.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F19%2Fask-debian-net-stackoverflow-for-debian-with-shapado.html&amp;linkname=ask.debian.net%3A%20stackoverflow%20for%20Debian%20with%20Shapado" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F19%2Fask-debian-net-stackoverflow-for-debian-with-shapado.html&amp;linkname=ask.debian.net%3A%20stackoverflow%20for%20Debian%20with%20Shapado" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F19%2Fask-debian-net-stackoverflow-for-debian-with-shapado.html&amp;linkname=ask.debian.net%3A%20stackoverflow%20for%20Debian%20with%20Shapado" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F19%2Fask-debian-net-stackoverflow-for-debian-with-shapado.html&amp;linkname=ask.debian.net%3A%20stackoverflow%20for%20Debian%20with%20Shapado" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F19%2Fask-debian-net-stackoverflow-for-debian-with-shapado.html&amp;linkname=ask.debian.net%3A%20stackoverflow%20for%20Debian%20with%20Shapado" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F19%2Fask-debian-net-stackoverflow-for-debian-with-shapado.html&#038;title=ask.debian.net%3A%20stackoverflow%20for%20Debian%20with%20Shapado" data-a2a-url="https://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html" data-a2a-title="ask.debian.net: stackoverflow for Debian with Shapado"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Linux server remote backup options</title><link>https://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html</link> <comments>https://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html#comments</comments> <pubDate>Sun, 03 Oct 2010 19:40:37 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[dirvish]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[remote]]></category> <category><![CDATA[server]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1111</guid> <description><![CDATA[Recently I finally managed to configure remote (aka off-site) backup for my Debian server. As always, I started with a comparison of existing solutions. Debian has a number of packages enabling remote (over the network) backup: backupPC, backupninja, backup-manager, dirvish, duplicity, luckybackup, rdiff-backup, and some others. In my setup I wanted backups to be initiated [&#8230;]]]></description> <content:encoded><![CDATA[<p>Recently I finally managed to configure remote (aka <em>off-site</em>) backup for my Debian server. As always, I started with a comparison of existing solutions.</p><p>Debian has a number of packages enabling remote (over the network) backup: <a
href="http://packages.debian.org/en/lenny/backuppc">backupPC</a>, <a
href="http://packages.debian.org/en/lenny/backupninja">backupninja</a>, <a
href="http://packages.debian.org/en/lenny/backup-manager">backup-manager</a>, <a
href="http://packages.debian.org/en/squeeze/dirvish">dirvish</a>, <a
href="http://packages.debian.org/en/lenny/duplicity">duplicity</a>, <a
href="http://packages.debian.org/en/squeeze/luckybackup">luckybackup</a>, <a
href="http://packages.debian.org/lenny/rdiff-backup">rdiff-backup</a>, and some others.</p><p><span
id="more-1111"></span>In my setup I wanted backups to be initiated by the external backup server (as opposed to <em>internal</em>, production server initiated backup). Also, I was going to backup linux server to another linux box. Thus, it would be preferable to have support for rsync on both boxes and hardlinks on the backup box. I needed backup to be run regularly, I didn&#8217;t need any kind of GUI, and I would prefer to keep a bunch of older backups around (in case the most recent backup is of a compromised system, for example). Also, having an incremental backup of SQL databases was yet another requirement.</p><p>A few tools more or less matched my requirements: backupPC, duplicity, rdiff-backup, and dirvish.</p><p><a
href="http://backuppc.sourceforge.net/">backupPC</a>, judging from its description and a few tutorial articles, is a cool piece of software. I think I might use it next time. But this time I really had no need for over-SMB backups (intended for Windows boxes), and no need for a nice administrative web-interface to backupPC. If not these extra features (which I don&#8217;t currently need) I&#8217;d go for backupPC. Here&#8217;s a <a
href="https://help.ubuntu.com/community/BackupPC">guide for Ubuntu</a>.</p><p><a
href="http://duplicity.nongnu.org/">Duplicity</a> claims to still be in beta, thus I haven&#8217;t given it a try. <a
href="http://www.nongnu.org/rdiff-backup/">rdiff-backup</a> seemed a bit too simple (and with no ready templates to get working regular backups faster), so I skipped that one as well.</p><p><a
href="http://www.dirvish.org/">Dirvish</a> really caught my attention, partially thanks to a good and relatively <em>short</em> <a
href="http://dtcsupport.gplhost.com/PmWiki/Backup-With-Dirvish-And-Automysqlbackup" class="broken_link" rel="nofollow">quick-start tutorial</a>. That tutorial also mentions <a
href="http://packages.debian.org/en/squeeze/automysqlbackup">automysqlbackup</a> &#8211; a nice, almost no-configuration tool to take regular dumps of MySQL databases. In combination, these two now regularly backup up my whole server to another linux box.</p><p>I would definitely recommend using dirvish+automysqlbackup for remote/off-site backup needs. However, other solutions might be as good or better for your use case.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F03%2Flinux-server-remote-backup-options.html&amp;linkname=Linux%20server%20remote%20backup%20options" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F03%2Flinux-server-remote-backup-options.html&amp;linkname=Linux%20server%20remote%20backup%20options" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F03%2Flinux-server-remote-backup-options.html&amp;linkname=Linux%20server%20remote%20backup%20options" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F03%2Flinux-server-remote-backup-options.html&amp;linkname=Linux%20server%20remote%20backup%20options" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F03%2Flinux-server-remote-backup-options.html&amp;linkname=Linux%20server%20remote%20backup%20options" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F03%2Flinux-server-remote-backup-options.html&#038;title=Linux%20server%20remote%20backup%20options" data-a2a-url="https://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html" data-a2a-title="Linux server remote backup options"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>ntfstruncate binary for Debian (resetting NTFS bad clusters counter)</title><link>https://bogdan.org.ua/2010/03/01/ntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html</link> <comments>https://bogdan.org.ua/2010/03/01/ntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html#comments</comments> <pubDate>Mon, 01 Mar 2010 16:55:56 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[bad clusters]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[linux-ntfs]]></category> <category><![CDATA[NTFS]]></category> <category><![CDATA[ntfsprogs]]></category> <category><![CDATA[ntfstruncate]]></category> <category><![CDATA[partition]]></category> <category><![CDATA[pending sectors]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1000</guid> <description><![CDATA[There is an excellent step-by-step instruction on resetting the bad clusters counter of an NTFS partition with linux-ntfs tools. I&#8217;ve checked &#8211; it works as expected: Back up important data from partition just in case Find out size of &#8216;$Bad&#8217; attribute in $Badclus using ntfsinfo -i 8 partition (partition is for example /dev/sda1). It will [&#8230;]]]></description> <content:encoded><![CDATA[<p>There is an <a
href="http://www.linux-ntfs.org/doku.php?id=ntfsclone#reseting_the_bad_sectors_list_after_cloning" class="broken_link" rel="nofollow">excellent step-by-step instruction</a> on resetting the bad clusters counter of an NTFS partition with linux-ntfs tools. I&#8217;ve checked &#8211; it works as expected:</p><blockquote><ol><li>Back up important data from partition just in case</li><li>Find out size of &#8216;$Bad&#8217; attribute in $Badclus using <strong>ntfsinfo -i 8 <em>partition</em></strong> (<em>partition</em> is for example /dev/sda1). It will be the â€œAllocated sizeâ€ value in the â€œDumping attribute $DATA (0<code>x</code>80)â€ (there will be two 0<code>x</code>80 attributes. Only one has an â€œAllocated sizeâ€ line). Let us write down (remember) this size as <em>ntfs_size</em>.</li><li>Use <strong>ntfstruncate <em>partition</em> 8 0<code>x</code>80 &#8216;$Bad&#8217; 0</strong> to set $Bad&#8217;s attribute length to zero.</li><li>Use <strong>ntfstruncate <em>partition</em> 8 0<code>x</code>80 &#8216;$Bad&#8217; <em>ntfs_size</em></strong> to set $Bad&#8217;s attribute length back to proper value <em>ntfs_size</em> which was recorded in step 2.</li><li>Boot into Windows and run <strong>chkdsk -f <em>diskname</em></strong>. It will find errors and should fix them.</li></ol></blockquote><p>However, Debian&#8217;s <strong>ntfsprogs</strong> package does not have the <strong>ntfstruncate</strong> binary.</p><p>Here&#8217;s how you can easily build one yourself (you may need a few extra packages with build tools for that):<br
/> <span
id="more-1000"></span></p><ol><li><strong>apt-get source ntfsprogs</strong></li><li><strong>cd linux-ntfs-2.0.0</strong></li><li><strong>./configure &#038;&#038; make extra</strong></li><li><strong>cd ntfsprogs &#038;&#038; ./ntfstruncate</strong></li></ol><p>You can also install ntfstruncate system-wide, but I have no idea if that will interfere with the already-installed ntfsprogs package, so I just used this binary directly from linux-ntfs-2.0.0/ntfsprogs.</p><p>Bad clusters happen not only when cloning an NTFS partition between 2 physical hard disk drives. Once, after a brief blackout (with a turned on PC, and not on a UPS), the SMART status of my new HDD started showing 1 &#8216;Pending sector&#8217;. Correspondingly, all the SMART tests (performed with a <strong>smartctl</strong> utility) reported read errors. To help my HDD examine and fix the problem itself, I performed a write operation to that single unreadable sector, which restored it (and reset the &#8216;Pending sector&#8217; counter back to zero). It was possible, because not the physical sector itself, but the hidden CRC field had errors after power failure; modern hard drives can detect and fix this kind of errors upon write operations (read operations only mark the sector as &#8216;pending&#8217;, because data read is not consistent with the stored CRC).</p><p>However, NTFS partition still had 4096 bytes in &#8216;bad clusters&#8217;. A little research revealed the presence of internal NTFS bad clusters counter, which can be reset following the procedures above.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html&amp;linkname=ntfstruncate%20binary%20for%20Debian%20%28resetting%20NTFS%20bad%20clusters%20counter%29" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html&amp;linkname=ntfstruncate%20binary%20for%20Debian%20%28resetting%20NTFS%20bad%20clusters%20counter%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html&amp;linkname=ntfstruncate%20binary%20for%20Debian%20%28resetting%20NTFS%20bad%20clusters%20counter%29" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html&amp;linkname=ntfstruncate%20binary%20for%20Debian%20%28resetting%20NTFS%20bad%20clusters%20counter%29" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html&amp;linkname=ntfstruncate%20binary%20for%20Debian%20%28resetting%20NTFS%20bad%20clusters%20counter%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F01%2Fntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html&#038;title=ntfstruncate%20binary%20for%20Debian%20%28resetting%20NTFS%20bad%20clusters%20counter%29" data-a2a-url="https://bogdan.org.ua/2010/03/01/ntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html" data-a2a-title="ntfstruncate binary for Debian (resetting NTFS bad clusters counter)"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/03/01/ntfstruncate-binary-for-debian-resetting-ntfs-bad-clusters-counter.html/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Chandler 1.0.3 package for Debian testing amd64</title><link>https://bogdan.org.ua/2010/01/25/chandler-1-0-3-package-for-debian-testing-amd64.html</link> <comments>https://bogdan.org.ua/2010/01/25/chandler-1-0-3-package-for-debian-testing-amd64.html#comments</comments> <pubDate>Mon, 25 Jan 2010 08:52:26 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[amd64]]></category> <category><![CDATA[Chandler]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[package]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=976</guid> <description><![CDATA[Recently, I have come across the Chandler project. Chandler is a sophisticated organizer, including tasks, calendar, appointments, invitations, and many more. The project does provide a 64-bit package for Ubuntu 8.10 &#8220;Intrepid Ibex&#8221;, but it has a dependency on python-zope-interface &#8211; which in Debian testing is a virtual package, currently provided by python-zope.interface. That single [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://chandlerproject.org/"><img
src="http://bogdan.org.ua/wp-content/uploads/2010/01/chandler-project-logo.png" alt="" title="chandler-project-logo" width="192" height="39" class="alignleft size-full wp-image-979" /></a>Recently, I have come across the <a
href="http://chandlerproject.org/">Chandler project</a>. Chandler is a sophisticated organizer, including tasks, calendar, appointments, invitations, and many more.</p><p>The project does provide a <a
href="http://downloads.osafoundation.org/chandler/releases/1.0.3/#enduserlinux" class="broken_link" rel="nofollow">64-bit package</a> for Ubuntu 8.10 &#8220;Intrepid Ibex&#8221;, but it has a dependency on python-zope-interface &#8211; which in Debian testing is a virtual package, currently provided by python-zope.interface. That single dependency made my aptitude complain all the time, so I edited the .deb-file, renaming depends/python-zope-interface to depends/python-zope.interface (following <a
href="http://thedarkmaster.wordpress.com/2008/05/24/how-to-create-manipulate-a-deb-file-of-a-compiled-application/">nice and simple instructions</a>). After that &#8211; no more aptitude complaints, and Chandler works fine.</p><p>Download the <a
href="http://bogdan.org.ua/wp-content/uploads/2010/01/chandler-1.0.3-amd64-Debian-testing.deb">modified Chandler 1.0.3 Debian testing amd64 package</a> (md5: 239071715977bea2eb75f3bb54491a02).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F25%2Fchandler-1-0-3-package-for-debian-testing-amd64.html&amp;linkname=Chandler%201.0.3%20package%20for%20Debian%20testing%20amd64" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F25%2Fchandler-1-0-3-package-for-debian-testing-amd64.html&amp;linkname=Chandler%201.0.3%20package%20for%20Debian%20testing%20amd64" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F25%2Fchandler-1-0-3-package-for-debian-testing-amd64.html&amp;linkname=Chandler%201.0.3%20package%20for%20Debian%20testing%20amd64" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F25%2Fchandler-1-0-3-package-for-debian-testing-amd64.html&amp;linkname=Chandler%201.0.3%20package%20for%20Debian%20testing%20amd64" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F25%2Fchandler-1-0-3-package-for-debian-testing-amd64.html&amp;linkname=Chandler%201.0.3%20package%20for%20Debian%20testing%20amd64" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F25%2Fchandler-1-0-3-package-for-debian-testing-amd64.html&#038;title=Chandler%201.0.3%20package%20for%20Debian%20testing%20amd64" data-a2a-url="https://bogdan.org.ua/2010/01/25/chandler-1-0-3-package-for-debian-testing-amd64.html" data-a2a-title="Chandler 1.0.3 package for Debian testing amd64"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/01/25/chandler-1-0-3-package-for-debian-testing-amd64.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>R under Debian testing/i386: permanently set pdfviewer option</title><link>https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html</link> <comments>https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html#comments</comments> <pubDate>Wed, 21 Oct 2009 14:06:37 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[pdfviewer]]></category> <category><![CDATA[R]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=909</guid> <description><![CDATA[If you get this message when opening vignettes: Error in openPDF(vif) : getOption(&#8216;pdfviewer&#8217;) is &#8221;; please use &#8216;options(pdfviewer=&#8230;)&#8217; and you are tired of running this command every time: > options(pdfviewer=&#8221;okular&#8221;) then you should check if your system-wide Renviron file has proper PDF viewer set: grep -i pdf /etc/R/Renviron R_PDFLATEXCMD=${R_PDFLATEXCMD-${PDFLATEX-&#8217;/usr/bin/pdflatex&#8217;}} R_RD4PDF=${R_RD4PDF-&#8217;times,hyper&#8217;} ## Default PDF viewer R_PDFVIEWER=${R_PDFVIEWER-&#8221;} [&#8230;]]]></description> <content:encoded><![CDATA[<p>If you get this message when opening vignettes:</p><blockquote><p>Error in openPDF(vif) :<br
/> getOption(&#8216;pdfviewer&#8217;) is &#8221;; please use &#8216;options(pdfviewer=&#8230;)&#8217;</p></blockquote><p>and you are tired of running this command every time:</p><blockquote><p>> options(pdfviewer=&#8221;okular&#8221;)</p></blockquote><p>then you should check if your system-wide <strong>Renviron</strong> file has proper PDF viewer set:<br
/> <span
id="more-909"></span><br
/> <strong>grep -i pdf /etc/R/Renviron</strong></p><blockquote><p>R_PDFLATEXCMD=${R_PDFLATEXCMD-${PDFLATEX-&#8217;/usr/bin/pdflatex&#8217;}}<br
/> R_RD4PDF=${R_RD4PDF-&#8217;times,hyper&#8217;}<br
/> ## Default PDF viewer<br
/> R_PDFVIEWER=${R_PDFVIEWER-&#8221;}</p></blockquote><p>It wasn&#8217;t in my case.</p><p>To set one, either edit the system-wide Renviron (e.g. by editing the <strong>R_PDFVIEWER=${R_PDFVIEWER-&#8221;}</strong> line to look like <strong>R_PDFVIEWER=${R_PDFVIEWER-&#8217;/usr/bin/xdg-open&#8217;}</strong> &#8211; this will use MIME types to open your preferred PDF viewer), or one of the per-user/per-directory Renviron files to fix this minor annoyance (format is the same, e.g. R_PDFVIEWER=okular ).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&#038;title=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" data-a2a-url="https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html" data-a2a-title="R under Debian testing/i386: permanently set pdfviewer option"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Linux console/CLI/ncurses samba shared folders browsing</title><link>https://bogdan.org.ua/2009/04/16/linux-console-cli-ncurses-samba-shared-folder-browser-browsing.html</link> <comments>https://bogdan.org.ua/2009/04/16/linux-console-cli-ncurses-samba-shared-folder-browser-browsing.html#comments</comments> <pubDate>Thu, 16 Apr 2009 12:22:37 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[cifs]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[folder]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[shared]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=665</guid> <description><![CDATA[Connecting remotely via ssh to my Debian box at work, I needed to mount a CIFS (samba) share, but didn&#8217;t remember server name (or IP) and share name. At least two convenient utilities are available in Debian Lenny for non-X Samba browsing. smbtree (part of smbclient package) will list all visible workgroups, their servers, and [&#8230;]]]></description> <content:encoded><![CDATA[<p>Connecting remotely via ssh to my Debian box at work, I needed to mount a CIFS (samba) share, but didn&#8217;t remember server name (or IP) and share name.</p><p>At least two convenient utilities are available in Debian Lenny for non-X Samba browsing.</p><p><strong>smbtree</strong> (part of <strong>smbclient</strong> package) will list all visible workgroups, their servers, and share names of those servers &#8211; including &#8220;hidden&#8221; shares like C$, IPC$, ADMIN$, print$. Very handy and greppable!</p><p><strong>samba-commander</strong> (<strong>smbc</strong> package) is a ncurses samba browser with &#8220;find file&#8221; functionality.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F04%2F16%2Flinux-console-cli-ncurses-samba-shared-folder-browser-browsing.html&amp;linkname=Linux%20console%2FCLI%2Fncurses%20samba%20shared%20folders%20browsing" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F04%2F16%2Flinux-console-cli-ncurses-samba-shared-folder-browser-browsing.html&amp;linkname=Linux%20console%2FCLI%2Fncurses%20samba%20shared%20folders%20browsing" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F04%2F16%2Flinux-console-cli-ncurses-samba-shared-folder-browser-browsing.html&amp;linkname=Linux%20console%2FCLI%2Fncurses%20samba%20shared%20folders%20browsing" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F04%2F16%2Flinux-console-cli-ncurses-samba-shared-folder-browser-browsing.html&amp;linkname=Linux%20console%2FCLI%2Fncurses%20samba%20shared%20folders%20browsing" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F04%2F16%2Flinux-console-cli-ncurses-samba-shared-folder-browser-browsing.html&amp;linkname=Linux%20console%2FCLI%2Fncurses%20samba%20shared%20folders%20browsing" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F04%2F16%2Flinux-console-cli-ncurses-samba-shared-folder-browser-browsing.html&#038;title=Linux%20console%2FCLI%2Fncurses%20samba%20shared%20folders%20browsing" data-a2a-url="https://bogdan.org.ua/2009/04/16/linux-console-cli-ncurses-samba-shared-folder-browser-browsing.html" data-a2a-title="Linux console/CLI/ncurses samba shared folders browsing"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/04/16/linux-console-cli-ncurses-samba-shared-folder-browser-browsing.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Intel i915 integrated graphics under Debian: how to get rid of sluggish 2D performance</title><link>https://bogdan.org.ua/2009/03/02/intel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html</link> <comments>https://bogdan.org.ua/2009/03/02/intel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html#comments</comments> <pubDate>Mon, 02 Mar 2009 20:41:03 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[driver]]></category> <category><![CDATA[i915]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[slow]]></category> <category><![CDATA[video]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=623</guid> <description><![CDATA[I assume you already have configured and working desktop environment, but want to improve performance. First of all, sudo aptitude install mesa-utils. Then run in a Terminal/Konsole glxgears, and wait for ~15 seconds; if your FPS is ~400 or less, then you do have sluggish video performance (usually manifesting itself as slow scrolling in Firefox/Iceweasel, [&#8230;]]]></description> <content:encoded><![CDATA[<p>I assume you already have configured and working desktop environment, but want to improve performance.</p><p>First of all, <strong>sudo aptitude install mesa-utils</strong>. Then run in a Terminal/Konsole <strong>glxgears</strong>, and wait for ~15 seconds; if your FPS is ~400 or less, then you do have sluggish video performance (usually manifesting itself as slow scrolling in Firefox/Iceweasel, slow window switching/minimziing/maximizing etc).</p><p>After reading through several forums and bug reports and blog posts, I&#8217;ve ended with the following modifications to my <strong>/etc/X11/xorg.conf</strong>:<br
/> <span
id="more-623"></span></p><ol><li>backup your current xorg.conf: <strong>sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.before-exa</strong></li><li>open your /etc/X11/xorg.conf with a favourite editor; I&#8217;ve added these lines to section &#8220;module&#8221;:<br
/><blockquote><p> Load &#8220;dbe&#8221;<br
/> Load &#8220;xtrap&#8221;<br
/> Load &#8220;record&#8221;<br
/> Load &#8220;GLcore&#8221;</p></blockquote><p>These are <strong>not</strong> really <strong>performance-related</strong> and could be skipped; I&#8217;m giving them here, because they were suggested as default entries by dexconf or some other xorg.conf-generator utility. Again &#8211; they are not supposed to improve performance, so you can skip these.</li><li>my &#8220;Device&#8221; section is now:<br
/><blockquote><p> Section &#8220;Device&#8221;<br
/> Identifier	&#8220;Intel Corporation 82915G/GV/910GL Integrated Graphics Controller&#8221;<br
/> BoardName	&#8220;82915G/GV/910GL Integrated Graphics Controller&#8221;<br
/> Vendorname	&#8220;Intel Corporation&#8221;<br
/> #Driver		&#8220;i810&#8243;<br
/> Driver		&#8220;intel&#8221;<br
/> BusID		&#8220;PCI:0:2:0&#8243;<br
/> Option	&#8220;DRI&#8221;	&#8220;true&#8221;<br
/> Option	&#8220;AccelMethod&#8221;	&#8220;exa&#8221;<br
/> Option	&#8220;MigrationHeuristic&#8221;	&#8220;greedy&#8221;<br
/> Option	&#8220;ExaNoComposite&#8221;	&#8220;false&#8221;<br
/> EndSection</p></blockquote><p><strong>Driver i810</strong> (xserver-xorg-video-i810 package) was about 10-20 FPS slower than <strong>Driver intel</strong> (xserver-xorg-video-intel package) for me. The most important lines here are <strong>Option AccelMethod exa</strong> (which enables EXA acceleration instead of the older XAA; if you run 2.6.28 or later kernel, you can try UXA instead of EXA) and <strong>Option MigrationHeuristic greedy</strong>. <strong>Option ExaNoComposite false</strong> doesn&#8217;t make a difference for me, and <strong>Option DRI true</strong> might be redundant (didn&#8217;t bother trying to remove it).</li><li>at the end of xorg.conf I have two more sections:<br
/><blockquote><p> Section &#8220;DRI&#8221;<br
/> Mode	0666<br
/> EndSection</p><p>Section &#8220;Extensions&#8221;<br
/> Option	&#8220;Composite&#8221;	&#8220;enable&#8221;<br
/> Option	&#8220;MIT-SHM&#8221;	&#8220;Yes&#8221;<br
/> EndSection</p></blockquote></li><li><strong>sudo nano /etc/environment</strong>, and add one line: <strong>INTEL_BATCH=1</strong> (if you have graphics stability issues or screen corruption &#8211; try removing this change first)</li><li>you can test if your xorg.conf is syntactically correct by running X -config /etc/X11/xorg.conf (provided that you edited this exact file)</ol><p>This is it. Before these modifications, my FPS in glxgears was around 430; after these modifications it is ~915.</p><p>As time permits, I might try the XAA configuration, suggested at <a
href="http://foolcontrol.org/?p=181">foolcontrol</a>.</p><p><ins
datetime="2009-04-13T09:53:47+00:00">Update</ins>: with compiz enabled, XAA configuration recommended at <a
href="http://foolcontrol.org/?p=181">foolcontrol</a> is definitely faster in 2D.</p><p>Improvements, suggestions, corrections are welcome.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F02%2Fintel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html&amp;linkname=Intel%20i915%20integrated%20graphics%20under%20Debian%3A%20how%20to%20get%20rid%20of%20sluggish%202D%20performance" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F02%2Fintel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html&amp;linkname=Intel%20i915%20integrated%20graphics%20under%20Debian%3A%20how%20to%20get%20rid%20of%20sluggish%202D%20performance" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F02%2Fintel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html&amp;linkname=Intel%20i915%20integrated%20graphics%20under%20Debian%3A%20how%20to%20get%20rid%20of%20sluggish%202D%20performance" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F02%2Fintel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html&amp;linkname=Intel%20i915%20integrated%20graphics%20under%20Debian%3A%20how%20to%20get%20rid%20of%20sluggish%202D%20performance" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F02%2Fintel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html&amp;linkname=Intel%20i915%20integrated%20graphics%20under%20Debian%3A%20how%20to%20get%20rid%20of%20sluggish%202D%20performance" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F02%2Fintel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html&#038;title=Intel%20i915%20integrated%20graphics%20under%20Debian%3A%20how%20to%20get%20rid%20of%20sluggish%202D%20performance" data-a2a-url="https://bogdan.org.ua/2009/03/02/intel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html" data-a2a-title="Intel i915 integrated graphics under Debian: how to get rid of sluggish 2D performance"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/03/02/intel-i915-integrated-graphics-under-debian-how-to-get-rid-of-sluggish-2d-performance.html/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Installing new Debian systems with debootstrap</title><link>https://bogdan.org.ua/2009/02/26/installing-new-debian-systems-with-debootstrap.html</link> <comments>https://bogdan.org.ua/2009/02/26/installing-new-debian-systems-with-debootstrap.html#comments</comments> <pubDate>Thu, 26 Feb 2009 20:39:02 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[debootstrap]]></category> <category><![CDATA[linux]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=617</guid> <description><![CDATA[(&#8230;) it is a very useful tool for performing installations if you&#8217;ve got something like a LiveCD which supports your hardware. (&#8230;) Installing new Debian systems with debootstrap, and also as a debootstrap PDF (with comments).]]></description> <content:encoded><![CDATA[<blockquote><p>(&#8230;)<br
/> it is a very useful tool for performing installations if you&#8217;ve got something like a LiveCD which supports your hardware.<br
/> (&#8230;)</p></blockquote><p><a
href="http://www.debian-administration.org/articles/426"> Installing new Debian systems with debootstrap</a>, and also as a <a
href="http://bogdan.org.ua/wp-content/uploads/2009/02/debootstrap.pdf">debootstrap PDF</a> (with comments).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F02%2F26%2Finstalling-new-debian-systems-with-debootstrap.html&amp;linkname=Installing%20new%20Debian%20systems%20with%20debootstrap" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F02%2F26%2Finstalling-new-debian-systems-with-debootstrap.html&amp;linkname=Installing%20new%20Debian%20systems%20with%20debootstrap" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F02%2F26%2Finstalling-new-debian-systems-with-debootstrap.html&amp;linkname=Installing%20new%20Debian%20systems%20with%20debootstrap" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F02%2F26%2Finstalling-new-debian-systems-with-debootstrap.html&amp;linkname=Installing%20new%20Debian%20systems%20with%20debootstrap" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F02%2F26%2Finstalling-new-debian-systems-with-debootstrap.html&amp;linkname=Installing%20new%20Debian%20systems%20with%20debootstrap" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F02%2F26%2Finstalling-new-debian-systems-with-debootstrap.html&#038;title=Installing%20new%20Debian%20systems%20with%20debootstrap" data-a2a-url="https://bogdan.org.ua/2009/02/26/installing-new-debian-systems-with-debootstrap.html" data-a2a-title="Installing new Debian systems with debootstrap"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/02/26/installing-new-debian-systems-with-debootstrap.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to fix &#8220;MySQL server has gone away&#8221; (error 2006)</title><link>https://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html</link> <comments>https://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comments</comments> <pubDate>Thu, 25 Dec 2008 16:34:08 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[error]]></category> <category><![CDATA[fix]]></category> <category><![CDATA[mysql]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464</guid> <description><![CDATA[Source: George from vbulletin team. Two most common reasons (and fixes) for the MySQL server has gone away (error 2006) are: Server timed out and closed the connection. How to fix: check that wait_timeout variable in your mysqld&#8217;s my.cnf configuration file is large enough. On Debian: sudo nano /etc/mysql/my.cnf, set wait_timeout = 600 seconds (you [&#8230;]]]></description> <content:encoded><![CDATA[<p>Source: <a
href="http://www.vbulletin.com/forum/member.php?u=245" class="broken_link" rel="nofollow">George</a> from <a
href="http://www.vbulletin.com/forum/showthread.php?t=70410" class="broken_link" rel="nofollow">vbulletin team</a>.</p><p>Two most common reasons (and fixes) for the <strong>MySQL server has gone away (error 2006)</strong> are:</p><ol><li>Server timed out and closed the connection. How to fix: check that <strong>wait_timeout</strong> variable in your mysqld&#8217;s my.cnf configuration file is large enough. On Debian: <strong>sudo nano /etc/mysql/my.cnf</strong>, set <strong>wait_timeout = 600</strong> seconds (you can tweak/decrease this value when error 2006 is gone), then <strong>sudo /etc/init.d/mysql restart</strong>. I didn&#8217;t check, but the maximal value for <strong>wait_timeout</strong> might be around 28800 seconds (8 hours).</li><li>Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. You can increase the maximal packet size limit by increasing the value of <strong>max_allowed_packet</strong> in my.cnf file. On Debian: <strong>sudo nano /etc/mysql/my.cnf</strong>, set <strong>max_allowed_packet = 64M</strong> (you can tweak/decrease this value when error 2006 is gone), then <strong>sudo /etc/init.d/mysql restart</strong>.</li></ol><p>If you get <strong>MySQL server has gone away (error 2006)</strong> when using MySQL ODBC driver &#8211; give <a
href="http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-103489">this hint</a> a try.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F12%2F25%2Fhow-to-fix-mysql-server-has-gone-away-error-2006.html&amp;linkname=How%20to%20fix%20%E2%80%9CMySQL%20server%20has%20gone%20away%E2%80%9D%20%28error%202006%29" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F12%2F25%2Fhow-to-fix-mysql-server-has-gone-away-error-2006.html&amp;linkname=How%20to%20fix%20%E2%80%9CMySQL%20server%20has%20gone%20away%E2%80%9D%20%28error%202006%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F12%2F25%2Fhow-to-fix-mysql-server-has-gone-away-error-2006.html&amp;linkname=How%20to%20fix%20%E2%80%9CMySQL%20server%20has%20gone%20away%E2%80%9D%20%28error%202006%29" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F12%2F25%2Fhow-to-fix-mysql-server-has-gone-away-error-2006.html&amp;linkname=How%20to%20fix%20%E2%80%9CMySQL%20server%20has%20gone%20away%E2%80%9D%20%28error%202006%29" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F12%2F25%2Fhow-to-fix-mysql-server-has-gone-away-error-2006.html&amp;linkname=How%20to%20fix%20%E2%80%9CMySQL%20server%20has%20gone%20away%E2%80%9D%20%28error%202006%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2008%2F12%2F25%2Fhow-to-fix-mysql-server-has-gone-away-error-2006.html&#038;title=How%20to%20fix%20%E2%80%9CMySQL%20server%20has%20gone%20away%E2%80%9D%20%28error%202006%29" data-a2a-url="https://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html" data-a2a-title="How to fix “MySQL server has gone away” (error 2006)"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html/feed</wfw:commentRss> <slash:comments>54</slash:comments> </item> <item><title>Why I love Debian</title><link>https://bogdan.org.ua/2008/10/04/why-i-love-debian.html</link> <comments>https://bogdan.org.ua/2008/10/04/why-i-love-debian.html#comments</comments> <pubDate>Sat, 04 Oct 2008 14:54:22 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[FOSS]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[love]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=405</guid> <description><![CDATA[I love Debian, too. Though I prefer &#8216;testing&#8217; (which is currently codenamed Lenny) over &#8216;stable&#8217; (aka Etch).]]></description> <content:encoded><![CDATA[<p><img
src="http://bogdan.org.ua/wp-content/uploads/2008/10/debian-logo.png" alt="" title="Debian logo" width="100" height="123" class="alignleft size-medium wp-image-406" /><br
/> I <a
href="http://euneeblic.livejournal.com/165148.html">love Debian</a>, too.</p><p>Though I prefer &#8216;testing&#8217; (which is currently codenamed Lenny) over &#8216;stable&#8217; (<abbr
title="also known as">aka</abbr> Etch).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F04%2Fwhy-i-love-debian.html&amp;linkname=Why%20I%20love%20Debian" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F04%2Fwhy-i-love-debian.html&amp;linkname=Why%20I%20love%20Debian" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F04%2Fwhy-i-love-debian.html&amp;linkname=Why%20I%20love%20Debian" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F04%2Fwhy-i-love-debian.html&amp;linkname=Why%20I%20love%20Debian" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F04%2Fwhy-i-love-debian.html&amp;linkname=Why%20I%20love%20Debian" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F04%2Fwhy-i-love-debian.html&#038;title=Why%20I%20love%20Debian" data-a2a-url="https://bogdan.org.ua/2008/10/04/why-i-love-debian.html" data-a2a-title="Why I love Debian"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2008/10/04/why-i-love-debian.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Debian, fgl_glxgears: Using GLX_SGIX_pbuffer&#8230; Segmentation fault</title><link>https://bogdan.org.ua/2008/10/01/debian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html</link> <comments>https://bogdan.org.ua/2008/10/01/debian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html#comments</comments> <pubDate>Wed, 01 Oct 2008 16:17:34 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[3D]]></category> <category><![CDATA[ATI]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[driver]]></category> <category><![CDATA[hardware acceleration]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[OpenGL]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=401</guid> <description><![CDATA[If you get Segmentation fault when trying to run fgl_glxgears in your Debian desktop environment, most often this would mean that 3D acceleration isn&#8217;t enabled. For the case of ATI (and ATI Mobility) Radeon series, the easiest procedure would be (doing all as root, or prepending sudo to all commands): aptitude update, to ensure you&#8217;ve [&#8230;]]]></description> <content:encoded><![CDATA[<p>If you get Segmentation fault when trying to run <strong>fgl_glxgears</strong> in your Debian desktop environment, most often this would mean that 3D acceleration isn&#8217;t enabled.</p><p>For the case of ATI (and ATI Mobility) Radeon series, the easiest procedure would be (doing all as <strong>root</strong>, or prepending <strong>sudo</strong> to all commands):</p><ol><li><strong>aptitude update</strong>, to ensure you&#8217;ve got the list of latest packages</li><li><strong>aptitude install fglrx-driver fglrx-control fglrx-kernel-src</strong>, for the actual driver; I also installed <strong>fglrx-atieventsd</strong> and <strong>fglrx-glx</strong> (these are driver-recommended packages)</li><li><strong>aptitude install module-assistant</strong>, required for building the kernel module</li><li><strong>module-assistant prepare</strong>, to verify that you have everything needed for the module build procedure</li><li><strong>module-assistant update</strong></li><li><strong>module-assistant auto-install fglrx</strong>, to build and install the fglrx kernel module</li><li><strong>depmod -a</strong></li><li><strong>modprobe fglrx</strong>, to load the fglrx kernel module</li><li><strong>aticonfig &ndash;&ndash;initial</strong>, to configure ATI&#8217;s device section in /etc/X11/xorg.conf (for more options, see <strong>aticonfig &ndash;&ndash;help</strong>)</li><li><strong>reboot</strong></li></ol><p><span
id="more-401"></span><br
/> That should make your ATI hardware work as expected, and make <strong>fgl_glxgears</strong> show gears again.</p><p>If everything went fine, then your movies will play smoother ;), and the output of <strong>fglrxinfo</strong> will look similar to</p><blockquote><p>display: :0.0  screen: 0<br
/> OpenGL vendor string: ATI Technologies Inc.<br
/> OpenGL renderer string: ATI MOBILITY RADEON X600<br
/> OpenGL version string: 2.1.7769 Release</p></blockquote><p>This procedure should be also possible for the latest ATI-provided installer-generated Debian packages (as described elsewhere), but I decided to stick to the repository version &#8211; this requires no extra tweaking.</p><p>For much more information, see the <a
href="http://wiki.cchtml.com/index.php/Debian_Installation_Guide">ATI Debian Installation Guide</a>.</p><p>This post is based on the <a
href="http://www.linuxforums.org/forum/617305-post2.html">iwanabeguru&#8217;s response</a> at Linux Forums.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F01%2Fdebian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html&amp;linkname=Debian%2C%20fgl_glxgears%3A%20Using%20GLX_SGIX_pbuffer%E2%80%A6%20Segmentation%20fault" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F01%2Fdebian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html&amp;linkname=Debian%2C%20fgl_glxgears%3A%20Using%20GLX_SGIX_pbuffer%E2%80%A6%20Segmentation%20fault" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F01%2Fdebian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html&amp;linkname=Debian%2C%20fgl_glxgears%3A%20Using%20GLX_SGIX_pbuffer%E2%80%A6%20Segmentation%20fault" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F01%2Fdebian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html&amp;linkname=Debian%2C%20fgl_glxgears%3A%20Using%20GLX_SGIX_pbuffer%E2%80%A6%20Segmentation%20fault" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F01%2Fdebian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html&amp;linkname=Debian%2C%20fgl_glxgears%3A%20Using%20GLX_SGIX_pbuffer%E2%80%A6%20Segmentation%20fault" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2008%2F10%2F01%2Fdebian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html&#038;title=Debian%2C%20fgl_glxgears%3A%20Using%20GLX_SGIX_pbuffer%E2%80%A6%20Segmentation%20fault" data-a2a-url="https://bogdan.org.ua/2008/10/01/debian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html" data-a2a-title="Debian, fgl_glxgears: Using GLX_SGIX_pbuffer… Segmentation fault"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2008/10/01/debian-fgl_glxgears-using-glx_sgix_pbuffer-segmentation-fault.html/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>