Mar 12 2009

Testing Ubuntu Jaunty and Ext4 WITHOUT Trashing Your Data

Tag: linux, software, ubuntuScott Wegner @ 11:00 am

Trash Thank YouUbuntu 9.04 “Jaunty Jackelope” is set for release in less than two months, and is currently in the “Alpha 6″ testing stage.  Arguably the hottest new feature is stable support for Linux’s new filesystem, ext4.  The new filesystem has been shown to have significant performance gains over any other Linux filesystem to date.  But think twice before you upgrade to ext4–many users have been reporting considerable data loss.  From a user’s comment:

This has happened to me twice, the first time erasing Firefox settings, and the second time erasing gnome-terminal settings. Both cases were caused by a kernel panic locking up the system. Also, both times the program whose settings were affected was in use during the kernel panic.

This has been a wide-spread problem, particularly for Ubuntu users testing the new Jaunty alpha releases.  It manifests itself after a system crash, where open files will simply be emptied and erased.  It is particularly prevalent in users’ settings files, such as those used for GNOME or KDE.  Fortunately, there cause of the bug is relatively well-known, as kernel developer Theodore Ts’o explains in his detailed comment:

OK, so enter ext4 and delayed allocation. With delayed allocation, we don’t allocate a location on disk for the data block right away. Since there is no location on disk, there is no place to write the data on a commit; but it also means that there is no security problem. It also results in a massive performance improvements; for example, if you create a scratch file, and then delete it 20 seconds later, it will probably never hit the disk. Unfortunately, the default VM tuning parameters, which can be controlled by /proc/sys/vm/dirty_expire_centiseconds and /proc/sys/vm/dirty_writeback_centiseconds, means that in practice, a newly created file won’t hit disk until about 45-150 seconds later, depending on how many dirty pages are in the page cache at the time. (This isn’t unique to ext4, by the way — any advanced filesystem which does delayed allocation, which includes xfs and the in the future, btrfs, will have the same issue.)

Essentially, the data for truncated and overwritten files is often cached in memory before actually hitting the disk, for performance reasons.  However, the file truncation doesn’t get cached, and if there is a system failure between the two operations, your files will simply be wiped clean with all previous and new data gone.  This happens frequently for desktop settings because hundreds of small hidden files are updated to maintain user preferences.  As a result, there is a relatively high probability that a truncation and rewrite operation could be happened at any time– including during a system failure.

By POSIX definition, this isn’t really a bug in ext4.  The state of a file after this type of crash isn’t clearly defined.  According to Theodore, it’s really a bug in the way desktop environments are writing their settings files:

[...] If your application is stupid, and has hundreds of dot files in your home directory, each one taking up a 4k disk block even though it is only storing 4 to 12 bytes of data in each singleton dot file, and you have to [write to disk] for each of your one hundred dot files — and worse yet, your application for some stupid, unknown reason is writing all of these hundred+ dot files every few seconds, then [writing to disk] will be very painful. But it is painful because the application is stupidly written — not for any fundamental filesystem fault. It’s like if you had a robot which was delivering mail to mail box numbers 1, 2, 3, 4, 5, and crossing the street for each mail box; on a busy road, this is unsafe, and the robot was getting run over when it kept on jaywalking — so you can tell the robot to only cross at crosswalks, when the “walk” light is on, which is safe, but slow — OR, you could rewrite the robot’s algorithsm so it delieveres the mail more intelligently (i.e., one side of the street, and then cross, safely at the crosswalk, and then do the other side of the street).

Regardless of what a permanant solution should include, there are a series of patches which are set to be included in the final Jaunty kernel to address this issue.  The patches are set to handle the crash situation similar to ext3– keeping the original version in-tact.  However, it comes at a price of performance.  Ext4 won’t be any slower than ext3, but the patch will negate many of the performance gains that ext4 previously achieved.

Once again, ext4 will likely be patched and fixed by the official Ubuntu Jaunty release.  However, it isn’t present in Jaunty Alpha 6, and hasn’t been pushed as an update yet (as of 3/12/09).  There is lengthy and ongoing discussion in the original bug report about possible long-term solutions.  In conclusion, be very careful if you choose to test out the new ext4 filesystem until it is patched.


Mar 10 2009

Dell Mini 9 Netbook: Ubuntu Linux Version

Tag: hardware, linux, open source, technology, ubuntuKyle Wegner @ 7:01 pm

