<?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>Aaron Toponce &#187; Ubuntu</title>
	<atom:link href="http://pthree.org/category/linux/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://pthree.org</link>
	<description>Linux.  GNU.  Freedom.</description>
	<lastBuildDate>Sun, 06 May 2012 14:41:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta2-20489</generator>
		<item>
		<title>Install ZFS on Debian GNU/Linux</title>
		<link>http://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/</link>
		<comments>http://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 20:10:40 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2357</guid>
		<description><![CDATA[UPDATE (May 06, 2012): I apologize for mentioning it supports encryption. Pool version 28 is the latest source that the Free Software community has. Encryption was not added until pool version 30. So, encryption is not supported natively with the ZFS on Linux project. However, you can use LUKS containers underneath, or you can use [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE (May 06, 2012)</strong>: I apologize for mentioning it supports encryption. Pool version 28 is the latest source that the Free Software community has. Encryption was not added until pool version 30. So, encryption is not supported natively with the ZFS on Linux project. However, you can use LUKS containers underneath, or you can use Ecryptfs for the entire filesystem, which would still give you all the checksum, scrubbing and data integrity benefits of ZFS. Until Oracle gets their act together, and releases the current sources of ZFS, crypto is not implemented.</p>
<p>Quick post on installing ZFS as a kernel module, not FUSE, on Debian GNU/Linux. The documents already exist for getting this going, I&#8217;m just hoping to spread this to a larger audience, in case you are unaware that it exists.</p>
<p>First, the <a href="https://www.llnl.gov/">Lawrence Livermore National Laboratory</a> has been working on porting the native Solaris ZFS source to the Linux kernel as a kernel module. So long as the project remains under contract by the Department of Defense in the United States, I&#8217;m confident there will be continuous updates. You can track the progress of that porting at <a href="http://zfsonlinux.org">http://zfsonlinux.org</a>.</p>
<p>Now, download the SPL and ZFS sources. I&#8217;m running the latest RC, which seems to be quite stable:</p>
<pre>$ mkdir ~/src/{spl,zfs}
$ cd ~/src/spl
$ wget http://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc8.tar.gz
$ cd ~/src/zfs
$ wget http://github.com/downloads/zfsonlinux/zfs/zfs-0.6.0-rc8.tar.gz</pre>
<p>At this point, you will need to install the dependencies for SPL, then go ahead and compile and make the necessary .deb files:</p>
<pre>$ sudo aptitude install build-essential gawk alien fakeroot linux-headers-$(uname -r)
$ cd ~/src/spl
$ tar -xf spl-0.6.0-rc8.tar.gz
$ cd spl-0.6.0-rc8
$ ./configure
$ make deb
$ sudo dpkg -i *.deb</pre>
<p>Now do the same for ZFS:</p>
<pre>$ sudo aptitude install zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi
$ cd ~/src/zfs
$ tar -xf zfs-0.6.0-rc8.tar.gz
$ cd zfs-0.6.0-rc8
$ ./configure
$ make deb
$ sudo dpkg -i *.deb</pre>
<p>If you&#8217;re running Ubuntu, which I know most of you are, you can install the packages from the Launchpad PPA <a href="https://launchpad.net/~zfs-native">https://launchpad.net/~zfs-native</a>.</p>
<p><strong>A word of note:</strong> the manpages get installed to /share/man/. I found this troubling. You can modify your $MANPATH variable to include /share/man/man8/, or by creating symlinks, which is the approach I took:</p>
<pre># cd /usr/share/man/man8/
# ln -s /share/man/man8/zdb.8 zdb.8
# ln -s /share/man/man8/zfs.8 zfs.8
# ln -s /share/man/man8/zpool.8 zpool.8</pre>
<p>Now, make your zpool, and start playing:</p>
<pre>$ sudo zpool create test raidz sdd sde sdf sdg sdh sdi</pre>
<p>It is stable enough to run a ZFS root filesystem on a GNU/Linux installation for your workstation as something to play around with. It is copy-on-write, supports compression, deduplication, file atomicity, off-disk caching, <del datetime="2012-05-06T14:32:22+00:00">encryption,</del> and much more. At this point, unfortunately, I&#8217;m convinced that ZFS as a Linux kernel module will become &#8220;stable&#8221; long before Btrfs will be stable in the mainline kernel. Either way, it doesn&#8217;t matter to me. Both are Free Software, and both provide the long needed features we&#8217;ve needed with today&#8217;s storage needs. Competition is healthy, and I love having choice. Right now, that choice might just be ZFS.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Mount Raw Images</title>
		<link>http://pthree.org/2012/04/16/mount-raw-images/</link>
		<comments>http://pthree.org/2012/04/16/mount-raw-images/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 20:39:12 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2351</guid>
		<description><![CDATA[Just recently, I needed to mount a KVM raw image file, because it was depending on a network mount that was no longer accessible, and any attempts to interact with the boot process failed. So, rather than booting off a live CD, or some other medium, I decided to mount the raw image file. After [...]]]></description>
			<content:encoded><![CDATA[<p>Just recently, I needed to mount a KVM raw image file, because it was depending on a network mount that was no longer accessible, and any attempts to interact with the boot process failed. So, rather than booting off a live CD, or some other medium, I decided to mount the raw image file. After all, it is ext4.</p>
<p>However, mounting an image file means knowing where the root filesystem begins, which means knowing how to offset the mount, so you can access your data correctly. I used the following:</p>
<p>First, I setup a loop back device, so I could gather information about its partition setup:</p>
<pre># losetup /dev/loop0 virt01.img
# fdisk -l /dev/loop0

Disk /dev/loop0: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009bdb7

      Device Boot      Start         End      Blocks   Id  System
/dev/loop0p1        37943296    41940991     1998848   82  Linux swap / Solaris
/dev/loop0p2   *        2048    37943295    18970624   83  Linux

Partition table entries are not in disk order</pre>
<p>In this case, the virtual machine filesystem is 21.5 GB in size, in reads and writes in 512 byte blocks. Further, it appears as though swap occupies the second partition, while the ext4 root filesystem occupies the first, and begins at sector 2048, or byte 2048*512=1048576.</p>
<p>So, now I just need to tear down the loop back device, and create it again with an offset of 1048576 bytes, at which point, I should be able to mount the device:</p>
<pre># losetup -d /dev/loop0
# losetup /dev/loop0 virt01.img -o 1048576
# mount /dev/loop0 /mnt
# ls /mnt
bin/   home/            lib32/       mnt/   run/      sys/  vmlinuz@
boot/  initrd.img@      lib64/       opt/   sbin/     tmp/  vmlinuz.old@
dev/   initrd.img.old@  lost+found/  proc/  selinux/  usr/
etc/   lib/             media/       root/  srv/      var/</pre>
<p>At this point, I can edit my problematic /mnt/etc/fstab file to fix the troubled boot, and boot it up.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/04/16/mount-raw-images/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setup Network Interfaces in Debian</title>
		<link>http://pthree.org/2012/02/26/setup-network-interfaces-in-debian/</link>
		<comments>http://pthree.org/2012/02/26/setup-network-interfaces-in-debian/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 02:57:23 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2321</guid>
		<description><![CDATA[If you&#8217;re not using NetworkManager or Wicd, or some other similar tool to automatically manage your network interfaces for you, this post is for you. In the Debian world, you have a single file that manages your network interfaces. It can manage VLANs, bonded interfaces, virtual interfaces and more. You can establish rules on what [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re not using NetworkManager or Wicd, or some other similar tool to automatically manage your network interfaces for you, this post is for you. In the Debian world, you have a single file that manages your network interfaces. It can manage VLANs, bonded interfaces, virtual interfaces and more. You can establish rules on what the interface should do before brought online, what it can do while online, and what it can do after online. These same rules could be applied for taking the interface down as well. Let&#8217;s look at some of these.</p>
<p>First, let&#8217;s look at the basic setup for getting an interface online with DHCP. The file we&#8217;ll be looking at this entire time is the /etc/network/interfaces file:</p>
<pre>auto eth0
allow-hotplug eth0
iface eth0 inet dhcp</pre>
<p>The first line tells the kernel to bring the &#8220;eth0&#8243; interface up when the system boots. The second line tells the kernel to start the interface if a &#8220;hotplug&#8221; event is triggered. The third line defines the configuration of the &#8220;eth0&#8243; interface. In this case, it should use IPv4, and should request an IP address from a DHCP server. A static configuration could look like this:</p>
<pre>auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 10.19.84.2
    network 10.19.84.0
    gateway 10.19.84.1
    netmask 255.255.255.0</pre>
<p>The first two lines remain the same. In the third line, we have decided to use static addressing, rather than dynamic. Then, we followed through by configuring the interface. It&#8217;s important to note that the indentation is not required. I only indented it for my benefit.</p>
<p>What about bonding? Simple enough. Suppose you have 2 NICs, one on the motherboard, and other in a PCI slot, and you want to ensure high availability, should the PCI card die. Then you could do something like this:</p>
<pre>auto eth0
iface eth0 inet manual
    post-up ifconfig $IFACE up
    pre-down ifconfig $IFACE down

auto eth1
iface eth1 inet manual
    post-up ifconfig $IFACE up
    pre-down ifconfig $IFACE down

auto bond0
iface bond0 inet static
    bond-slaves eth0 eth1
    # LACP configuration
    bond_mode 802.3ad
    bond_miimon 100
    bond_lcap_rate faste
    bond_xmit_hash_policy layer2+3
    address 10.19.84.2
    network 10.19.84.0
    gateway 10.19.84.1
    netmask 255.255.255.0</pre>
<p>Technically, I don&#8217;t need to tell the kernel to bring up interfaces eth0 and eth1, if I tell the kernel to bring up bond0, and slave the eth0 and eth1 interfaces. But, this configuration illustrates some points. First, there are the pre-up, up, post-up, pre-down, down, and post-down commands that you can use in your network interfaces(5) file. Each does something to the interface at different times during the configuration. Also notice I&#8217;m using the $IFACE variable. There are others that exist, that allow you to create scripts for your interfaces. See <a href="http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_scripting_with_the_ifupdown_system">http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_scripting_with_the_ifupdown_system</a> for more information.</p>
<p>On the bonded interface, I&#8217;m putting in two slaves, then setting some bonding configuration that I want, such as using 802.3ad mode. Of course, the interface is static, so I provided the necessary information.</p>
<p>What if we wanted to add our bonded interface to a VLAN? Simple. Just append a dot &#8220;.&#8221; and the VLAN number you want the interface in. Like so:</p>
<pre>auto bond0
iface bond0 inet manual
    bond-slaves eth0 eth1
    # LACP configuration
    bond_mode 802.3ad
    bond_miimon 100
    bond_lcap_rate faste
    bond_xmit_hash_policy layer2+3

auto bond0.42
iface bond0.42 inet static
    address 10.19.84.2
    network 10.19.84.0
    gateway 10.19.84.1
    netmask 255.255.255.0
    # necessary due to a bonding bug in vlan tools
    vlan-raw-device bond0</pre>
<p>Bring the interface up, the verify that the kernel has assigned it to the right VLAN:</p>
<pre>$ sudo cat /proc/net/vlan/config
VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
bond0.42        | 42  | bond0</pre>
<p>Notice that I specified &#8220;vlan-raw-device bond0&#8243;. This is due to a bonding bug in the VLAN tools, where merely specifying which VLAN the interface should be in by its name is not enough. You must also tell the kernel the bonded interface that the VLAN interface should be in.</p>
<p>How about bridged devices:</p>
<pre>auto bond0
iface bond0 inet manual
    bond-slaves eth0 eth1
    # LACP configuration
    bond_mode 802.3ad
    bond_miimon 100
    bond_lcap_rate faste
    bond_xmit_hash_policy layer2+3

auto bond0.42
iface bond0.42 inet manual
    post-up ifconfig $IFACE up
    pre-down ifconfig $IFACE down
    # necessary due to a bonding bug in vlan tools
    vlan-raw-device bond0

auto br42
iface br42 inet static
    bridge_ports bond0.42
    address 10.19.84.1
    netmask 255.255.255.0
    network 10.19.84.0
    gateway 10.19.84.1</pre>
<p>The only new thing here is the &#8220;bridge_ports&#8221; command. In this case, our bridged device is bridging our bond0.42 interface, which is in VLAN 42. Imagine having a KVM or Xen hypervisor that has a guest that needs to be in several VLANs. How would you setup all those bridges? Simple. Just create a VLAN interface for each VLAN, then create a bridge for each bonded interface in that VLAN.</p>
<p>Lastly, what about virtual IPs? I&#8217;ve heard that you can assign multiple IP addresses to a single NIC. How do you set that up? Simple. Just add a colon &#8220;:&#8221; the append a unique number. For example, say I have only one NIC, but wish to have 2 IP addresses, each in different networks:</p>
<pre>auto eth0
iface eth0 inet static
    address 10.19.84.2
    netmask 255.255.255.0
    network 10.19.84.0
    gateway 10.19.84.1

auto eth0:1
iface eth0:1 inet static
    address 10.13.37.2
    netmask 255.255.255.0
    network 10.13.37.0</pre>
<p>It&#8217;s important to note that you generally only need one default gateway to get out. Your kernel will route packets accordingly. If you must specify multiple gateways, then you must manually make edits to the kernel&#8217;s routing table, if everything isn&#8217;t setup correctly.</p>
<p>Of course, we could combine everything we learned here. See if you can make out what each interface is doing:</p>
<pre>auto eth0
iface eth0 inet manual
    pre-up ifconfig $IFACE up
    post-down ifconfig $IFACE down

auto eth1
iface eth1 inet manual
    pre-up ifcanfig $IFACE up
    post-down ifconfig $IFACe down

auto bond0
iface bond0 inet manual
    bond-slaves eth0 eth1 eth2 eth3
    # LACP configuration
    bond_mode 802.3ad
    bond_miimon 100
    bond_lacp_rate faste
    bond_xmit_hash_policy layer2+3

auto bond0.42
iface bond0.42 inet static
    address 10.19.84.2
    netmask 255.255.255.0
    netwark 10.19.84.0
    gateway 10.19.84.1
    # necessary due to a bonding up in vlan tools
    vlan-raw-device bond0

auto bond0.42:1
iface bond0.42:1 inet manual
    pre-up ifconfig $IFACE up
    post-down ifconfig $IFACE down
    # necessary due to a bonding bug in vlan tools
    vlan-raw-device bond0

auto br42
iface br42 inet static
    bridge_ports bond0.42:1
    address 10.13.37.2
    netmask 255.255.255.0
    network 10.13.37.0</pre>
<p>Lastly, MTU. There is a lot of misinformation out there about frame size. In my professional experience, setting the MTU to 9000 bytes does not result in improved performance. Not noticeably at least. But it does have an effect on the CPU. Setting a larger frame size can result in much lower CPU usage, both on the switch, and in your box. However, some protocols, such as UDP, might break with a 9k MTU. So, use appropriately. At any event, here is how I generally set my MTU when dealing with multiple interfaces:</p>
<pre>auto eth0
iface eth0 inet manual
    pre-up ifconfig $IFACE up
    post-down ifconfig $IFACE down
    mtu 9000

auto eth1
iface eth1 inet manual
    pre-up ifcanfig $IFACE up
    post-down ifconfig $IFACe down
    mtu 9000

auto bond0
iface bond0 inet manual
    bond-slaves eth0 eth1
    # LACP configuration
    bond_mode 802.3ad
    bond_miimon 100
    bond_lacp_rate faste
    bond_xmit_hash_policy layer2+3
    mtu 9000

auto bond0.42
iface bond0.42 inet static
    address 10.19.84.2
    netmask 255.255.255.0
    network 10.19.84.0
    gateway 10.19.84.1
    mtu 9000
    # necessary due to a bug in vlan tools
    vlan-raw-device bond0

auto bond0.43
iface bond0.43 inet static
    address 10.13.37.2
    netmask 255.255.255.0
    network 10.13.37.0
    mtu 1500
    # necessary due to a bug in vlan tools
    vlan-raw-device bond0</pre>
<p>Note that I set the MTU to 9000 on all interfaces except for bond0.43, which is 1500. This is perfectly acceptable. In all reality, setting the MTU to 1500 on bond0.43 is just capping what bond0 can really do. But, it is important to set the MTU on each interface, otherwise the frame size of 1500 bytes will get set, and you&#8217;ll end up chopping up your packets anyway. You must also set the MTU to 9000 on the switch ports as well, and any other server and interfaces that you want jumbo frames on.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2012/02/26/setup-network-interfaces-in-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Salt Packaged For Debian/Ubuntu</title>
		<link>http://pthree.org/2011/09/29/salt-packaged-for-debianubuntu/</link>
		<comments>http://pthree.org/2011/09/29/salt-packaged-for-debianubuntu/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 15:04:33 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2073</guid>
		<description><![CDATA[I created a Debian package for Salt, doing my best to adhere to the Debian Policy. You can find it at http://mentors.debian.net/package/salt. If you&#8217;re not familiar with Salt, head over to http://saltstack.org and check it out. From the author&#8217;s website: Salt is a powerful remote execution manager that can be used to administer servers in [...]]]></description>
			<content:encoded><![CDATA[<p>I created a Debian package for Salt, doing my best to adhere to the <a href="http://www.debian.org/doc/debian-policy/">Debian Policy</a>. You can find it at <a href="http://mentors.debian.net/package/salt">http://mentors.debian.net/package/salt</a>. If you&#8217;re not familiar with Salt, head over to <a href="http://saltstack.org">http://saltstack.org</a> and check it out. From the author&#8217;s website:</p>
<blockquote><p>Salt is a powerful remote execution manager that can be used to administer servers in a fast and efficient way.</p>
<p>Salt allows commands to be executed across large groups of servers. This means systems can be easily managed, but data can also be easily gathered. Quick introspection into running systems becomes a reality.</p>
<p>Remote execution is usually used to set up a certain state on a remote system. Salt addresses this problem as well, the salt state system uses salt state files to define the state a server needs to be in.</p>
<p>Between the remote execution system, and state management Salt addresses the backbone of cloud and data center management.</p></blockquote>
<p>Think Puppet on steroids. And done correctly.</p>
<p>At any event, yes, I&#8217;m looking for a Debian Developer to sponsor me getting it into Debian proper. If you are an Ubuntu Developer, and could help sponsor me getting it into Ubuntu as well, that would be awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/09/29/salt-packaged-for-debianubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Properly Create And Burn CD/DVD ISO Images From The Command Line</title>
		<link>http://pthree.org/2011/09/26/how-to-properly-create-and-burn-cddvd-iso-images-from-the-command-line/</link>
		<comments>http://pthree.org/2011/09/26/how-to-properly-create-and-burn-cddvd-iso-images-from-the-command-line/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 02:59:31 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2067</guid>
		<description><![CDATA[Too often, I see the recommendation on forums, IRC, and elsewhere across the internet to use improper tools for creating ISO images. For example, consider the following two commands, both of which are not the correct way to build a CD/DVD image: $ dd if=/dev/scd0 of=cdimage.iso # NO! Or worse yet: $ cat /dev/scd0 > [...]]]></description>
			<content:encoded><![CDATA[<p>Too often, I see the recommendation on forums, IRC, and elsewhere across the internet to use improper tools for creating ISO images. For example, consider the following two commands, both of which are not the correct way to build a CD/DVD image:</p>
<pre>$ dd if=/dev/scd0 of=cdimage.iso # NO!</pre>
<p>Or worse yet:</p>
<pre>$ cat /dev/scd0 > cdimage.iso # NO!</pre>
<p>As you are probably thinking, the problem with the two commands above, is that they provide no error checking while building the image. So, in order to make sure you have all the bits, you need to use another tool, such as using the MD5 hashing algorithm:</p>
<pre>$ md5sum /dev/scd0 cdimage.iso
d642d524dd2187834a418710001bbf82  /dev/cdrom
d642d524dd2187834a418710001bbf82  cdimage.iso</pre>
<p>Thankfully, the hashes above match. But, what if they didn&#8217;t? Then, you get to redo your dd(1) command (or, shudder, cat(1)) from above, and then rerun md5sum(1) to make sure you got all the bits. Doesn&#8217;t sound like much fun to me. Thankfully, there is a better way, one which handles the checksum while doing the copy.</p>
<p>You want to use readom(1) (&#8220;read optical media&#8221;) from the wodim(1) (&#8220;write optical disk media&#8221;) package. Consider the following command:</p>
<pre>$ readom dev=/dev/scd0 f=cdimage.iso # YES!</pre>
<p>If readom(1) fails to get the bits during the copy, it will let you know that it&#8217;s struggling. If it got all the bits, you know you have them all, because of the error checking during the copy. Sure will save you a lot of time running manual hashes when finished.</p>
<p>Now, what about burning a copy of the ISO image? Surely you use dd(1), yes? Something like:</p>
<pre>$ dd if=cdimage.iso of=/dev/scd0 # NO!</pre>
<p>NO! Instead, use wodim(1) directly:</p>
<pre>$ wodim -v -eject cdimage.iso # YES!</pre>
<p>For the same reasons that you want to use readom(1) for creating ISO images from CD/DVD, you want to use wodim(1) for burning ISO images to CD/DVD. What happens if after using dd(1) to create your CD/DVD, the md5sum(1) hash doesn&#8217;t line up with the image? You didn&#8217;t get all the bits, and created a coaster. Use wodim(1) and should it succeed, you can rest assured that you have all the bits.</p>
<p>So, remember, readom(1) and wodim(1) are the tools you want when creating and/or burning ISO images from the command line. Any other tool, and you&#8217;re likely doing it wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/09/26/how-to-properly-create-and-burn-cddvd-iso-images-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Avoid Using which(1)</title>
		<link>http://pthree.org/2011/09/26/avoid-using-which1/</link>
		<comments>http://pthree.org/2011/09/26/avoid-using-which1/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 11:30:40 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2054</guid>
		<description><![CDATA[This post comes from BashFAQ/081 on Greg&#8217;s Wiki. He argues why you should not be using which(1) to determine if a command is in your $PATH at the end of the page. I&#8217;ll put that argument at the front: The command which(1) (which is often a csh script, although sometimes a compiled binary) is not [...]]]></description>
			<content:encoded><![CDATA[<p>This post comes from <a href="http://mywiki.wooledge.org/BashFAQ/081">BashFAQ/081</a> on Greg&#8217;s Wiki. He argues why you <strong>should not</strong> be using which(1) to determine if a command is in your $PATH at the end of the page. I&#8217;ll put that argument at the front:</p>
<blockquote><p>The command which(1) (which is often a csh script, although sometimes a compiled binary) is <strong>not reliable</strong> for this purpose. which(1) may not set a useful exit code, and it may not even write errors to stderr. Therefore, in order to have a prayer of successfully using it, one must parse its output (wherever that output may be written).</p>
<p>Note that which(1)&#8217;s output when a command is not found is not consistent across platforms. On HP-UX 10.20, for example, it prints &#8220;no qwerty in /path /path /path &#8230;&#8221;; on OpenBSD 4.1, it prints &#8220;qwerty: Command not found.&#8221;; on Debian (3.1 through 5.0 at least) and SuSE, it prints nothing at all; on Red Hat 5.2, it prints &#8220;which: no qwerty in (/path:/path:&#8230;)&#8221;; on Red Hat 6.2, it writes the same message, but on standard error instead of standard output; and on Gentoo, it writes something on stderr.</p></blockquote>
<p>(Quotation and manpage reference additions mine). So, if which(1) is bad news, then what is the &#8220;proper&#8221; way to determine if a command is in your $PATH? Well POSIX has an answer, and not surprisingly, the command to use is &#8220;command&#8221;:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># POSIX</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">command</span> <span style="color: #660033;">-v</span> qwerty <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty exists<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty does not exist<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p>The &#8220;command&#8221; built-in also returns true for shell built-ins. If you absolutely must check only PATH, the only POSIX way is to iterate over it:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># POSIX</span><br />
IsInPath <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">2</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-f</span>; <span style="color: #007800;">IFS</span>=:<br />
&nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">dir</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$PATH</span>; <span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$dir</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;">dir</span>=. <span style="color: #666666; font-style: italic;"># Legacy behaviour</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-x</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$dir</span>/$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">return</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">done</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span><br />
<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> IsInPath qwerty; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty exists<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty does not exist<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p>There are also Bash built-ins that can be used, should you have Bash installed on your system:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Bash using the 'hash' built-in</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">hash</span> qwerty <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty exists<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty does not exist<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p>Or:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Bash using the 'type' built-in</span><br />
<span style="color: #666666; font-style: italic;"># type -P forces a PATH search, skipping builtins and so on</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #660033;">-P</span> qwerty <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty exists<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty does not exist<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p>If you prefer the ZSH (my addition not present in the wiki), as I do, then you can look in the $commands associative array:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># ZSH using the $commands associative array</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$commands</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>qwerty<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty exists<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> qwerty does not exist<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p>I like that at the end of the FAQ, he gives a shell script for using which(1) should it be absolutely necessary. Not only do you have to test for exit code, but you also have to test for common strings in the output, seeing as though which(1) doesn&#8217;t always use exit codes properly:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Bourne. &nbsp;Last resort -- using which(1)</span><br />
<span style="color: #007800;">tmpval</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">LC_ALL</span>=C <span style="color: #c20cb9; font-weight: bold;">which</span> qwerty <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #007800;">$rc</span> <span style="color: #660033;">-ne</span> <span style="color: #000000;">0</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; <span style="color: #666666; font-style: italic;"># FOR NOW, we'll assume that if this machine's which(1) sets a nonzero</span><br />
&nbsp; <span style="color: #666666; font-style: italic;"># exit status, that it actually failed. &nbsp;I've yet to see any case where</span><br />
&nbsp; <span style="color: #666666; font-style: italic;"># which(1) sets an erroneous failure -- just erroneous &quot;successes&quot;.</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;qwerty is not installed. &nbsp;Please install it.&quot;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># which returned 0, but that doesn't mean it succeeded. &nbsp;Look for known error strings.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$tmpval</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">*</span>no\ <span style="color: #000000; font-weight: bold;">*</span>\ <span style="color: #000000; font-weight: bold;">in</span>\ <span style="color: #000000; font-weight: bold;">*|*</span>not\ found<span style="color: #000000; font-weight: bold;">*|</span><span style="color: #ff0000;">''</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;qwerty is not installed. &nbsp;Please install it.&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Congratulations -- it seems you have qwerty (in <span style="color: #007800;">$tmpval</span>).&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">esac</span><br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p><strong>CONCLUSION:</strong><br />
You have many options to find whether or not a command exists in your $PATH, some POSIX, some proper built-ins. Regardless, you should be able to build platform-independent scripts using the proper tools, and using which(1) is not the right tool for the job. Hopefully, this has convinced you of that.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/09/26/avoid-using-which1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Poll: Have You Ever Used A Floppy Disk?</title>
		<link>http://pthree.org/2011/05/15/poll-have-you-ever-used-a-floppy-disk/</link>
		<comments>http://pthree.org/2011/05/15/poll-have-you-ever-used-a-floppy-disk/#comments</comments>
		<pubDate>Mon, 16 May 2011 00:39:36 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1899</guid>
		<description><![CDATA[This post is a quickie to see what the current generation is like these days. I&#8217;m an old fart (not as old as many reading this post), but I remember when 5 1/4&#8243; floppy drives were &#8220;standard&#8221;, and 3 1/2&#8243; were the new fad. Then came Iomega Jazz drives, and the like. CDRW hit the [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a quickie to see what the current generation is like these days. I&#8217;m an old fart (not as old as many reading this post), but I remember when 5 1/4&#8243; floppy drives were &#8220;standard&#8221;, and 3 1/2&#8243; were the new fad. Then came Iomega Jazz drives, and the like. CDRW hit the scene, never really went far, then USB storage was here, and here to stay.</p>
<p>At any event, in graphical user interfaces, you&#8217;ll see floppy disks that represent saving a file to disk. It&#8217;s very, very common, yet <a href="http://i.imgur.com/vBIC1.png">I doubt many of the younger generation has ever used one</a>. So, how are they supposed to know what it does?</p>
<p>So, here&#8217;s a poll for you to take. You&#8217;ll need to take the poll at my site, as it uses Ajax calls to the page, which means it won&#8217;t work in your RSS reader, or on any other site. I&#8217;m just curious to see what falls out.</p>
<div>
	<div class='democracy'>
		<strong class="poll-question">Have you ever used a floppy disk?</strong>
		<div class='dem-results'>
		<form action='http://pthree.org/wp-content/plugins/democracy/democracy.php' onsubmit='return dem_Vote(this)'>
		<ul>
			<li>
					<input type='radio' id='dem-choice-38' value='38' name='dem_poll_7' />
					<label for='dem-choice-38'>Yes, and I STILL use them!</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-39' value='39' name='dem_poll_7' />
					<label for='dem-choice-39'>Yes, but not anymore.</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-40' value='40' name='dem_poll_7' />
					<label for='dem-choice-40'>No, but I've physically seen one.</label>
			</li>
			<li>
					<input type='radio' id='dem-choice-41' value='41' name='dem_poll_7' />
					<label for='dem-choice-41'>What's a floppy disk?</label>
			</li>
		</ul>
			<input type='hidden' name='dem_poll_id' value='7' />
			<input type='hidden' name='dem_action' value='vote' />
			<input type='submit' class='dem-vote-button' value='Vote' />
			<a href='/category/linux/ubuntu/feed/?dem_action=view&amp;dem_poll_id=7' onclick='return dem_getVotes("http://pthree.org/wp-content/plugins/democracy/democracy.php?dem_action=view&amp;dem_poll_id=7", this)' rel='nofollow' class='dem-vote-link'>View Results</a>
		</form>
		</div>
	</div></div>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/05/15/poll-have-you-ever-used-a-floppy-disk/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Why Unix Is Superior</title>
		<link>http://pthree.org/2011/03/27/why-unix-is-superior/</link>
		<comments>http://pthree.org/2011/03/27/why-unix-is-superior/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 04:34:20 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1834</guid>
		<description><![CDATA[Quick post, outlining what I think makes the Unix family of operating systems superior, including &#8220;unix-like&#8221; operating systems such as GNU/Linux, BSD, and others. Of course, the list isn&#8217;t exhaustive- it&#8217;s just something I threw together in 10 minutes. The motivation of the post was a discussion in ##unix on Freenode. The command line interface. [...]]]></description>
			<content:encoded><![CDATA[<p>Quick post, outlining what I think makes the Unix family of operating systems superior, including &#8220;unix-like&#8221; operating systems such as GNU/Linux, BSD, and others. Of course, the list isn&#8217;t exhaustive- it&#8217;s just something I threw together in 10 minutes. The motivation of the post was a discussion in 	<a href="irc://irc.freenode.net/##unix">##unix on Freenode</a>.</p>
<ol>
<li>The command line interface.</li>
<li>Various shells, including their script syntax.</li>
<li>Builtin programming language support for many languages.</li>
<li>Common Unix utilities, such as grep, rsync, ssh, lsof, and others.</li>
<li>All the supported filesystems (ZFS, Ext4, Reiser, UFS, etc.).</li>
<li>Overall rock-solid stability and reliability.</li>
<li>Lack of viruses, trojans, and other malware.</li>
<li>Tremendous networking capabilities (PPoE, TCP/IP, etc.).</li>
<li>Bulletproof firewall software.</li>
<li>Overall builtin security in general (MACs, PAM, etc.).</li>
<li>Quality user/group management.</li>
<li>System resource usage.</li>
<li>Both vertical and horizontal scaling.</li>
<li>Portability.</li>
<li>Plain text configuration files.</li>
<li>Open source kernel and user-space software.</li>
<li>Based on standards (POSIX, FHS, LSB, etc.).</li>
<li>Vast selection of software choices (various text editors, MUAs, etc.)</li>
<li>Simplicity in software design- do one thing, and do it well.</li>
<li>Mind-blowing hardware support.</li>
<li>Support for hundreds of languages and locales out of the box.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/03/27/why-unix-is-superior/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Various Ways To Shred A Drive</title>
		<link>http://pthree.org/2011/03/09/various-ways-to-shred-a-drive/</link>
		<comments>http://pthree.org/2011/03/09/various-ways-to-shred-a-drive/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 05:00:21 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1793</guid>
		<description><![CDATA[I&#8217;ve been tasked at work with shredding drives. Not physically, mind you, but digitally. Usually, I grab a copy of the latest version of Knoppix, boot up, pull up a terminal, and grab GNU Shred. Something like: shred -n 3 -v /dev/sda It works well enough. However, it doesn&#8217;t display a real useful progress meter, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been tasked at work with shredding drives. Not physically, mind you, but digitally. Usually, I grab a copy of the latest version of Knoppix, boot up, pull up a terminal, and grab GNU Shred. Something like:</p>
<pre>shred -n 3 -v /dev/sda</pre>
<p>It works well enough. However, it doesn&#8217;t display a real useful progress meter, other than how far it&#8217;s done in the wipe, thus leaving it up to you to figure out the speed, while filling up your back scroll in the process. There must be a better way.</p>
<p>I used to &#8220;<a href="http://pthree.org/2008/08/17/digital-graffiti/">leave my mark</a>&#8221; (much like a dog marks a fire hydrant), however, this is quite slow. There are other methods, such as using /dev/urandom, but the entropy from urandom relies on SHA1. While fast, it&#8217;s not the speed demon that is AES or other algorithms. There&#8217;s /dev/zero, but how do I get random bits from zeros? And more importantly, does it push the drive to it&#8217;s bandwidth threshold? Of course, I&#8217;ve heard about DBAN, but I&#8217;ve had issues with it booting on certain hardware. Lastly, I would like to have a good progress meter as the data goes down on the drive.</p>
<p>Here&#8217;s a solution that a friend of mine in an IRC channel suggested:</p>
<pre>openssl enc -aes128 -k "foo" &lt; /dev/zero | pv -trb &gt; /dev/sda</pre>
<p>The great thing with this command is two fold:</p>
<ol>
<li>It&#8217;s fast. It pushes the drive to as fast as it can write data.</li>
<li>It provides a convenient progress meter with &#8220;pv&#8221;</li>
</ol>
<p>Again, I&#8217;m shredding drives with pseudorandom data. I&#8217;m not too concerned about the security of the bits going down on the platter. Per corporate regulation, I need to do 3 passes, and I&#8217;m confident that the bits coming out of the pipe from OpenSSL using AES-128 will be sufficient. So, for doing 3 passes, I can script it easily enough:</p>
<pre>for I in 1 2 3; do
    openssl enc -aes128 -k "$I" &lt; /dev/zero | pv -trb &gt; /dev/sda
done</pre>
<p>That works. 1 drive down, 24 to go&#8230;</p>
<p>If you have various ways you shred your drive, let me know, and I&#8217;ll post it below.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/03/09/various-ways-to-shred-a-drive/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Cloning Debian System Packages</title>
		<link>http://pthree.org/2010/08/19/cloning-debian-system-packages/</link>
		<comments>http://pthree.org/2010/08/19/cloning-debian-system-packages/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 09:43:55 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1444</guid>
		<description><![CDATA[Just over the past couple of weeks, I have done a few Debian GNU/Linux installations for various people, including myself. I am a minimalist. I like to have installed on my system only exactly what I specify. However, I&#8217;m also a realist, and know that Debian has likely chosen sane defaults in the installer when [...]]]></description>
			<content:encoded><![CDATA[<p>Just over the past couple of weeks, I have done a few Debian GNU/Linux installations for various people, including myself. I am a minimalist. I like to have installed on my system only exactly what I specify. However, I&#8217;m also a realist, and know that Debian has likely chosen sane defaults in the installer when choosing whether or not to install the Desktop or Laptop selections. For servers, I do only a base install, then install OpenSSH, and whatever else is necessary for the server.</p>
<p>So, when installing on a desktop or laptop, I&#8217;m slightly annoyed by the default package sets that are installed. I understand why they&#8217;re chosen, and I&#8217;m definitely not arguing with the decisions made, however, some of the packages just aren&#8217;t for me. So, on my wiki, I&#8217;ve been documenting what should be installed and removed on every Debian GNU/Linux installation I make. As soon as the install finishes, I&#8217;ll login to the system, pull up my wiki, and copy and paste the following commands as root (trying to keep the horizontal scrolling in your browser to a minimum):</p>
<pre># aptitude install abiword apt-file checkconfig chromium-browser clusterssh deborphan flashplugin-nonfree git-core \
gmrun gnumeric htop network-manager openbox openssh-server python-docutils rst2pdf screen tango-icon-theme \
vim vim-gnome xfce4 xfce4-icon-theme xfce4-terminal xscreensaver-data-extra zsh zsh-doc</pre>
<pre># aptitude purge dasher gnome-accessibility gnome-accessibility-themes gnome-mag gnome-orca gok nano \
openoffice.org{,-base,-base-core,-calc,-common,-core,-draw,-emailmerge,-evolution,-filter-binfilter,-filter-mobiledev} \
openoffice.org{-gcj,-gnome,-gtk,-help-en-us,-impress,-java-common,-math,-officebean,-style-galaxy,-style-tango,-thesaurus-en-us,-writer} \
xserver-xorg-input-{all,synaptics,wacom} xserver-xorg-video-{all,apm,ark,ati,chips,cirrus,fbdev,i128,i740,intel,mach64,mga,neomagic} \
xserver-xorg-video-{noveau,nv,openchrome,r128,radeon,radeonhd,rendition,s3,s3virge,savage,siliconmotion,sis,sisusb,tdfx,trident,tseng,v4l,voodoo}</pre>
<p>First, I will identify which xserver-xorg-video driver I&#8217;ll need for the hardware I&#8217;m installing to, and remove that from the purge, even though the VESA driver always works just fine for me, as I&#8217;m certainly no gamer, and it&#8217;s never let me down in my desire to power any video card at any resolution and frequency I&#8217;ve encountered. I&#8217;ll also leave the Synaptics driver in place when installing to a laptop.</p>
<p>Second, I realize that this isn&#8217;t for everybody. Most people won&#8217;t care about having OpenOffice.org or the GNOME accessibility packages installed. I don&#8217;t need them, they free up hard drive space for me, and when running updates, downloads are much faster. So, this works for me.</p>
<p>Lastly, I have a hard time deciding between using GNOME and Openbox for my default desktop. I like the GDM for logging in, and I like the power management features that GNOME brings to the table. However, I like the minimalist approach to Openbox, and its configuration capabilities. I login to both from time-to-time, just in case you noticed that I&#8217;m installing Openbox, but also removing GNOME packages that would only come from a default GNOME install.</p>
<p>I&#8217;ve gotten tired of executing this on every install, and wondered if there was something more I could do. So, <a href="http://identi.ca/notice/46660961">I mentioned my frustration on Identi.ca</a>, not really looking for a reply, but <a href="http://identi.ca/notice/46667461">one came through</a> at any event (<a href="http://identi.ca/conversation/46304157#notice-46660961">thread here</a>). The reply was to use DPKG to get a list of the software that is installed when I&#8217;m finished with my install and purge, then use that list during the next install.</p>
<p>So, how to do this? Well, after you have your system installed the way you want, with all the packages installed and purged to suit your needs, run the following command:</p>
<pre>$ dpkg --get-selections \* > packages.txt</pre>
<p>You now have a text file with all the packages that are installed on your system. So, when doing a fresh Debian install at a later date, it&#8217;s trivial to get these packages installed, so I don&#8217;t have to do the install and purge copy/paste that I was doing before. After installing only the base, and nothing more, login to the system, copy the packages.txt file you created via SCP or some other method to the filesystem, and run the following commands (as root):</p>
<pre># apt-get update
# dpkg --set-selections < packages.txt
# apt-get -u dselect-upgrade</pre>
<p>You now have your system installed with exactly the packages you want installed, and nothing more. Not only that, but the latest version as well. No need to update after you login (Windows, you could learn something here).</p>
<p>To me, this is beautiful. This is a simplistic way to clone a Debian system, without using utilities like Norton Ghost or CloneZilla, either though both have their place in administration. I just love the simplicity and elegance of this. To me, this makes administration fun. When I can solve simple problems with core system tools, I'm a happy admin.</p>
<p>Long live Debian.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/08/19/cloning-debian-system-packages/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>7 Reasons Why I Have NOT Switched To Google Chrome From Firefox</title>
		<link>http://pthree.org/2009/10/12/7-reasons-why-i-have-not-switched-to-google-chrome-from-firefox/</link>
		<comments>http://pthree.org/2009/10/12/7-reasons-why-i-have-not-switched-to-google-chrome-from-firefox/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 04:45:04 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1138</guid>
		<description><![CDATA[I just finished reading 7 Reasons Why I Switched to Google Chrome from Firefox. I found the article a bit on the fanboy side, and I&#8217;ll address each of his points here, while also saying my reasons why I&#8217;m still holding on to the Firefox browser as my default browser. First, Andrew mentions that Google [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished reading <a href="http://webstudio13.com/2009/10/02/7-reasons-why-i-switched-to-google-chrome-from-firefox/">7 Reasons Why I Switched to Google Chrome from Firefox</a>. I found the article a bit on the fanboy side, and I&#8217;ll address each of his points here, while also saying my reasons why I&#8217;m still holding on to the Firefox browser as my default browser.</p>
<p>First, Andrew mentions that Google Chrome has a &#8220;much faster loading time&#8221;. I have Google Chrome installed on both my work laptop running Windows XP and two of my GNU/Linux machines, one running Ubuntu 9.04, the other running Debian Sid. In all three cases, Google Chrome does launch from cold boot noticeably faster than Firefox, but the daily web browsing is not so noticeable. Unless I&#8217;m benchmarking the two browsers side-by-side, which is really only good for showing benchmarks, I don&#8217;t see any recognizable differences in speed when rendering HTML, CSS or JavaScript. I&#8217;ve used both Chrome and Firefox with Gmail, Google Wave, and many, many other processor-intensive sites, and I see no such conclusion that Chrome has a &#8220;much faster loading time&#8221; versus Firefox, who is making the web a slow experience.</p>
<p>Second, he addresses that Chrome doesn&#8217;t crash. Funny you say that. I&#8217;ve had both the stable version running on Windows XP and the unstable version running on GNU/Linux tank very recently. It only happened once, in both operating systems, and I have not been able to reproduce it, but it wasn&#8217;t just a tab failure. The whole browser went south. I honestly don&#8217;t even know what happened, but I do know what I was doing, and what was lost, but I&#8217;ll address that in a second.</p>
<p>Thirdly, he likes some of the snazzy tab features with Chrome. It&#8217;s apparent though, that the features he addresses in Chrome also exist in vanilla Firefox 3.5, such as the ability close all tabs other than the open tab (right-click the open tab, select &#8220;Close other tabs&#8221;). I do wish Firefox would get closing tab order and tab placement correct though. It does bother me that when I open a link in a new tab, it doesn&#8217;t open the tab right next to the current, and when closing tabs, it doesn&#8217;t do so in oldest to most recent opened tab. However, that&#8217;s the beauty of Firefox- extensions, which again, I&#8217;ll cover in a minute.</p>
<p>Fourth, I do like the default home page in Chrome, and I wish Firefox had it. I&#8217;m hoping we&#8217;ll see it in 3.6 or maybe 4.0. However, it&#8217;s hardly anything new. As usual, Opera pioneered the feature, Safari followed suit, then Chrome. It is a leg up on Firefox, however.</p>
<p>Fifth, the Omnibar in Chrome is no different than the AwesomeBar in Firefox, except for the search functionality. But, seeing as though the search box in Firefox is just a tab keystroke away, I hardly find this inconvenient, and worthy of a reason for switching browsers. Further, it&#8217;s limited in its search scope- it can only search from one engine, Google by default. The search bar in Firefox is much more customizable, giving you the option to add virtually any search engine to the browser. Google, Wikipedia, eBay, Ubuntu packages, and so forth. Sure, you can change the default search in the options in Chrome, but you have to change the option by opening the options dialog every time you want to make the change, rather than just do it on the spot ad hoc.</p>
<p>The sixth option is just silly. Known more widely as &#8220;porn mode&#8221;, every major browser comes with this feature, even in Firefox 3.5. A mere &#8220;ctrl+shift+p&#8221; will put Firefox into &#8220;Private Browsing&#8221;, not saving an ounce of history to disk. Further, rather than opening a new window, it caches off your currently open tabs, closes them, and puts the new porn mode tab as the current tab, all in the same window. When you&#8217;re finished, stopping private browsing will restore your tabs from the saved cache, including any text you might have typed in any form field. Sorry, but this point I found rather silly.</p>
<p>The seventh point is likely just as silly. Firefox has had a bright future from the outset. It truly is the poster child for a grass roots open source project that becomes mainstream. Version 3.6 is looking up, and 4.0 has a bright future as well. According to the browser market share trends, Firefox has been <a href="http://gs.statcounter.com/#browser-ww-monthly-200809-200910">up</a>, <a href="http://www.w3schools.com/browsers/browsers_stats.asp">up</a>, <a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=1">up</a>.</p>
<p>Now, here are seven reasons why I won&#8217;t be switching from Firefox to Google Chrome as my default browser in the foreseeable future:</p>
<ol>
<li><b>Extensions</b>- I know this is &#8220;in the works&#8221; for Google Chrome, but I can&#8217;t ditch Firefox just yet. I have a must set of extensions for every install of Firefox I ever make. I used to keep an updated list of such extensions, but I haven&#8217;t updated in a while. Maybe I should do so. But, on every install, I need AdBlock Plus, FoxyProxy, FireFTP, Firebug, Web Developer, Tab Mix Plus, Weave, NoScript and Flashblock, just to name a few. Again, I understand it&#8217;s only a matter of time with Chrome before extensions appear, and they will sand-boxed too, increasing the stability and security of the browser. However, Chrome isn&#8217;t there yet, and as such, Firefox remains my browser.</li>
<li><b>Caching</b>- Firefox is the only browser that I know of that gets caching right. If, for any reason, my browser crashes, and I was typing an email, when I pull the browser back up, not only are my tabs restored, but the data in the tabs as well, including each tab history, and the text in any form fields that I was editing (provided I&#8217;m keeping a history of everything, as is default on a new install). I can&#8217;t even begin to tell you how valuable this feature is. Yes, the whole browser crashes with Firefox, versus single tabs with Chrome, but when Firefox comes up, my data is in tact. When I restore the tab with Chrome, form fields and text boxes that were once populated are now blank.</li>
<li><b>Cross Platform</b>- Even though I have Google Chrome installed on my Debian and Ubuntu machines, Google Chrome is still very much a Windows application. It just hasn&#8217;t reached prime time for Mac OS X or GNU/Linux. So, unless I&#8217;m ready and willing to take the rolls with the punches, I&#8217;m stuck on Windows. Yes, Google Chrome is getting more and more usable every day on GNU/Linux, but it&#8217;s still unstable and comes with bugs.</li>
<li><b>Portable Firefox</b>- Being a college student, I&#8217;ve come to love <a href="http://portableapps.com">Portableapps.com</a>. I can take so many applications with me on a USB stick, plug them into a Windows machine at school, and off I go. Firefox is no exception. I can have all my extensions, plugins, settings, bookmarks and so forth with me on a single USB stick. This way, I don&#8217;t have to worry about installing Firefox should it not be installed, and I don&#8217;t have to prep it installing and configuring it the way I like. So, until Chrome becomes a portable app as well, which I don&#8217;t think should take long, Firefox is here to stay.</li>
<li><b>Speed</b>- Firefox is still a fast browser, and 3.6 is looking to up the ante even more. Tracemonkey is comparable to speed with V8 in terms of JavaScript engines, and HTML/CSS rendering is also snappy. In fact, I noticed a great improvement from 3.0 to 3.5 in terms of speed. And when browsing the sites I do from day-to-day with Firefox and Chrome, I honestly can&#8217;t tell if one is faster than the other. Yes, from a cold boot, Firefox is a second slower. Maybe two. Other than that, IMO, it&#8217;s neck and neck, and as a result, I see no reason to switch browsers if speed is a factor.</li>
<li><b>Configurability</b>- Firefox is the only browser I know of that tinkering under the hood is a snap. Just pulling up the &#8220;about:config&#8221; URI, and I can tweak to my hearts content, and I have. I&#8217;ve modified the way DNS is handled. I&#8217;ve modified the way proxies are setup. I&#8217;ve changed the backspace key behavior, and much more, and it&#8217;s easy. Further, if I don&#8217;t like the setting I&#8217;ve made, I just change it back, all while it&#8217;s running in a tab in the browser. No need for open dialog windows, or taking you away from your work.</li>
<li><b>Support</b>- This might seem like somewhat of a weak point, but Google Chrome has a bit to go before the community reaches the masses that Firefox has amassed. Support forms, IRC channels, wikis, mailing lists and on and on. If I need help with the Firefox browser, I&#8217;m likely to get the support I&#8217;m looking for, regardless of the platform. As Google Chrome increases it&#8217;s market share, there&#8217;s no doubt that it will increase it&#8217;s support options and community as well. However, it&#8217;s not there yet, and literally pales in comparison to Firefox. There is strength in numbers.</li>
</ol>
<p>These may or may not be your reasons for sticking with Firefox, but they are certainly mine. Firefox is a solid browser that is showing tons, and tons of potential. While it might not have some bells and whistles that Chrome has, such as a process per tab, or sandboxing extensions, it&#8217;s still a robust and stable browser, and as a result, still remains my default browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2009/10/12/7-reasons-why-i-have-not-switched-to-google-chrome-from-firefox/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.04 Torrents</title>
		<link>http://pthree.org/2009/04/22/ubuntu-904-torrents/</link>
		<comments>http://pthree.org/2009/04/22/ubuntu-904-torrents/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 21:52:11 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1047</guid>
		<description><![CDATA[Tommorow is the Big Day for GNU/Linux, when Ubuntu goes through it&#8217;s regularly 6 month upgrade. Ubuntu 9.04, codenamed &#8220;Jaunty Jackalope&#8221; is due for release. The consequence is, these servers will get slammed, meaning that&#8217;s it&#8217;s difficult for people who use other distributions on some mirrors to update their distribution. As a result, rather than [...]]]></description>
			<content:encoded><![CDATA[<p>Tommorow is the Big Day for GNU/Linux, when Ubuntu goes through it&#8217;s regularly 6 month upgrade. Ubuntu 9.04, codenamed &#8220;Jaunty Jackalope&#8221; is due for release. The consequence is, these servers will get slammed, meaning that&#8217;s it&#8217;s difficult for people who use other distributions on some mirrors to update their distribution. As a result, rather than hit the servers with FTP or HTTP, it would make sense to pull as much strain off the big iron as possible. There are many ways to pull this off, such as rsync, jigdo and bittorrent.</p>
<p>Unfortunately, as efficient as they can be, rsync and jigdo still hit the servers, even if it&#8217;s light. Bittorrent doesn&#8217;t have to, being a peer-to-peer technology. So, when you&#8217;re looking to get your latest ISO downloaded and burned, so you can hand them out at release parties, install on new boxen, or just for archival, it would be best if you used bittorrent. Of course, if you use bittorrent, then rather than cut the connection when you&#8217;re done, get at least a one-to-one ratio on uploads to downloads, so everyone can benefit.</p>
<p>Many popular <a href="http://en.wikipedia.org/wiki/List_of_BitTorrent_clients">bittorrent clients</a> exist as Free Software for GNU/Linux, such as Transmission, GNOME Bit Torrent and rTorrent (text-based). Trackers will be ready, if they&#8217;re not already, and the ISOs will be ready to go. Just find a link with a torrent to grab, and start downloading and sharing. No worries either for data speeds. Everytime I&#8217;ve used bittorrent on the release day, my connection was always filled to the max at 1 MB/s. Let us not forget how popular Ubuntu really is!</p>
<p>See you on the other side!</p>
<p>P.S.: The Ubuntu help documentation has a good guide for upgrading from 8.10, if you go that route. <a href="https://help.ubuntu.com/community/JauntyUpgrades">https://help.ubuntu.com/community/JauntyUpgrades</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2009/04/22/ubuntu-904-torrents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Debit Card</title>
		<link>http://pthree.org/2009/04/02/ubuntu-debit-card/</link>
		<comments>http://pthree.org/2009/04/02/ubuntu-debit-card/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 14:47:38 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1023</guid>
		<description><![CDATA[My bank allows customizing the front of the card with an image of your choice. So, I figured why not represent Free Software and Linux everywhere I use my card? I struggled for some time finding the right image to represent Free Software. The GNU logo is almost as horrid as Tux, the Linux kernel [...]]]></description>
			<content:encoded><![CDATA[<p>My bank allows customizing the front of the card with an image of your choice. So, I figured why not represent Free Software and Linux everywhere I use my card? I struggled for some time finding the right image to represent Free Software. The GNU logo is almost as horrid as Tux, the Linux kernel logo, so that was out. I thought about putting the free Debian logo on it, but if I was going to represent a specific GNU/Linux distribution, I might as well represent the one I worked so long with- Ubuntu. Plus, <a href="http://pthree.org/2006/10/15/my-vanity-plate/">it will match my license plates</a>, so why not? Well, I just got my new debit card in the mail yesterday from my bank. Here it is:</p>
<p><img src="http://pthree.org/wp-content/uploads/2009/04/ubuntu-debit-card.png" alt="Picture of an Ubuntu logo branded debit card" title="Ubuntu debit card" /></p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2009/04/02/ubuntu-debit-card/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Server Migration From Ubuntu 8.04 To Debian 5.0</title>
		<link>http://pthree.org/2009/02/19/server-migration-from-ubuntu-804-to-debian-50/</link>
		<comments>http://pthree.org/2009/02/19/server-migration-from-ubuntu-804-to-debian-50/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 16:42:30 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=956</guid>
		<description><![CDATA[Last night, I spent a few hours migrating this production server from Ubuntu 8.04 &#8220;Hardy Heron&#8221; to Debian 5.0 &#8220;Lenny&#8221;. Many have asked me online and in person why I would make the switch, especially being a heavy Ubuntu advocate. I hope I can explain that in a clear manner in this post. But first, [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, I spent a few hours migrating this production server from Ubuntu 8.04 &#8220;Hardy Heron&#8221; to Debian 5.0 &#8220;Lenny&#8221;. Many have asked me online and in person why I would make the switch, especially being a heavy Ubuntu advocate. I hope I can explain that in a clear manner in this post. But first, let me make it crystal clear that I&#8217;ve in no way abandoned Ubuntu or its ideals. I am running Ubuntu in VirtualBox on my work laptop, Ubuntu on my personal laptop and Ubuntu on the home desktop. I am only running Debian as servers.</p>
<p>So, why migrate from Ubuntu to Debian on the server? Surely, Ubuntu isn&#8217;t that bad of a server platform. You&#8217;re correct. It isn&#8217;t. In fact, it&#8217;s been &#8220;good enough&#8221; for me since installing it, which actually has an interesting history. This server came from a repossession when I used to work for a major home furnishings company in Utah. It was a home HP desktop computer that was old enough, my employer wasn&#8217;t interested in reselling it, so I asked if I could have it, and brought it home for $20.</p>
<p>This was back in 2005, so I put Ubuntu 5.04 on it as a desktop with XFCE as the window manager, as it&#8217;s only a Pentium 700 with at the time 128MB of RAM and a 10GB HDD. I&#8217;ve since beefed up the RAM and disk space. It was updated from 5.04 to 5.10, and it was at this time, I realised that I could ditch my then running Windows Server 2003 for Linux. So, Ubuntu 5.10 became a server, hosting my blog and a couple other web sites. When Ubuntu 6.06 LTS was released, it was running full time as my production server, and I became convinced of the LTS releases, determined to keep this server on LTS versions only. Also, I realised that it was running headless, so there was no reason to have X11 installed any longer, so I went through the pain of removing every last package that I didn&#8217;t need for a headless server. This was done for security as well as resource management.</p>
<p>It stayed on 6.06 LTS until 8.04 LTS released, at which point I upgraded the server yet again. So, from roughly May of 2005 to Feb 2009, it had been a desktop and a server spanning four upgrades. Not a big deal really. Upgrading servers and desktops is getting easier and easier these days, with less headaches being encountered. I would keep it on 8.04 LTS waiting for the next LTS release, and upgrade again if I hadn&#8217;t decided to change operating systems to Debian.</p>
<p>During the path of an Ubuntu server, it&#8217;s had some rough spots, as some of my friends can attest to, none of which were Ubuntu&#8217;s fault at all, but the system administrator hacking it (me). For example, when I wanted to host my web site on it, I needed to know how to make that happen. I found a HOWTO on howtoforge for installing Apache, as well as ISPConfig, and a number of other packages that I realise now were not necessary. In fact, I ended up removing ISPConnfig a couple years later, as it was causing problems with logs, consuming a large amount of RAM, and just getting in the way. Then I wanted to run my own email server. Not knowing how to set an email server up, I fiddled with Exim, Sendmail, Postfix and others, failing at every pass, and further causing havoc on the filesystem and DPKG database. Eventually, I found the help I needed from a friend, and was able to get a Postfix server up and running as an external MTA. There were many other services I messed with from time to time, testing this out or the other, slowly filling the filesystem with pointless stuff. In a nutshell, what I&#8217;m trying to say, is the Ubuntu 8.04 install, while functional, was no longer pretty. It was hackish at best.</p>
<p>This prompted me to do a reinstall of Ubuntu 8.04 LTS. I wanted a fresh, clean install, restoring the needed data from backup (yes, I actually run backups). However, as I began thinking about it, I realised that I didn&#8217;t trust the build quality of the LTS releases as much as I trusted the build quality of Debian stable releases. Thinking about it further, I was having a hard time convincing myself to run an Ubuntu server. The reason being the way packages are tested in the Debian repositories. Consider for example a package that&#8217;s uploaded to the unstable repository. Before that package can reach the testing repository, it much meet certain criteria:</p>
<ul>
<li>After the package has been in unstable for a given length of time, it can qualify for migration to testing. This depends on each package, and the urgency of the migration.</li>
<li>The package can only enter testing if no new release critical bugs exist. This means, that the package must have fewer release critical bugs than the current package in testing.</li>
<li>All dependencies needed for the package must be satisfiable in the current testing repository. If not, those packages must be brought in at the time the current package is, and they must meet the same criteria related to time in unstable and the number of release critical bugs.</li>
<li>The package migrating to testing must not break any other packages currently in testing.</li>
<li>It must be compiled for all release architectures it claims to support, and all architecture specific packages must be brought in as well, meeting the same criteria as mentioned.</li>
</ul>
<p>The above criteria for packages entering the testing repository ensure that packages are reaching a bug-free state for the next stable release. The goal is to have the number of release critical bugs drop and drop and drop approaching zero. Of course, bugs are only brought about by an active community reporting them, then decided on whether or not the bug is critical enough to be labelled a release critical bug. After the packages in testing have reached sufficient maturity and have few enough bugs to qualify a release, the testing repository is brought to stable. The current stable becomes &#8220;old stable&#8221;, and the current testing is reprepared for the next stable release. So, in theory, the stable distribution is STABLE. Rock sold stable. Anyone who&#8217;s anyone in the Linux world knows that Debian stable is just about as stable as you can get for an operating system.</p>
<p>Another nice thing with Debian stable, is it releases when it&#8217;s ready. The Debian community has taken some flack for this, with 2-3 years at times between releases. However, Debian stable is the operating system that is high production quality. While most end users tend to run testing or unstable on their desktops or laptops, many prefer stable for their production server.</p>
<p>Now, I ask the Ubuntu community, what are we doing to ensure the same build quality for the LTS releases? I would think that each 6 month release would hold the some criteria as Debian, namely that packages can&#8217;t enter that release unless it has fewer RC bugs than current. This way, as we approach the LTS release, we&#8217;re slowly but consistently stabilising the operating system. Unfortunately, this would mean that Ubuntu wouldn&#8217;t be as bleeding edge as it is currently. Many packages would stay rather old, due to having less RC bugs than the current release. But then, the LTS releases would be much more stable.</p>
<p>Now, with that said, I personally have never had any problems with my LTS server, either Dapper 6.06 or Hardy 8.04. But do I want to risk it? Should I chance it? While nothing may ever happen that causes critical concern for me with an LTS release, I feel more comfortable putting my trust in Debian stable than I do Ubuntu LTS. However, I want to see Ubuntu LTS succeed in the server arena. I was ecstatic to find that Wikimedia moved all their servers, or are moving, to Ubuntu LTS. I&#8217;ve heard other success stories of migrations to Ubuntu LTS. I think this is good, and the larger the community gets, hopefully, the more bugs will be reported, the more patches will be submitted, and more work will be done upstream to Debian. There&#8217;s no reason why Ubuntu can&#8217;t learn from Debian, and vice versa, creating a solid symbiotic relationship.</p>
<p>So, in a nutshell, I&#8217;ve put my faith behind Debian stable for any production servers personally, and Ubuntu for any desktops and laptops that can afford a little wiggle room in relation to stability. This is my opinion with my hardware, and your mileage will probably vary. That&#8217;s what makes our community as a whole so great. I want to see Debian succeed on the desktop, laptop and netbook arena, and I want to see Ubuntu succeed in the server / Big Iron arena, and I&#8217;ll do what I can to make that happen. But for now, I am where I am.</p>
<p>Any questions or comments of course, please populate the comment form below.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2009/02/19/server-migration-from-ubuntu-804-to-debian-50/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Ubuntu Codenames</title>
		<link>http://pthree.org/2009/02/08/ubuntu-codenames/</link>
		<comments>http://pthree.org/2009/02/08/ubuntu-codenames/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 12:57:44 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=941</guid>
		<description><![CDATA[With the release of Ubuntu 9.04 about 2 months out, Mark Shuttleworth will be announcing the codename of Ubuntu 9.10 fairly soon. This gets the community excited, as historically, Ubuntu releases have had entertaining codenames with interesting patterns. For example, the first three releases were after badgers: Ubuntu 4.10 &#8220;Warty Warthog&#8221;, Ubuntu 5.04 &#8220;Hoary Hedgehog&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of Ubuntu 9.04 about 2 months out, Mark Shuttleworth will be announcing the codename of Ubuntu 9.10 fairly soon. This gets the community excited, as historically, Ubuntu releases have had entertaining codenames with interesting patterns. For example, the first three releases were after badgers: Ubuntu 4.10 &#8220;Warty Warthog&#8221;, Ubuntu 5.04 &#8220;Hoary Hedgehog&#8221; and Ubuntu 5.10 &#8220;Breezy Badger&#8221;. Ubuntu 6.06 was named after a duck, &#8220;Dapper Drake&#8221;, and it&#8217;s been alphabetical since. Currently, we&#8217;re on the letter &#8220;I&#8221;, with the letter &#8220;J&#8221; to be released for 9.04, which means &#8220;K&#8221; is the likely candidate for Ubuntu 9.10.</p>
<p>Now, here&#8217;s what I would like to see from the community: quit calling the releases after their codenames. Start calling them after their version number. Here&#8217;s why. Most people don&#8217;t know what version &#8220;Feisty Fawn&#8221; was without thinking about it, or pulling up Google. For those who have been running Ubuntu, they&#8217;ll remember their experience with the codename if it was significant, but the average Ubuntu user doesn&#8217;t recall codenames. But, they do recall time, with how long they have been using Ubuntu. So, when I say &#8220;I&#8217;ve been using Ubuntu since 4.10&#8243;, or &#8220;Remember Ubuntu 7.04?&#8221;, then people will know more specifically what version I am referring to. However, when I say &#8220;I&#8217;ve been using Ubuntu since Warty&#8221;, or &#8220;Remember Feisty?&#8221;, people will most likely not know what version I&#8217;m referring to. Consider the following scenario:</p>
<blockquote><p>I started with Linux when Red Hat Enigma released. I then moved to Fedora Yarrow, and left around Zod. Now I&#8217;m running Debian Etch as a server with Ubuntu Intrepid on my laptop and Hardy on my Desktop.</p></blockquote>
<p>You get the idea. After all, you don&#8217;t refer to OpenOffice.org by it&#8217;s codename, or Firefox for that matter. So why refer to Ubuntu by just the codename?</p>
<p>So, when the announcement is made, the Internet will be a buzz about the new codename, and we&#8217;ll see image mock ups galore. But, would it be too much trouble to start calling the releases after their version number instead of codename? If you&#8217;re going to insist on using the codename, would it be too much trouble to append the version number with it? &#8220;Ubuntu Intrepid 8.10&#8243;. It would be nice to see the version numbers in blog posts, forums posts, mailing lists, IRC, and even in speech used much more. As long as you&#8217;re familiar with the how the version number is compiled, people will feel less alienated and more likely to know what you&#8217;re talking about.</p>
<p>With that said, I do enjoy the codenames as much as the next guy, and I even enjoy the wallpaper themes that have surrounded the codename on the past two releases. Further, by default, the codename is used in the repository sources file on every Ubuntu system by default, so, becoming familiar with them is beneficial.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2009/02/08/ubuntu-codenames/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
	</channel>
</rss>

