Resizing a Linux disk image file

Here’s a quick how-to on creating a larger Linux disk image file and transferring the contents of an existing image to it.  For example, most of the Xen images on this site are 1 GB – but you probably would want them to be much larger if you were going to actually *use* them.  Here’s what to do:

  1. Create a new disk image fileUsing the dd command, create a blank image file of whatever size you need (I’ll use 5 GB as an example here):
    dd if=/dev/zero of=new_image.img bs=1 count=1 seek=5G
  2. Format the disk image

    In this case, I’ll use the ext4 filesystem.  You’ll get a warning because you are formatting something that is not a block device (disk).  Just say yes when it asks you to proceed anyway.
    Continue reading this post »



Tuning Solid State Drives in Linux

There are a few guides out there with tweaks on how to make your solid-state drive (SSD) run faster or last longer in Linux.  While researching TRIM support in SSD firmware and the Linux kernel, I wasn’t able to find all the information I needed in one place.  Here is a guide I put together based on my experiences, which will hopefully be helpful to some other people in the same situation

1. Filesystem Choice – ext4 without journaling

A lot of the older SSD+Linux guides recommend using the ext2 filesystem because it avoids the extra writes of a journaling filesystem like ext3 or ext4, which will extend the life of your drive.  With the advent of TRIM support (see below), ext2 is probably not the best choice.  Yes, TRIM commands can be run on ext2 filesystems, but with two drawbacks:

Continue reading this post »

Newsmax.com’s Target Audience

I have an email account that I use only for Newsmax.com. I like to vote in their silly polls in order to slightly skew their desired statistics. Whether or not they honestly report the results of their polls is debatable, but I do it anyways.

When you vote in their polls, you are not surprisingly added to their email list. The emails generally fall into one of the following categories:

  • An offer to get the latest book from Ann Coulter, Sarah Palin, or some other right-wing smear-merchant for 1 cent.
  • Recommendations from noted prostitute toe-sucker Dick Morris on how to save yourself from an inevitable financial collapse by buying gold.
  • A Summary of their latest “must-see” headlines.

I received one of these emails the other day, and one of the headlines was particularly interesting. It says a lot about who the target audience of Newsmax.com is.