After much anticipation, my new netbook (which I got a screaming deal on) was delivered this afternoon. It’s a Dell Inspiron Mini 9 Netbook with Ubuntu Linux, though this version of Linux is slightly different than your standard install. While it is technically Ubuntu 8.04 (Hardy), it has its own interface which I will do a walkthrough of below, outlining all the differences I can find between this Dellbuntu (my own term) and a standard Ubuntu install.

This screen shot walkthrough will look at the unedited, uncustomized Ubuntu install on my Dell Mini 9. I’m sure I will do plenty of customization down the road, but for now you get the virgin version.

The Standard Desktop

ubuntu home screen on dell mini 9

The desktop is very clean and appealing to start off with. There are no folders or icons on the desktop itself, which will be quite a surprise for anyone coming from a Windows environment. The large bar across the top is called the Launcher and presents most of the essential programs in a graphical interface. Below are shots of each tab individually.

The Entertainment Tab

ubuntu entertainment tab

While this menu has the typical Music Player (Rhythmbox) & photo manager (F-spot), this is the first time we really see the net-focus on the netbook. Having a specific icon for LastFM shows the imporantance of working in the cloud…which is essential since the Dell Mini 9 comes with only 4GB of memory standard.

Also, notice how I had to specify that the music player and photo manager have actual names. Dell has completely debranded most default programs, which we will see more examples of soon.

The Games Tab

ubuntu netbook games tab

The games tab has many of the typical Ubuntu games so there isn’t a whole lot to discuss here, however there are a few things to note. First, and most disappointing, is that Wormux, my favorite of the Ubuntu standard games, is not included in this install. I’m not sure why they would do that while adding Potato Guy instead! Let me tell you, potato guy is one of the most annoying and pointless “games” I’ve ever run across. Stay away!

The Learn Tab

Dell netbook learn tab

I don’t know who came up with the Learn tab, but I don’t think I’ll ever seriously use it. I guess the Japanese Study Tool and Stellarium might be good for a handful of people, but these do not seem like programs that were worth including in a default install. Actually, more interesting than that is the fact that all of these programs have Kubuntu-style names in the normal programs menu. What this means I’m not sure.

The Productivity Tab

netbook productivity tab

The productivity tab includes all the default OpenOffice.org programs, plus a handy folder called “Dell Contract.” Of all things I want in a quickstart menu like the launcher, I DEFINITELY want fast access to my Dell Contract at all times. Thanks Dell!

The Web Tab

netbook web tab

The web tab is probably the most interesting of all, which is to be expected from a netbook. Can you tell who Dell partnered with to bring netbook services to the Mini 9? Let me spell it out for you…Yahoooooooooo! Not only do they have an entire quicklaunch section dedicated almost entirely to Yahoo pages, but the “Web Browser,” or Firefox, defaults to Yahoo.com for the home page, has the Yahoo Toolbar installed, and defaults to Yahoo search from the quick search bar. While I have no problem with companies partnering with each other to do promotions, Mozilla is largely funded by Google search which is shown by defaulting the Firefox home page & quick search bars to Google. Without this funding, development for Firefox in general would be at risk. But this is an issue for a separate post.

The Keyboard

While the entire set of hardware behind the Dell Mini 9 Netbook is interesting and generally super high quality, what is worth sharing the most is the keyboard.dell netbook tiny keyboard

This keyboard is super tiny, but also extremely functional. My one problem, which I have yet to get over, is the positioning of the apostrophe/quotes key. Dell moved it from its normal position next to the colon key to the bottom row next to the left arrow. See it? Yeah, that will take some getting used to.

That’s it for now. I’ll update if I find anything else that stands out from typical Ubuntu installs. Until then, let me know if you have any questions in the comments and I’ll get back to all of them asap.


Feb 26 2009

Linux For Computer Science Majors

Tag: linux, software, ubuntuScott Wegner @ 12:00 pm

TuxMy name is Scott Wegner, and I’m a Computer Science major at the University of Illinois, Urbana-Champaign.

I’ve had Linux installed as my primary OS for about 3 years, and as a computer science major, it’s certainly my environment of choice.  Not only does Linux deliver a rich desktop environment, but also the command-line and its vast number of utilities are indespensible for any sort of development.  It still suprises me, then, when I see other CS majors at my university who are so unfamiliar with Linux, and who cringe when any programming assignment requires Linux for one reason or another.  It got me thinking.

