Speed up your Ubuntu machine boot time

If you are using Ubuntu 10.04, you may already know that one of its feature is to be able to boot faster. Here’s an article on how to enable your Ubuntu to do so. Original post is located here.

[singlepic id=264 w=160 h=120 float=left]Are you desperately searching for ways to finally reach that elusive 10 second boot time? You certainly heard that Ubuntu 10.04 has the capability of doing just that right? It can…but you have to help it along. One of the ways you can help your boot time is removing unnecessary services and drivers that are loaded at boot time. Fortunately, this isn’t something you have to manually do. How is this? There is a tool that can help the Grub boot loader learn what it is you need at start up. This tool is called profile.

Profile is not a tool you install, or run from the command line. Instead, profile is an option you add to your grub configuration file to inform the boot loader you want to create a profile during the next boot loading sequence. In this article I am going to show you how to profile your grub boot sequence for a faster boot process.

How this works

When you boot up your machine Grub does a search for all the necessary drivers to load. This takes time. Instead of making Grub search for these drivers, the profiling actually makes Grub remember every driver necessary to work, thereby cutting down all of the driver load times.

This is a proven technique that can help the boot process. It has actually been around since Ubuntu 6.04, so it has been tested and tested and does work. I will make this normal disclaimer. Even though Grub profile works, anytime you deal with your bootloader you take the chance that you can render your machine unbootable. So you use this tool at your own risk. Don’t take that to mean profile is a dangerous tool and your machine will wind up bricked and mocking you…that is just to say should something happen, you were warned.

How to add profiling

To do this you are going to have to modify your /etc/default/grub file. The edits are not challenging at all. So, open up a terminal window and get ready to work.

The line you are looking for is:

     GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

This is the line that gives the options to Grup upon boot. You need to add one more option to that line so it now looks like:

     GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash profile”

Save that file and then issue the command:

     sudo update-grub2

You are ready to reboot your machine.

During this next boot time you will see a noticeable SLOW DOWN. This is normal because Grub is now running the profile. This is quite necessary.

Once the boot up is complete, open up that /etc/default/grub file, remove the profile entry you just added, and re-run the command sudo update-grub2. Now reboot your machine again and see if you don’t notice a distinct speed increase in your boot times.

Final thoughts

There are so many ways to speed up the boot process of your Ubuntu Linux machine. This process, however, is one of the ones that will truly speed up the process and is tested and safe to use. You should gain some noticeable increases and should even speed up after 2 or 3 more start ups.

Ailurus – A Useful Ubuntu Tweak Alternative For Beginners

Just found this article that showcase a simple program to help newbies configure their Ubuntu system. I personally haven’t tried it yet, but it seems to be able to help the basic needs of configuring your Ubuntu without using multiple GUIs or even using command lines to change the configuration files.

The original post is located here.

Ailurus is cross-Linux-distribution GPL software, which aims at making Linux easier to use for beginners. Rather than a Ubuntu Tweak alternative, Ailurus is the kind of app you can use along Ubuntu Tweak. Ailurus is available for Ubuntu, Fedora and Mint while Ubuntu Tweak is a dedicated Ubuntu only application.

[singlepic id=263 float=center]

Ailurus Features

  • ‘Study Linux’ feature included in Ailurus is pretty good at teaching the Linux basics to beginners. You can even set it to display Linux tips each time you login to your system.
  • Install many useful applications easily.
  • Enable a number of third party repositories quite easily.
  • Display of basic hardware information which is so useful at times.
  • Clean APT/YUM cache.
  • Backup and recover APT/YUM status.
  • Change GNOME settings. Ailurus invokes GConf API, to change GNOME settings.
  • Easily enable Gnome Control Center using Ailurus.

How to install Latest Ailurus 10.06.93 in Ubuntu Lucid, Karmic?

  • Open Terminal (Applications – Accessories – Terminal) and copy-paste the following lines one by one into Terminal.
  •      sudo add-apt-repository ppa:ailurus
         sudo apt-get update

  • Done. Now install latest Ailurus in Ubuntu Lucid 10.04.
  •      sudo apt-get install ailurus

  • Done. Launch Ailurus. Goto Applications – System Tools – Ailurus.

Ailurus for Fedora and other distros can be downloaded from here.

Google Chrome on Ubuntu (well, sort of)

Most of us already know that one of the fastest browser out there is Google Chrome. Sadly enough, Google Chrome is only available on Windows platform, while the Mac and Linux users are left to run Safari or Firefox. The good thing is that Google has listened to those requests and are currently developing the native version of Chrome to Mac and Linux.

