Monthly Archives: October 2007

Enabling Suspend on the Macbook : Ubuntu 7.10

In continued testing on my macbook it appears that I have suspend working solidly. If you enjoy this feature you may want to look into this tutorial. I have never really used suspend/hibernate much in the past because it has been buggy, but now that it appears to be working well I think I may give it a try.

note: To use suspend (in my experience) on the macbook you have to downgrade the 2.6.22-14 kernel (current in 7.10) to the 2.6.22-12 kernel. I don’t think there are many huge changes between the two, and I have not seen a loss of other functionality, but I figured I should get that out of the way right at the start. If you’re not comfortable reverting your kernel or know a specific reason you should not, you can stop reading here.

Suspend on the Macbook

Suspend is a nice feature that lets you virtually “pause” your machine to be brought back in its exact state at a later time. This is very nice for laptops and mobile machines that are always on the go and going up and down quite a bit. The current kernel in Ubuntu 7.10, the 2.6.22-14 kernel, has a few issues with suspend. It will allow machines to go into suspend, but not properly come back again. (bug #151016).

Installing the required kernel packages

As mentioned above the last known kernel version to properly support suspend on the macbook (and some other models – see the bug report for details) is the 2.6.22-12 kernel. The following steps will help you install the packages needed in order to run that kernel version and enable the suspend feature. Install the following packages in this order:

  1. sudo aptitude install linux-image-2.6.22-12-generic
  2. sudo aptitude install linux-headers-2.6.22-12
  3. sudo aptitude install linux-headers-2.6.22-12-generic
  4. sudo aptitude install linux-ubuntu-modules-2.6.22-12-generic
  5. sudo aptitude install linux-restricted-modules-2.6.22-12-generic

You’ll next need to update your grub settings to use this kernel instead of the current latest automagically at boot time. If you are running the stock Ubuntu 7.10 installation with the 2.6.22-14 kernel (at the time of this writing this is the only kernel released for 7.10) it is a very simple update. Edit the /boot/grub/menu.lst file and change the default line from 0 to 2.

If you have other kernel images installed take a look into the file, view the boot entries near the bottom and look for the one listed as 2.6.22-12. Count down from the first entry starting with 0 (ie; 0,1,2,3…) and replace your default line to that number. REMEMBER GRUB STARTS COUNTING AT ZERO, NOT ONE.

At this point you should be able to reboot and test suspend. In my use it has been solid since making the above changes. Also note that if you have compiled anything against your previous kernel you’ll need to do it again for this version. (ie; if you followed yesterdays post about compiling wireless support for the macbook you’ll need to repeat those steps.)

WordPress Blog Fix

Ok, some of you might notice a small hiccup in the blog-time continuum.  This is because I reverted to a backup earlier in the day after rebuilding the database from a fresh installation.  What a pain, let me tell you.  If you notice anything weird about the blog please let me know.  From my testing I wasn’t able to find anything.  This *should* be a good, working, fresh copy of the blog now.. I hope.

How Did I Fix It?

  1. I installed a new blog from scratch at a separate location using the latest version of WordPress.
  2. I used the Manage > Export feature within the original WordPress to export the posts, comments and categories.
  3. I used the Import > WordPress feature within the new blog to pull in the posts, comments and categories.
  4. I verified functionality, manually updated the blog name and URL, etc (mainly a few things on the options menu)
  5. Exported the new database via phpmyadmin and saved it to disk.
  6. Opened the .sql file with vim and did a find/replace to update the new blog url for the original (ie; :%s/
  7. Verified the ‘siteurl’ value and ‘home’ value both matched the original site URL address.
  8. Threw out the original blog via phpmyadmin by selecting the database, ‘check all’ on the tables and selecting ‘drop’.
  9. Imported the newly exported and updated database to overwrite what was just dropped.
  10. Log back into the original site and the blog should be functional.


I’m Asking For Your Help Spreading the Word

As many of the regular readers out there know I enjoy trying to educate the public about Ubuntu and Linux in general. By day I teach Linux as part of a company called Guru Labs. By nite I am a blogging super-hero that tries to document simple steps to making your Ubuntu machine more productive. I expect that with this new release of Ubuntu 7.10 that more and more people will be making the switch, and as part of the community it’s our job to help educate them. Today I would like to ask for your help with just that and it’ll just take a second.

If You Have a Blog

If you have a blog I would like to ask for a link on your blog roll. Each additional link on the web that can point here may lead to one more user finding and getting the tip they need and making Ubuntu more productive than what they might currently be using. If you are willing please add “Ubuntu Tutorials” to your blog roll pointing to the home page,

If You Don’t Have a Blog

If you don’t have a blog and you read this via an RSS or email subscription please consider one of the following:

  1. If you subscribe indirectly, ie; via one of the many Planets, consider a direct RSS subscription to Ubuntu Tutorials.
  2. If you know someone that could use these tips consider helping them subscribe via RSS (Google Reader is a good option).
  3. If you know someone not quite ready for RSS perhaps forward them the Email Subscription link.

I am really passionate about educating people about Ubuntu and Linux–its what I do and I really enjoy it. I can only educate those that know where to come, and for that I need your help.

Thank you for being willing to spread the word. I try hard on this blog and I hope you all appreciate and have found parts of it useful. Thank you for your consideration in spreading the word.

How To Enable Wireless Networking on the Macbook : Ubuntu 7.10

With the new release of Ubuntu 7.10 I figured I should go back and revisit some of my macbook specific tutorials.  Today I’ll touch on configuring / enabling wireless on the macbook (second-gen) in Ubuntu 7.10.

Enable Wireless on the Macbook

  1. sudo aptitude install build-essential
  2. wget -c
  3. tar -zxf madwifi-trunk-current.tar.gz
  4. cd madwifi-ng-*
  5. make
  6. sudo make install
  7. sudo modprobe ath_pci
  8. sudo modprobe wlan_scan_sta

You should now be able to scan for wireless broadcasts and connect to available networks without restarting your machine.  Enjoy.

AptURL : Web Based Package Installation

Some of you may have seen some recent posts around the Ubuntu Planet about the new AptURL project that is default in Ubuntu 7.10 “Gutsy”. I wanted to make a few comments about it myself after tinkering with it a little. I think the project and idea is pretty cool and I hope it sees some more use.

I may be updating my blog in the future to take advantage of AptURL. I suppose to maintain backwards compatibility I’ll need to use both, but we may begin seeing tutorials along these lines:


Installing non-free codec pack

sudo aptitude install ubuntu-restricted-extras

For those using Ubuntu 7.10 you should be able to simply click the link and the package should prompt for installation. If it does not try installing the apturl package. Those still using previous versions will still need to type the command on the command line.

Does anyone have any thoughts on seeing this on the blog moving forward? Good? Bad? Indifferent? I think it may make some tutorials a bit simpler for some users.

How To Upgrade Ubuntu 7.04 to Ubuntu 7.10 on Ubuntu Server

It was pointed out to me this morning that my previous Ubuntu upgrade instructions did not include upgrading Ubuntu Server. I thought I’d take a second and type those up as well. They are pretty simple (as all of the upgrade options intend to be), so you really shouldn’t need to do much.

Preparing for the Upgrade – Ubuntu Server

You’ll want to make sure that your current installation is completely up to date first. Repeat the below steps until no more updates are offered:

  1. sudo aptitude update
  2. sudo aptitude upgrade
  3. sudo aptitude dist-upgrade

Upgrading Ubuntu 7.04 to 7.10 – Ubuntu Server

To upgrade your Ubuntu Server from 7.04 to 7.10 follow these few steps and you’ll be presented with a menu that will walk you through the upgrade process.

  1. sudo aptitude install update-manager-core
  2. sudo do-release-upgrade

Enjoy. Between this and the previous tutorial on upgrading Ubuntu I would hope that everyone is covered. If you run into upgrading problems please report them on launchpad and double check that you’ve followed all of these steps correctly.

How To Upgrade To Ubuntu 7.10 “Gutsy Gibbon” (Gnome, KDE and Manual Steps)

I wanted to outline instructions on how to upgrade from Ubuntu 7.04 to Ubuntu 7.10. The upgrade steps try to be very user friendly and can be done without any manual “command line trickery”. Upgrading using these methods are only supported for machines currently running Ubuntu 7.04.

Preparing for the Upgrade – Gnome Desktop

Before you attempt to upgrade from 7.04 to 7.10 you need to make sure that your current installation is completely up to date. This will help avoid conflicts or missed packages during the upgrade process.

Navigate to “System > Admin > Update Manager”. Click the “Check” box. If there are any updates available at this point first install them before attempting the complete upgrade.

Upgrading 7.04 to 7.10 – Gnome Desktop

If no updates are available (or if you’ve finished installing anything remaining) again select the “Check” box. You should now be presented with a message “New distribution release ‘7.10’ in available“. To the right of this box select the “Upgrade” button and follow the few prompts. Your machine will now be updates via the Ubuntu repositories.

Preparing for the Upgrade – KDE Desktop

On the KDE (Kubuntu) Desktop you’ll also need to make sure that your machine is fully up to date pending the complete upgrade. To do this navigate to “KMenu > System > Adept Manager (Manage Packages).” From this application select “Adept > Manage Repositories”, enable “Recommended Updates” and then close and reload the Adept Manager.

When the Adept Manager reloads select “Full Upgrade” and “Apply Changes”. Allow all Recommended Updates to be installed and close the Adept Manager.

Upgrading 7.04 to 7.10 – KDE Desktop

If your system is completely up to date navigate to “KMenu > System > Adept Manager (Manage Packages)” and the upgrade wizard will be presented to you. Simply follow the prompts and your machine will be updates from the Ubuntu repositories.

Upgrading Using The Alternate CD

If you’ve downloaded the Ubuntu Alternate (text based) installer CD you can also upgrade your machine using the CD. As is traditional with Debian / Ubuntu upgrade mechanisms you do not need to reboot your machine to initiate the upgrader. Please make sure your machine is already upgraded using the above steps before attempting this method.

Follow these steps to upgrade via the Alternate CD:

  1. Download the alternate CD image
  2. Burn the CD image / re-insert the CD OR mount the CD image (sudo mount -o loop ubuntu-7.10-alternate-i386.iso /mnt/)
  3. A dialog should appear on your screen offering to upgrade your system using the CD
  4. If the dialog does not appear (it may not if you use the mount -o loop option), run the following via ALT-F2:
  5. gksudo “sh /media/cdrom/cdromupgrade” OR gksudo “sh /mnt/cdromupgrade”

Ubuntu 7.10 “Gutsy Gibbon” Released / Links To Bittorrent

I’m sure everyone in the world now knows that Ubuntu 7.10 final has been released today.  I am not going to take the time to outline all the details that I’m sure you’ve read elsewhere.  What I do want to do though is make sure that everyone can find a link to the bittorent links.  I’ve heard mention of them not being as obvious on the download page.

Please use this link to download Ubuntu via bittorrent and seed for as long as you can.  Even if you don’t need to upgrade every last bit of shared bandwidth via bittorrent makes a big different for those that do.  I will be updating my dedicated bittorrent server with the latest .isos just as soon as I’m back in town tomorrow, and I’ll spend most of next week seeding the best I can.

Congrats to another amazing release.  Its been fun working on this one.  I’m looking forward to UDS this year and getting started on 8.04!

Automated Ubuntu Installation Preview

I have recently started expanding my research based from previous tutorials on network based installations and PXE booting + network based installations to include automated Ubuntu installations. I will mention that I do not consider myself an expert at this by any means, but I wanted to give some of you a preview of what will end up being a much more mature tool.

Ubuntu and Debian installers use preseed for basically pre-answering installation questions for automated installation. RedHat and Fedora installers use kickstart for the same purpose. Well the Ubuntu installer team has combined these into a project called Kickseed, which basically allows Ubuntu to use RedHat / Fedora based kickstart files for automated Ubuntu installations.

Having worked with kickstart quite a bit I have an interest in the kickseed project and I’d love to contribute to it. Anyone else that would like to see more mature automated Ubuntu installation processes should look into this project as well.

I want to give the Ubuntu Team a little time to finish and release Ubuntu 7.10, but after that perhaps some of us can start focusing on maturing this project and working with the installer team members to do so.

In the meantime, I have a public generic kickstart script you can use to simply preview what can be done. To use this do the following:

  1. Boot the Alternate install CD.
  2. At the boot menu hit ‘esc’ and ‘exit to text mode’.
  3. enter “install ks=

This should automate the entire installation with the following specs:

  • en_US language and qwerty keyboard layout
  • ‘ubuntu’ user with the password of ‘password’
  • 100M /boot, 2048M swap, remaining space for / partitions
  • Gnome desktop with GDM
  • DHCP on eth0

This will, of course, wipe any data from the machine you test it on so give it a shot in a virtual machine or on a test machine. And, again, if you’re interested in using something like this contact me and we’ll see what we can organize towards improvements and maturity.

Installing Guest Additions For Ubuntu Guests in VirtualBox

UPDATE: This post has been updated for more current releases. Please see the new Install VirtualBox Guest Additions article.

As promised in my previous post on installing VirtualBox Open Source Edititon today I’ll be going over installing the Guest Addition tools for better integration between host and guest. These steps have not been tested on other Linux distributions but I’m sure they’ll work about the same way. I tested these on Kubuntu 7.04 running atop Kubuntu 7.10 beta as the host.

Installing Linux Guest Additions in VirtualBox

VirtualBox has made it pretty easy to install the Guest Additions for improved integration between guest and host. Some of these benefits are mouse-capture improvements and improved video resolution. The mouse capture improvements now allow you to control your virtual machine when the mouse is over the window, and seamlessly return to your host when it is not. Improved video resolution should allow you to customize a better resolution for your guests.

What we need to do to install the Guest Additions is select the option from the VirtualBox menu. You’ll want to do this after your guest is running (the guest-additions are installed to the guest, not the host). Select:

Devices > Install Guest Additions...

This sometimes takes a minute so don’t worry if you don’t see anything right away. This should then prompt you and say something along the lines of:

The Guest Additions image is not found on your host. Would you like to download this image now?

We’ll select YES and let it download the image. The image is downloaded to the host machine and then mounted within the guest. This way it can be shared with future guests without needing to download multiple times. It should also prompt you whether or not you’d like to mount the image. Again, select YES.

At this point you should see a disk image mounted on your desktop. What we’ll do here is run a script that will generate the proper modules to allow for guest additions. In my preferred method we’ll do this:

  1. Open a terminal by pressing ALT-F2 and enter “gnome-terminal” on gnome or “konsole” on KDE.
  2. cd /media/cdrom
  3. sudo bash ./VBoxLinux*

This will grind away at generating the proper modules and then prompt you to restart your guest machine. Once this has finished and you’ve rebooted your guest operating system you should have the guest improvements ready to go. No additional configuration for the mouse integration should be needed, but you may have to manually update to a better resolution as wanted.

Hopefully I’ll have the tutorial for building proper network bridging soon as well. Until then, enjoy your virtualization with VirtualBox!