Archive

Posts Tagged ‘howto’

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, http://www.ocztechnology.com/ocz-agility-3-sata-iii-2-5-ssd.html) 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

Steps:
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.

Advertisements

Ajax long polling with Django

October 7, 2010 Leave a comment

This post is to document the steps I took to make the ajax long polling example on http://blog.gevent.org/2009/10/10/simpler-long-polling-with-django-and-gevent/ work on Centos 5.5 (32bit):
0) Prepare
a. add additional repositories
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm
# if the above step returns "rpmforge-release-0.5.1-1.el5.rf.i386.rpm: (sha1) dsa sha1 md5 gpg OK", continue
rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm

[ credit: http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm ]

b. install python-setuptools
yum install python-setuptools

1) Install greenlet
cd /tmp
wget http://pypi.python.org/packages/source/g/greenlet/greenlet-0.3.1.tar.gz#md5=8d75d7f3f659e915e286e1b0fa0e1c4d
tar xzf greenlet-0.3.1.tar.gz
cd greenlet-0.3.1
python setup.py install

2) Install Cython
wget http://www.cython.org/release/Cython-0.13.tar.gz
tar xzf Cython-0.13.tar.gz
cd Cython-0.13
python setup.py install

3) Install mercurial (which provides the tool hg to download gevent in the next step)
yum install mercurial

4) Install gevent and the webchat example
cd /tmp
hg clone http://bitbucket.org/denis/gevent
cd gevent
python setup.py install

5) Install Django
cd /tmp
wget http://www.djangoproject.com/download/1.2.3/tarball/
tar xzvf Django-1.2.3.tar.gz
cd Django-1.2.3
sudo python setup.py install

6) Install python-uuid, python-simplejson and python-sqlite2
easy_insall uuid
yum install python-simplejson
yum install python-sqlite2

[ the first command in this step can be substituted with yum install python-uuid I believe, though I didn’t try it because easy_install uuid works ]

7) Run the webchat example
cd /tmp/gevent/examples/webchat
python run.py

Categories: django, howto Tags: ,