But for those who can’t wait, there is a way to get Chromium (the open-source platform on which Google Chrome is based). Here are the steps (originally taken from here):

First you need to edit the /etc/apt/sources.list file:

     sudo gedit /etc/apt/sources.list

Add add the following lines if you are using Ubuntu 9.10 (Karmic Koala):

     deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
     deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main

Save and exit the file.

Now add the GPG key using the following command:

     sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5

Update the source list using the following command:

     sudo apt-get update

Then you can install chromium using the following command:

     sudo apt-get install chromium-browser

After a successful installation, you can open chromium from Applications—>Internet—>Chromium Web Browser:
[singlepic id=261 w=320 h=240 float=center]

Here’s a sample picture of what Chromium looks like on Ubuntu:
[singlepic id=262 w=320 h=240 float=center]

Alternatively, there’s a script created by Jeff Rader to automate the installation of Chromium. His script can be downloaded here. Do not forget to change the permission to executable before running the script.


Run your own Ubuntu Enterprise Cloud, part 3

A continuation and final article on how to set up cloud computing on Ubuntu. This information is originally posted here.

In part 1 and part 2 of this series, we saw how to set up a minimal cloud infrastructure and bundle a basic image (and test it). In this final article, we’ll play with our cloud from an end-user perspective.

Setting up the web UI

First of all, before accepting end users, as the administrator of the cloud you will have to setup a few things on the web UI. Using your favorite browser, you should:

* Open https://cloudcontroller:8443/
* Log in using the default user/password: admin/admin
* Change the default password, setup the cloud admin email address
* Logout

Setting up the cloud client

We’ll use Ubuntu 9.10 beta for this purpose, as it includes all the needed packages, and it’s so great ! You will have to install the following packages:

      $ sudo apt-get install euca2ools unzip

Registering on UEC, getting credentials

As the end-user, fire up your favorite browser and:

      * Open https://cloudcontroller:8443/
      * Click “Apply” and enter your end user details

If you set up the email correctly on your cloud controller, it should send an email to the cloud admin address asking him to approve that request. Follow the instructions on that email to approve the account as the admin.

You should then get an email at the end user email address asking you to confirm the account request. Follow the instructions on that email, then you can log in on the web UI:

      * Open https://cloudcontroller:8443/
      * Login using your end user username and password
      * Click “Download Credentials” in the “Credentials” tab
      * Note the EMI reference you can use on the “Images” tab

Starting up an instance

You should unzip the credentials zipfile you just downloaded, then source the eucarc file and test the connection:

      $ unzip euca2-enduser-x509.zip
      $ . eucarc
      $ euca-describe-availability-zones verbose

Setup a SSH key and allow connection to the SSH port:

      $ euca-add-keypair enduserkey > enduserkey.priv
      $ chmod 0600 enduserkey.priv
      $ euca-authorize default -P tcp -p 22 -s

Then starting up an instance is just a matter of passing the right EMI and type:

      $ euca-run-instances -k enduserkey emi-XXXXXXXX -t c1.medium

Enjoy !

Run your own Ubuntu Enterprise Cloud, part 2

A continuation on how to set up cloud computing on Ubuntu. This information is originally posted here.

In part 1 of this series, we saw how to install the cloud infrastructure. In this article, we’ll bundle and upload an EMI (Eucalyptus Machine Image), based on Ubuntu Server 9.10 Beta, and validate that we can run an instance of it.

Download required elements

Go to the cloud/cluster controller and download the required items.

For a 64-bit image:

      $ URL=”http://uec-images.ubuntu.com/releases/karmic”
      $ wget -O image.gz $URL/beta/ubuntu-uec-karmic-amd64.img.gz
      $ wget -O vmlinuz $URL/beta/ubuntu-uec-karmic-amd64-vmlinuz-
      $ wget -O initrd $URL/beta/ubuntu-uec-karmic-amd64-initrd.img-

For a 32-bit image:

      $ URL=”http://uec-images.ubuntu.com/releases/karmic”
      $ wget -O image.gz $URL/beta/ubuntu-uec-karmic-i386.img.gz
      $ wget -O vmlinuz $URL/beta/ubuntu-uec-karmic-i386-vmlinuz-
      $ wget -O initrd $URL/beta/ubuntu-uec-karmic-i386-initrd.img-

Bundle the EMI

First you should unpack and resize your image to the desired size, lets say 4Gb. This can take a very long time (15 minutes !) on slow disks as you unpack 10Gb-worth of image space:

      $ zcat -f image.gz | cp –sparse=always /dev/stdin image
      $ e2fsck -f image
      $ resize2fs image 4G
      $ truncate –size=4G image

