After the upgrade to Ubuntu 11.04 I noticed that my HTPC box wouldn’t automatically reboot after a hard reset. I always had to connect a keyboard and press the enter button to resume booting. Kind of an unwanted situation for a box that stands in the living room. So I went through the grub.cfg file to see what needs to be changed. Here is the Ubuntu howto:

First open the /etc/grub.d/header file (you need to use sudo, so you can save it) and look for the following lines:

make_timeout ()
{
cat < < EOF
if [ "\${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=${2}
fi
EOF
}

Then change the line "set timeout=-1" to some other, positive value, like: "set timeout=10". The result should look like this:

make_timeout ()
{
cat < < EOF
if [ "\${recordfail}" = 1 ]; then
set timeout=10
else
set timeout=${2}
fi
EOF
}

Now the grub.cfg template is updated, the only thing left is to execute an update of the real grub.cfg.

sudo update-grub2

This way the modifications remain in the system, even when new kernels are updated.

 5/11/2011  Posted by Jord at 20:19 Free software, ubuntu No Responses »
 

So I wanted to install Mythbuntu on my old Dell C640, I downloaded the CD and started the PC. Things went cool until the installation reached 25%. At that point ubiquity decided that the CD was corrupt and the installation could not continue.

So I tested the CD on both the old computer and a newer one. The newer computer didn’t find any error, but the C640 said the cd was completely broken (19 broken files, but one of them was the squashfs image).

Now what? Boot from USB? Didn’t seem to be an option, since there is no option in the boot menu. After a lot of time I found the following working solution:

  • Boot the laptop from the CD (remember only the installation failed)
  • Have a copy of the CD on an USB Disk
  • Mount the USB Disk (mount /dev/sdb1 /tmp/usb)
  • Mount the squashfs filesystem image that is located on the USB Disk (mount -o loop /tmp/usb/casper/filesystem.squashfs /tmp/squashfs)
  • And now the big trick: bind the new location (/tmp/squashfs) on the location that is created by the installation CD (/rofs). The command to do that is: mount –bind /tmp/squashfs /rofs.
  • Start ubiquity.
Nov 032008
 

While waiting for a new rebuild of KDE from subversion I usually waste way too much time on Knetwalk. It’s a fun little game where you need to connect all the pcs to the net (the world symbol).

knetwalk 237x300 Knetwalk

And just for the ego factor: my current high score is 55 seconds for a ‘hard’ game (171 points).

 11/3/2008  Posted by Jord at 20:57 Free software, Fun, Just bloggin' ,  No Responses »
 

People who read my blog now that I frequently post articles I have read on Boing Boing. This post is not different from that rule. There is just one funny twist about this one: I find it unbelievable that I have to read an American blog to know what is happening in Leeuwarden. Afterall my sister is living there.

So much for the intro.

Henk Hofstra installed a couple of fried eggs in the center of Leeuwarden. The project is called: art-eggcident. Each of the eggs is about 30 metres wide and will remain in the city for the next six months.

 5/7/2008  Posted by Jord at 23:59 Just bloggin', ubuntu , , ,  No Responses »
 

Sometimes I forget the wonders of the different modules Apache has. A friend of mine drew my attention to mod_rewrite. A very useful tool indeed. You can prevent people from steeling your content, or do other nice redirecting rules with it. Here is a nice example that illustrates how to redirect all incoming calls from one site to another (just put the lines in your .htaccess file):
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} (example.com) [NC]
RewriteRule myarticle.html http://www.cacheserver.com/myarticle.html [R,L,NC]
</IfModule>

Link.