How I installed Kubuntu 10.04 (Lucid Lynx) on an HP Mini 110 with full disk encryption

Get a USB drive and make a boot disk from the kubuntu 10.04 CD image as detailed here: https://help.ubuntu.com/community/Installation/FromUSBStick
Be sure to select persistent storage, “When starting up from this disk, documents and settings will be: ‘Stored in reserved extra space'” I allocated approx 1GB of space for this (You’ll need more than the default 128MB.)

Use the ethernet connection on the netbook to connect it to the internet. Power it on, and as soon as you see the first screen, hit . Select your USB drive as the boot device.
Once booted, run:
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install cryptsetup lvm2

then reboot the netbook (from USB again)

Create the following partitions (I prefer cfdisk to partition)

  • /dev/sda1, 512MB, ext2 (primary partition, bootable)
  • /dev/sda2, remainder of space, (Pri/Log partition)
  • /dev/sda5, entire logical partition, (Logical partition in sda2)

Setup your encrypted volumes:
cryptsetup -y --cipher aes-xts-plain --key-size 512 luksFormat /dev/sda5
cryptsetup luksOpen /dev/sda5 pvcrypt
pvcreate /dev/mapper/pvcrypt
vgcreate laptop-vg /dev/mapper/pvcrypt
lvcreate -n swap -L 3G laptop-vg
lvcreate -n root -l 100%FREE laptop-vg
mkswap /dev/mapper/laptop-vg-swap
mkfs.ext3 /dev/mapper/laptop-vg-root

Start the installer (from the icon on the desktop) and choose to setup the partitions manually:

  • set /dev/sda1 to be /boot
  • set /dev/mapper/laptop-vg-root to be /
  • set /dev/mapper/laptop-vg-swap to be swap space

After the install is complete, do the following before rebooting
mkdir /mnt/newroot
mount /dev/mapper/laptop--vg-root /mnt/newroot
mount /dev/sda1 /mnt/newroot/boot
mount --bind /dev /mnt/newroot/dev
chroot /mnt/newroot
mount -t proc proc /proc
mount -t sysfs sys /sys
apt-get update
apt-get install cryptsetup lvm2

Then edit /etc/crypttab and add the following line to the end of the file:
pvcrypt /dev/sda5 none luks,retry=1,lvm=laptop-vg

Next, edit /etc/initramfs-tools/modules and add the following lines:
dm-crypt
aes-i586
xts
sha512_generic
ahci

Then run
update-initramfs -u

and reboot

In order to get my mic external speakers working (headphones worked fine), I had to:
apt-get install linux-backports-modules-alsa-lucid-generic

Why I prefer Ubuntu

Yet another draft post that I found recently.  Yes, I’m still a fan of Ubuntu.


As many of my colleagues know, I’m a huge Debian fan. I love the stability and ease of package management. The primary thing I don’t like about Debian is it’s lack of a release schedule. Their attitude is, “We’ll release it when it’s ready.”

I don’t disagree with that attitude, Debian is a very impressive community-driven development project. If I was programming for such a project, I’d probably prefer the “release it when it’s ready” method.
Enter Ubuntu. Ubuntu is based on Debian, which means it shares its ease of package management. Ubuntu also has a release schedule. They plan to release a new version every 6 months, supporting it for 18 months (security patches, fixes for critical bugs that could cause data loss, and extra translations.) They also plan to have an Enterprise Release every 12 to 24 months (which will receive additional testing.) These Enterprise are supported for a longer period of time. The current LTS version is supported until 2015.

Upgrading php5-memcache on Ubuntu (Intrepid)

We were having a little problem on our webservers with php5-memcache when we try to utilize multiple memcached servers. The error was:
ALERT – canary mismatch on efree() – heap overflow detected (attacker ’10.X.X.X’, file ‘/path/to/file/index.php’)
It didn’t come up too frequently in the logs, but it was frequent enough to cause some concern.

As part of troubleshooting, I was tasked with upgrading php5-memcache on one of our test systems so that we could see if this resolved the issue. This turned out to be much easier than I thought. Here’s what I did (as root):

apt-get install php5-dev
cp /usr/lib/php5/20060613+lfs/memcache.so /usr/lib/php5/20060613+lfs/memcache.so.bak
pecl install memcache-3.0.3
/etc/init.d/apache2 restart

That was it, we’re running on 3.0.3 now and I’m crossing my fingers that resolves the issue we’re seeing.

Multimedia, Entertainment & Distractions In (K)ubuntu

TrainTo help you get the most out of (K)ubuntu, be sure to enable Medibuntu as a source for packages. This will allow you to easily play those wmv files and DVDs on Linux as well as most other multimedia that use proprietary formats.

The steps for setting it up involve running three commands (Details here)
For me, it was a matter of running:
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
sudo sed -e 's/ non-free//' -i /etc/apt/sources.list.d/medibuntu.list

Good luck!