Then bundle and upload the kernel:

      $ . eucarc
      $ euca-bundle-image -i vmlinuz –kernel true
      $ euca-upload-bundle -b ueckernel -m /tmp/vmlinuz.manifest.xml
      $ euca-register ueckernel/vmlinuz.manifest.xml

Take note of the EKI reference, you’ll need it later. Then bundle, upload and register the ramdisk:

      $ euca-bundle-image -i initrd –ramdisk true
      $ euca-upload-bundle -b uecramdisk -m /tmp/initrd.manifest.xml
      $ euca-register uecramdisk/initrd.manifest.xml

Take note of the ERI reference. Finally, bundle the image with the kernel and ramdisk, upload and register:

      $ euca-bundle-image -i image –kernel eki-KKKKKKKK –ramdisk
      $ euca-upload-bundle -b uecimage -m /tmp/image.manifest.xml
      $ euca-register uecimage/image.manifest.xml

Bundling will also take a lot of time ! Take note of your EMI reference.

Start an instance of your EMI

In order to access your instance using SSH, you’ll need to setup a few one-time things (create a SSH key and authorize access to port 22 of your instances):

      $ euca-add-keypair mykey > mykey.priv
      $ chmod 0600 mykey.priv
      $ euca-authorize default -P tcp -p 22 -s

Now it’s time to start your instance !

      $ euca-run-instances -k mykey emi-XXXXXXXX -t c1.medium

The “c1.medium” VM type is sufficient by default to run a 4Gb instance. You should take note of the i-YYYYYYYY reference that is displayed on your INSTANCE line. The first time you start an EMI, it can take some time (like 10 minutes) to move from “pending” state to “running”, depending on size. You can use the following command to automatically watch the output of euca-describe-instances, every 5 seconds:

      $ watch -n 5 euca-describe-instances

Take note of the first ZZZ.ZZZ.ZZZ.ZZZ IP address mentioned in the output of the command. When the instance is “running”, ctrl-C to exit watch, then:

      $ ssh -i mykey.priv ubuntu@ZZZ.ZZZ.ZZZ.ZZZ

You are in ! When you’re done playing with your instance, just run the following command on the cloud/cluster controller.

      $ euca-terminate-instances i-YYYYYYYY

In the third and last part of this series of articles, we’ll talk about how to run instances from another workstation, as a cloud “customer”.

Run your own Ubuntu Enterprise Cloud, part 1

This information is originally posted here.

Ubuntu Enterprise Cloud is the product, powered by Eucalyptus, that allows you to easily run your own Amazon-EC2-like private cloud. It’s a lot simpler than you’d think. With the recent Ubuntu Server 9.10 beta release, you are now able to easily deploy that infrastructure from the CD installer.


To deploy a minimal cloud infrastructure, you’ll need at least two dedicated systems. One will hold the cloud controller (clc), the cluster controller (cc), walrus (the S3-like storage service) and the storage controller (sc). This one needs fast disks and a reasonably fast processor. The other system(s) are node controllers (nc) that will actually run the instances. These ones need CPUs with VT extensions, lots of CPU cores, lots of RAM, and fast disks. For both, 64-bit support is highly recommended.

Installing the cloud/cluster controller

Download the 9.10 Server beta ISO. When you boot, select “Ubuntu Enterprise Cloud install”. When asked whether you want a “Cluster” or a “Node” install, select “Cluster”. It will ask two other cloud-specific questions during the course of the install:

      1. Name of your cluster: pick any name you want 🙂
      2. List of IP addresses on the LAN that the cloud can allocate to instances:
         enter a list of space-separated unused IP addresses on your LAN.

When it reboots, run the following to get the latest eucalyptus package and reboot:

      $ sudo apt-get update
      $ sudo apt-get upgrade
      $ sudo reboot

Installing node controllers

The node controller install is even simpler. Just make sure that you are connected to the network on which the cloud/cluster controller is already running. Take the same ISO, select “Ubuntu Enterprise Cloud install”. It should detect the Cluster and preselect “Node” install for you. That’s all.

It is also recommended to update to the latest 9.10 status:

      $ sudo apt-get update
      $ sudo apt-get upgrade

Connect your node controllers to the cloud

After all nodes are installed, you need to return to the cloud/controller and run the following command to make it “discover” your newly-installed nodes.

      $ sudo euca_conf –no-rsync –discover-nodes

