Archive for the ‘ubuntu’ Category

Dualboot Mountain Lion + Ubuntu 12.04 LTS on the same hard drive howto

September 4, 2012 Leave a comment

Shortly after Mountain Lion was released I did a clean installation onto my HP 4530S and have been very happy with the result, but I am also a huge Ubutu fan and I’ve been dual booting Ubuntu 12.04 LTS through a SD card on the same machine. All was working fine except I don’t like the Ubuntu booting speed (it’s one of those 95MB/s 16GB Sandisk SD cards, fast on the paper but it takes over 30-second to boot into Ubuntu) so I decided to dual boot ML and Ubuntu from the same hard drive (Agility 3 SATAIII 120GB, and it turned out to be not very difficult.

What is needed:
1) ML Unibeast installation disk
2) HP Installer (Or Multibeast if on non-HP4530s systems)
3) Ubuntu installation disk

1) Re-partition hard drive ML installation, when I did the ML installation, I started with 1-partition scheme as I was not planning for dual-booting. To re-size the ML partition is a piece of cake (I was amazed how Mac OS X can handle this so well, online resize the OS drive, looking at you Window$), just launch disk utility -> click on the hard drive, click the + sign, adjust the divider, click on the new partition and adjust the size through its size from the text field if needed. The new partition will be created as free space and no other changes are required. Hit Apply.
2) Reboot with Ubuntu installation disk, choose “Something else” when asked how to install, create a ext4 / partition and a 2GB swap partition (adjust the sizes if you want, I have 8GB of RAM so I am not worried about swap that much). My root partition is created as /dev/sdb3, when it comes to boot loader installation, make sure you choose this as where GRUB would be installed, if you choose the wrong partition, first partition, for example, you will need to do some extra work to fix it.
3) Once Ubuntu is installed, reboot with Unibeast, make sure to choose the hard drive ML installation when Chimera menu comes up. Log in to ML and install Chimera again from HP installer (or Multibeast).
4) Shutdown, remove Unibeast installation disk, power up, when Chimera boot logo appears, hit any key you will see the Ubuntu partition along with the original ML partition.

Note: This post is created after I successfully dual boot into the newly installed Ubuntu 12.04 LTS. Cheers.

Switch to classic gnome menu in Ubuntu 11.10 how to

February 10, 2012 Leave a comment

1) open a terminal and run

sudo apt-get -y install gnome-session-fallback
sudo sed -i 's#\(user-session=\)ubuntu#\1gnome-classic#' /etc/lightdm/lightdm.conf

2) Disable auto login if it’s on
User icon on the top-right corner of the screen -> User Accounts -> Unlock -> Automatic Login Off

3) Reboot, click the setting icon on the login screen to make sure GNOME Classic is selected. This needs to be done only once.


To switch back to Unity,

sudo sed -i 's#\(user-session=\)gnome-classic#\1ubuntu#' /etc/lightdm/lightdm.conf
Categories: Tip, ubuntu

[Fresh] Install node.js on Ubuntu server 11.10 (x64) via nvm step by step guide

January 8, 2012 2 comments
sudo apt-get -y install build-essential libssl-dev curl git
cd ~
git clone git://
. ~/nvm/
nvm install v0.6.7     # Current version as of this writing
nvm use v0.6.7
curl | sh      # Optional to install npm but recommended


  • It’s better to put the source command (. ~/nvm/ into your ~/.bashrc since the nvm command might get used quite often:
    if [ -f ~/nvm/ ]; then
        . ~/nvm/
  • If anything goes wrong during nvm install (for example, complaining certain library is not installed, I found the easiest way to re-start the install process is to install the missing library, followed by the removal of installation directory, ~/nvm/src/node-v0.6.7, for example
  • On my ubuntu vm running off an i3 laptop, it took 7 minutes to install node.js v0.6.7, YMMV
  • If you find yourself stuck inside node console, type command process.exit() to get out, solution found from here
Categories: node.js, nvm, ubuntu

Ubuntu 11.10 performance tuning

November 19, 2011 4 comments

I recently upgraded my netbook’s OS to Ubuntu 11.10 and noticed that it’s taking longer than usual to launch programs that I use quite often. For example, it takes 7-8 seconds to launch Google Chrome, about 4 seconds to open terminal. Here’s what I did to make the os run faster without investing with a SSD disk (My root partition is using ext4 fs, skip step 1 through 3 if you are using file systems other than ext3 or ext4):
1. Add the following bold part to the root partition line in /etc/fstab


tune2fs -o journal_data_writeback /dev/sda5

/dev/sda5 is the root partition.

3. change the following line in /etc/default/grub
(bold part is added)

4. Run update-grub
5. Add the following line to /etc/sysctl.conf

NOTE: all the above changes require root privileges.

6. Reboot

The difference? It now takes about 3-4 seconds to launch Google Chrome from cold start.

Categories: howto, ubuntu

How to swith back to classic menu in Ubuntu 11.04

May 13, 2011 1 comment

Ubuntu is trying too hard to be like Mac – with Unity as the default system menu in version 11.04. I for one doesn’t like the change at all, especially I mainly use Ubuntu on my 10″ Acer netbook. The way how Unity works makes it very hard to keep track of windows/applications that are opened, applications that don’t come with a high-resolution icons looks very ugly on the dock.

Fortunately it’s not that complicated to switch back to the “classic” Unbutu menu (which I can say the best menu in the history of Ubuntu), here are the steps with screenshots:

1) Click on the Ubuntu icon on the top left corner, type “login screen” and click on the “Login Screen” application

2) You will see the following

3) Click unlock, enter password and the window should become the following, choose “Ubuntu Classic” from the dropdown menu, click Close

4) Log out current session and log back in and the classic menu should be back

Categories: Tip, ubuntu, Uncategorized

Ethernet bonding howto in Ubuntu 10.10

January 9, 2011 3 comments

Tested in 64bit environment.

1) echo “alias bond0 bonding” > /etc/modprobe.d/bonding.conf
2) apt-get install ifenslave
3) edit /etc/network/interfaces as follows
# The loopback network interface
auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
# change the next three lines according to actual network settings

slaves eth0 eth1
bond-mode balance-rr
bond-miimon 100
bond-primary eth0 eth1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1

4) either do a complete system reboot or the following:
a) /etc/inti.d/networking restart
b) ifconfig eth0 0 (and ignore the error, this [ and the next ] command will delete what ever ip address that eth0 has been originally set to)
c) ifconfig eth1 0
d) adjust the routes if necessary, mostly the default route needs to be replaced (change to via bond0 instead of eth0 or eth1, for example:
route del default dev eth0
route del default dev eth1

Regardless which method is chosen in step 4, it’s usually safer to change the network setting through a local console instead of a remote ssh session.


Categories: Tip, ubuntu

webmin installation on Ubuntu 10.10 server (both 32bit & 64bit)

January 4, 2011 Leave a comment

1) aptitude install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions
2) wget
3) sudo -s (and set password for user root if it hasn’t been done yet)
4) dpkg -i webmin_1.530_all.deb
5) open a web browser to https://server_ip:10000/
accept security certificate warnings if any and log in as root

Categories: howto, ubuntu