Skip to content

dan.verweire.com

butter side up

Archive

Tag: Linux

I recently created a bootable usb thumb drive for installing Kubuntu on different computers at work. I also planned to to use this device as a live system for the rare instances where I need another Linux system in my office to test things. Creating the bootable drive was a piece of cake with the usb-creator-gtk package.

Today I wanted to test out some cool stuff like dns2tcp, ptunnel, stunnel and ppp. I pulled out my thumb drive, smacked it into an available machine and booted off the cool little guy. I quickly found that I needed to install more packages and as I did, I ran out of space in the 128 MB that I had allocated for “extra space” on the 4GB drive.

Yeah it was obviously a dumb move to only allocate 128 MB for my /home and customizations. The fun thing about Linux is where there is a stupid mistake there is a chance to learn something new and do something fun, if you like that sort of thing.

As it turns out usb-creator-gtk creates a file in the root of the drive called casper-rw. This file is an ext3 filesystem image and is what contains most of the writable data in your live environment. All I needed to do to get some more space (provided that drive wasn’t physically full) was to enlarge this file and then resize the ext3 filesystem inside the file to be able to use all of the newly available space in the file.

Oblig Warning: Only do this if you understand what these commands do and agree that they are the best course of action for your situation. Use at your own risk.

The following steps where taken from a computer which was running Kubuntu Karmic. You must not be running in the live environment on the usb device when doing this procedure.

  1. span class=”st0″>’e2fsck -f casper-rw’

I was trying to compile XBMC from the subversion repository and was receiving an error when it got to the Goom visualization. Unfortunately, the exact error is beyond my terminal history but can be found in a thread on the XBMC forums (http://blog.xbmc.org/forum/showthread.php?t=45463&page=2). In that thread there is this dirty work-around:

sed -i xbmc/visualizations/Goom/goom2k4-0/src/goomsl_yacc.y -e 's/case FLOAT_TK/case 264/'
sed -i xbmc/visualizations/Goom/goom2k4-0/src/goomsl_yacc.y -e 's/case INT_TK/case 263/'
sed -i xbmc/visualizations/Goom/goom2k4-0/src/goomsl_yacc.y -e 's/case PTR_TK/case 262/'

It worked for me. An additional note of interest when compiling XBMC is if you want to install to a non-standard location,

./configure --prefix=/path/to/destination

DOES NOT WORK. You have to use :

make install PREFIX=/path/to/destination

So, I accidentally installed it on top of the version I received via apt-get from the xbmc ppa. Shouldn’t be an issue.