Confirm all the nodes it finds, and you are done. To check that your private cloud infrastructure is ready to serve, you need to retrieve admin credentials and run euca-describe-availability-zones command. Run the following on your cloud/cluster controller:

      $ sudo euca_conf –get-credentials mycreds.zip
      $ unzip mycreds.zip
      $ . eucarc
      $ euca-describe-availability-zones verbose

This last command returns a description of the capabilities of your cloud cluster, how many instances of each type you could run on it, for example:

AVAILABILITYZONE |- vm types  free / max  cpu  ram disk
AVAILABILITYZONE |- m1.small  0004 / 0004  1   128    2
AVAILABILITYZONE |- c1.medium 0004 / 0004  1   256    5
AVAILABILITYZONE |- m1.large  0002 / 0002  2   512   10
AVAILABILITYZONE |- m1.xlarge 0002 / 0002  2  1024   20
AVAILABILITYZONE |- c1.xlarge 0001 / 0001  4  2048   20

In part 2 of this series, we’ll cover bundling your first EMI (Eucalyptus Machine Image), based on Ubuntu Server 9.10 Beta. We’ll test it by starting an instance of it. Stay tuned !

How to connect iPhone/iPod Touch (Using USB) in Karmic/Jaunty/Intrepid/Hardy

Here’s a link I found from Twitter about using iPod / iPhone with Ubuntu.

How to connect iPhone/iPod Touch (Using USB) in Karmic/Jaunty/Intrepid/Hardy.

If you want iphone/ipod touch in ubuntu easy way is using iFuse program.

iFuse allows you to mount an iPhone or iPod Touch under Linux using the USB cable. You can view and edit the files similar to a normal USB disk drive. iFuse does not require “jailbreaking” or voiding your warranty and works without needing extra software installed on the phone (such as `ssh`).

libiphone is a software library that talks the native Apple USB protocols that the iPhone uses. Unlike other projects, `libiphone` does not depends on using any existing `.dll` or `.so` libraries from Apple.

iFuse is a FUSE filesystem driver which uses `libiphone` to connect to devices without jailbreak. iFuse is using the native Apple “AFC” protocol, over the normal USB cable in order to access the iPhone’s (or iPod Touch’s) media files under Linux.

Once the iPhone is mounted, you can copy on, or copy off any media files that live inside the `/var/root/Media` chroot directory. This includes photographs and music files.

Install iFuse in Ubuntu

First you need to edit the /etc/apt/sources.list file

      sudo gedit /etc/apt/sources.list

Add the following lines

For karmic Users

      deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu karmic main
      deb-src http://ppa.launchpad.net/jonabeck/ppa/ubuntu karmic main

For Jaunty Users

      deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu jaunty main
      deb-src http://ppa.launchpad.net/jonabeck/ppa/ubuntu jaunty main

For Intrepid Users

      deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu intrepid main
      deb-src http://ppa.launchpad.net/jonabeck/ppa/ubuntu intrepid main

For Hardy Users

      deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu hardy main
      deb-src http://ppa.launchpad.net/jonabeck/ppa/ubuntu hardy main

Save and exit the file.

Now install gpg key using the following key

      sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com F0876AC9

Update source list using the following command

      sudo apt-get update

Install ifuse using the following command

      sudo apt-get install ifuse

Now you can plug in your ipod Touch or Iphone and it will appear in your desktop.

10 Unknown but Useful Linux Terminal Commands

The original post was here.

Before, I have posted here a few basic Linux terminal commands that I think are essential for newbies to know. I’ve also shared some deadly ones that should be avoided at all costs. This time, I’m going to show you several terminal commands that are perhaps unfamiliar to many new-to-Linux users but could be really handy when used properly.

Here’s a list of 10 rather unknown yet useful Linux terminal commands:

1. Kill a running application by its name:
      killall [app_name]

2. Display disk space usage:
      df –h

3. Locate the installation directories of a program:
      whereis [app]

4. Mount an .iso file:
      mount /path/to/file.iso /mnt/cdrom –o loop

5. Record or capture a video of your desktop:
      ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg

6. Find out the Universally Unique Identifier (UUID) of your partitions:
      ls /dev/disk/by-uuid/ -alh

7. Show the top ten running processes (sorted by memory usage):
      ps aux | sort -nrk 4 | head

8. Make an audible alarm when an IP address goes online:
      ping -i 60 -a IP_address

9. Run the last command as root:
      sudo !!

10. Make a whole directory tree with one command:
      mkdir -p tmp/a/b/c

Note: There are some problems on doing number 9 above, so you may want to try it out and let me know.