Our computer science department also has a number of computer labs with Linux machines, accessbile remotely and for physical access.  There are also a few Windows machines for those who prefer Visual Studio, although these machines are generally inferior when it comes to speed and stability.  So why do students still flock to them?  I think it’s because the courses at our university only give a terse introduction to Linux and the utilities that the course will require.  What we need is something that will really show students the ease and the power of Linux.  Maybe a 1-hour tutorial, perhaps a half-day workshop, or even a 1-credit hour introductory course.  Yes.

This wouldn’t be the sort of tutorial you see on the internet that praises Ubuntu for it’s robustness and claims that users should never need the terminal.  CS majors need to embrace the terminal and its utilities.  I asked earlier on identi.ca / twitter what people would talk about, and received a number of great responses.  There’s a whole list of tools that students need to be familiar with to really be productive.

  • grep, less, head, tail
  • vim, emacs
  • make
  • svn, cvs
  • ssh
  • man
  • awk,  sed
  • diff,  sdiff, colordiff

There’s also a lot of tools that would simply make their experience more pleasant, such as screen, rsync, latex, etc.  Having an understanding, or at least a crude familiarity of these utilities would certainly improve a student’s experience on projects which require them.  It may even convince them to try the faster Linux machines next time they visit the computer labs.

But how would one structure such a course?  I think a 1-hour weekly lab workshop would be the best setting.  The course could revolve around some simple in-class project that utilizes each of these tools.  Each week could introduce a new command, looking into it’s basic syntax and functionality, as well as providing links and resources to explore its advanced usage.  The majority of class time would be spent working on the project, trying each new command and using it to solve some basic problem.  The hands-on section would be crucial, as this is will instill the basic familiarity that students will hold with them for later courses.  I also think it would be useful to have extra time after class for “install-fests”.  This would give students the opportunity to install Linux at home and see if they would like it– either in a virtual machine, via Wubi, or on a physical drive.  They should be offered, optionally of course, once at the beginning of the semester, half-way through, and towards the end.

So what do you think– could something like this work?  Would it be helpful?  Have you heard of a university that provides something similar?  And what applications would you add to the list?  Let’s hear it in the comments.


Sep 20 2008

Lock Down Your Ubuntu Computer with A Bluetooth Cellphone and BlueProximity

Tag: linux, open source, software, ubuntuScott Wegner @ 10:29 am

A couple weeks ago I bought a bluetooth adapter for my computer in hopes that I could easily backup my cellphone contacts on my computer.  I haven’t yet found a program to sync my cellphone data, but I did find a program to use your phone to lock and unlock your screen when you leave and come back to your desk.  With BlueProximity, your cellphone acts as a wireless “key” to your desktop.

Continue reading “Lock Down Your Ubuntu Computer with A Bluetooth Cellphone and BlueProximity”


Sep 12 2008

Organize Your ToDo List in Ubuntu with Remember The Milk and Tasque

Tag: how-to, linux, open source, productivity, software, ubuntuScott Wegner @ 8:22 pm

I am a big fan of the previously mentioned Remember The Milk productivity webapp.  It does one thing– manages your Todo list– and it does it very well.  Remember The Milk offers a clean web interface, as well as integration inside Gmail, Google Calendar, and even has an iPhone app.  The only thing that was missing for me, though, was a simple interface for the Linux desktop.  Enter Tasque.

Continue reading “Organize Your ToDo List in Ubuntu with Remember The Milk and Tasque”


Jun 25 2008

How To: Host a Subversion Repository in Ubuntu Hardy

Tag: deep thoughts, diy, food, how-to, linux, open source, review, software, ubuntuScott Wegner @ 10:46 pm

Have you ever wanted to set up a subversion repository on your home computer? Whether it be for a new software project, versioning your personal documents, or any other reason, there are many benefits to using version control. Some free websites that will host your project for you, such as SourceForge or Google Code, but it’s often necessary to have a little bit more control.

I set up a subversion repository for a new project the other day, and the process was relatively painless. I’m using a standard Ubuntu Hardy Heron 8.04 desktop setup, with OpenDNS and DD-WRT for port-forwarding, and without an Apache web server. Keep reading to host your own subversion repository server.

Continue reading “How To: Host a Subversion Repository in Ubuntu Hardy”


Jun 11 2008

Firefox 3 Download Leaked Early in Ubuntu Hardy

