What is an ISO file? An ISO file put simply is a perfect copy of a disc (usually optical) stored in one file on the hard drive of a computer. ISO is uncompressed and contains even free space of said disc.

According to Wikipedia, "An ISO image (International Organization for Standardization) is an archive file (also known as a disc image) of an optical disc, composed of the data contents of every written sector of an optical disc, including the optical disc file system." (Wikipedia, ISO Image, June 2011)

This varies from a compressed archive such as ZIP, RAR, TAR, GZ, BZ2, etc, in that an archive file contains only the files and all unused sectors are removed to save space. With this in mind, one would think that an ISO file was simply an uncompressed archive.

HOWEVER, this is not entirely true. Even uncompressed, an archive file still removes completely-empty bytes. There's no need to zip up the files of an entire 40GB disc and end up with a 40GB file, unless there was actually 40GB of data that was filling the entire thing up! If there was only 15GB on a 40GB disc and you archived the entire disc uncompressed, you would end up with a 15GB file.

This is not true in the case of an ISO file. When you create an image of a 4GB DVD, you will end up with a complete 4GB ISO file, even if half the disc was unused.

This is useful because the main point of ISO files is to be able to create a disc image file and re-burn it to another disc, thus making a copy. In this case, file locations are important in addition to file data, and an burning an ISO image, we are sure that all of the files are laid down on the surface of the disc in exactly the same configuration as the master. Of course, this would only REALLY matter if you were dealing with a raw DVD video that would be more reliant on the burning process than an MPEG-2 file burned to the DVD as data.

Ubuntu Server - Changing Screen Resolution with GRUB2

Recently I drug out my old Dell dinosaur (Dimension) from the closet and decided to try installing Ubuntu server onto it.

Well, all went well until I also attempted to add the Xubuntu-Desktop package, so I could better run around and do things in there. A quick update for an nVidia graphics driver froze the computer directly after login, and all the stuff I found in the forums didn't really help that much, except for possibly uninstalling all the packages that xubuntu-desktop stuck in there. Since there wasn't a lot on there (except for maybe the neat desktop backgrounds that seem to change with every version of any Ubuntu release), I figured a fresh install would be best.

After reinstalling the OS, I did a repository update, which screwed up my screen resolution. My monitor can handle 1280x1024, but the update had changed it to 640x480.

Note: This is Ubuntu Server 10.04.

How do you change screen resolution within a pure terminal interface? GRUB2.

Around version 9.04, Ubuntu upgraded the bootloader from GRUB to GRUB2. This is way more confusing, but can still be figured out.

For the sake of simplicity, there is no longer /boot/grub/menu.lst. It's just not there, nor will it be used if you create it. Instead, all the configurable options are now moved into /boot/grub/grub.cfg

The problem is though, with the command $ sudo update-grub or on a kernel update, this file is overwritten. Therefore, this file should not be editted.

But where does GRUB pull all this information when it DOES do an update?

All the config options are actually stored in the /etc/grub.d folder. This folder are 7 sub-files:

  • 00_header
  • 05_debian_theme
  • 10_hurd
  • 10_linux
  • 20_memtest86+
  • 30_os-prober
  • 40_custom

On grub-update, all of these files are executed and mashed together and copied into grub.cfg. But these files don't change ever. Therefore, you can change them yourself, adding entries and such.

I don't know all the details, but the process for adding more operating systems is much more complicated than before. They've decided to use some C-style function for each menu entry, rather than the old way of a simple list with tabbed sub-values.

You can see the way menu items are placed by looking directly at the /boot/grub/grub.cfg file and scrolling down to the 10_linux section.

In mine, a single final entry appears like the following:

menuentry 'Ubuntu, with Linux (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set 0689cdb7-786d-4a68-b14b-634b85c9961b linux /boot/vmlinuz-2.6.32-32-generic-pae root=UUID=UUID=0689cdb7-786d-4a68-b14b-634b85c9961b ro quiet initrd /boot/initrd.img-2.6.32-32-generic-pae}

All this is somehow scripted into the 10_linux file. You won't see this exact entry anywhere in the file, but instead they've created a way for it to execute a 'find all options and translate them into this format' when you do sudo update-grub.

But anyway, back to the issue at hand. My screen resolution is messed up. I said GRUB2 was the solution to fix this. The options for screen resolutions are stored in /etc/grub.d/00_header.

Open the file in an editor, and scroll down until you see the if statement:
  if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi

Simply change 640x480 to whatever your desired (and of course, possible) screen resolution is, save, update-grub and reboot.

Oh, and if it matters, a read through the Official Ubuntu GRUB2 Docs might help.

I just now decided to read further into that help file right there...apparently you can also change screen resolution in the /etc/default/grub file, as well as turn on countdowns and things to make sure that you can actually use the menu.

In /etc/default/grub:

GRUB_GFXMODE=640x480 - Change to something your screen can handle and that you want. Maximum is usually okay if you're good on small text. They say in the documentation, that you can comma-separate values also, in case one doesn't work. Just put them in a DESCENDING preferred order, usually high to low.

Also make sure you uncomment the line by removing the # symbol at the beginning of it.

The vbeinfo command in the shell should give you your valid resolutions.

Also, if you find that there is no menu displayed, you can turn on timeouts in this file.

if GRUB_HIDDEN_TIMEOUT is set to something above 0, a message will be displayed on bootup saying something like, "Press any key for the menu..", unless of course, the GRUB_HIDDEN_TIMEOUT_QUIET is set to true. Then you will see a black screen for that amount of time.

If GRUB_HIDDEN_TIMEOUT is empty (GRUB_HIDDEN_TIMEOUT=), GRUB_TIMEOUT will be used instead, and if this is a number greater than 0, the menu will be fully displayed every time you boot up.

Just remember to run sudo update-grub after editing.


A long time ago, I discovered that Jim Davis, the author of Garfield comics, syndicates his stuff with uComics. An interesting, and probably well-known, fact is that uComics actually stores the images from a particular cartoon in a fairly friendly directory structure! At least, they do with Garfield comics. So I was able to do some back-door hacks and write a simple little script that would in essence harvest Garfield comics directly from uComics.

Apart from being able to download a year's worth at a time (any more would probably kill my computer and the web host), I also was able to create a script that would grab today's Garfield comic and display it with general navigation buttons to yesterday..or really any day since it was first begun in 1978.

Anyhow, I have been hosting this script on both my personal web server and on Brinkster. Today, I 'upgraded' my script, cloning it to a new page which is embed-friendly:

The fun of an embed page is that I can put the proper code into any webpage that accepts HTML and this will display these comics inline!

So, to embed Garfield on YOUR website/blog, simple paste the following into anything that accepts HTML (on Blogger, this is an HTML/Javascript widget).

<iframe src="" frameborder=0 width=100% height=240px>Your browser does not support iframe.</iframe>

If all goes well, you should see a floating box with the comic and a few links displayed right on your page (such as the one in the footer below)!

National Geographic

This morning I've been watching a number of interesting videos taken at zoos and exhibitions including a snake befriending a hamster, a squirrel that knows how to water-ski and others.

However, there were a few suggestions on those that linked to some National Geographic videos that turned out to be AMAZING.

Here's the playlist I picked from their channel:

View in separate window