Tag: Firefox, linux, open source, software, ubuntuScott Wegner @ 2:48 pm

Well, it’s all but confirmed now.  With Firefox 3 download day set to hit any time this month, it looks like the Firefox developers are preparing.  As a result, it appears that the final release of Firefox 3 hit the hardy-proposed repository this morning.  I installed the update, and am running it now.  Check it out:

And you can see the version string through Synapic Package Manager:

The latest in hardy-updates is “3.0~rc1+nobinonly-0ubuntu1″, but this version string is “3.0+nobinonly-0ubuntu0.8.04.1″, clearly lacking any “release candidate” tag.  Could this be the real deal?  It was probably uploaded in an effort to make sure that Ubuntu users are able to access it in hardy-updates on release day, so they have a better chance at their world record.

If you want to download this pre-release for yourself, all you need to do is enable the hardy-proposed repository:

  • Go to System > Administration > Sofware Sources
  • Click on the “Updates” tab, and make sure the box for “Unsupported Updates” is checked
  • Press “Close”, and let the package manager refresh.

Afterwards, you should see the update icon in your taskbar, with the latest Firefox 3 ready to go! Note, however, that the hardy-proposed repository does contain *unsupported* updates.  To be on the safe side, you should disable it after you install Firefox.

Has anyone else been running Firefox 3 yet?  Have you noticed any differences?  Mine feels a little faster, although that may be due to the fact that a few extensions are still incompatible.


May 28 2008

How-to: Enable Surround Sound on Ubuntu Hardy

Tag: film, how-to, linux, music, ubuntuScott Wegner @ 6:36 pm

By default, Ubuntu Hardy Heron uses PulseAudio for audio mixing, which disables surround sound by default. I just bought new 5.1-channel speakers, but I was only heard sound coming from the front two. Disappointed, I went searching for the answer in the forums. If you want surround sound on your Linux setup, keep reading below..

Continue reading “How-to: Enable Surround Sound on Ubuntu Hardy”


Apr 24 2008

Get Ubuntu 8.04 Hardy Heron Today!

Tag: linux, open source, software, ubuntuScott Wegner @ 11:17 am

Well, it’s finally here, the latest release from the Ubuntu team.  Ubuntu 8.04 “Hardy Heron” is the second in the line of “long term releases”.  This means that Canonical and the Ubuntu team will continue with support and updates for 3 years on the desktop edition, and 5 years for the server.

If you’re ready to convert a new system today, the fastest way to get Ubuntu will be through torrents.  If you’re upgrading an Ubuntu system, simply open the Update Manager and it’ll show a new option to upgrade.  Make sure you’ve selected local repositories, because the servers are going to get hit hard today.

Be sure to check out the desktop feature tour.  And if you plan on burning some Ubuntu CDs, print off the CD album artwork for the cases.


Apr 22 2008

Ubuntu Upgrade, Hardy Goals

Tag: linux, open source, ubuntuScott Wegner @ 12:36 pm

Our countdown to Hardy is nearing its end; we are just days away from the final release of the latest version of Ubuntu, codenamed Hardy Heron.  I’ve been testing since the alpha release, and I can safely say that it’s come along way.  It also marks about a year since I installed Linux for the first time.  I feel like I’ve learned a lot in the process.  However, I think I want to start clean with Hardy, and setup my system with a few goals in mind:

  • Drop Windows Vista:  Currently I have a dual boot setup with Vista on a separate partition.  But at this point, it’s a waste of space, and a waste of energy everytime I boot into it.  The only reason left for using it has been for Netflix, but I think I can live without it.  Worst-case scenario, I can setup Wine or a virtual machine.
  • Separate /home Partition: I think this should be done on new Ubuntu systems by default, but alas, it’s not.  By putting your /home directory on its own partition, it’s very easy to separate your data from program files.  This makes it very easy to upgrade, or share your /home folder in a dual-boot.
  • Optimize MythTV: I have a TV tuner card in my computer, and I’ve only been using it experimentally at this point.  But with Hardy and a clean system, I’d like to install MythTV and really use my computer for it’s media-center potential.
  • Leave Some Test Space: Along with Ubuntu 8.04 coming out in the next couple days, there are also many other great Linux distros planning releases right around the corner.  I’d like to set aside a partition on my system for testing on distros, such as Fedora, openSUSE, or Debian.

Next Page »