Fixing grub boot-loader after installing Windows


If you had linux installed and later thought of installing Windows, it will overwrite your grub boot loader by default.

The fix is quick and easy. So, I would like to document the easy steps for reference.

Previously, I wrote for similar fixing but in Bangla উবুন্তু ৯.১০ : কারমিকে আপগ্রেড করায় সৃষ্ট সমস্যা এবং প্রতিকার

For this solution you gotta have a live CD or USB bootable through which you can Run Ubuntu/Lubuntu (or Mint etc debian distros).

1. Boot up your machine with the LiveCD/USB, you can run the installer just to see the device on HDD containing your linux installation.

It would be something like /dev/sda1 and in ext4.

2. If you haven’t run the installer, you can see the partition table using gparted. Press Alt-F2 and type gparted and hit Enter. 

If it tells you that gparted needs root permission then, instead of just ‘gparted’ type in ‘gksu gparted’ and hit enter. If you wanna know about gksu. Now if you have identified your linux’s / folder partition go to next step.

3. On your terminal (hit Ctrl+Alt+T to pop open) type: sudo mount /dev/sdXY /mnt  here, replace X with a,b,h etc as you found above. Y is the number. For mine it was: sudo mount /dev/sda1 /mnt

4. You haven’t done anything destructive or permanent in the above steps. At this step you will try to revive the old grub. If your ‘/’ (root) folder’s location was /dev/sda1, now you will use it as /dev/sda to refer to the device as a whole. NOT WITH NUMBER

So, at the terminal you will type: sudo grub-install –root-directory=/mnt/ /dev/sdX

It it showed success. You are done. Reboot machine and you will see your old grub2 boot loader. But, Windows might not appear there. Dont panic! Go to next step to fix. :)

5. Boot up in your good old Ubuntu. And fire up your terminal again. Type: sudo update-grub 

It will fetch your windows to the boot loader as well. Cheers!

USB Startup disk


You just installed Windows over your Ubuntu box and that ruined your boot menu leaving Windows as your only option. So, you are forced to use Windows.

Now, every time that happens you gotta find a reliable link that actually works. So, I decided to blog it instead of just sharing on twitter or FB, which I do millions and I never would go browse them while I am at office or with quality company (I wont like someone stalk behind me or let them think I am wasting time at facebook!).

Enough talks, the only valuable input to this post is, I have used  “Universal USB Installer” and that actually work! Others should work too at this HowToGeek article.

Installing Doctrine2 using PEAR


I was having a some sort of hell trying to install Doctrine via PEAR lately.
$sudo pear channel-discover pear.doctrine-project.org
$sudo pear install -o pear.doctrine-project.org/DoctrineORM

Was giving me errors like:
Package "pear.doctrine-project.org/DoctrineORM" dependency "pear.symfony.com/Console" has no releases
Package "pear.doctrine-project.org/DoctrineDBAL" dependency "pear.symfony.com/Console" has no releases
doctrine/DoctrineORM requires package "pear.symfony.com/Console" (version >= 2.0.0)
doctrine/DoctrineORM requires package "pear.symfony.com/Yaml" (version >= 2.0.0), installed version is 1.0.6
doctrine/DoctrineDBAL requires package "pear.symfony.com/Console" (version >= 2.0.0)
No valid packages found
install failed

See, for some unknown reason the versions are not correct for the dependencies. Tried the solutions as stated in this StackOverflow topic for updating PEAR, but didn’t help!

Tried to remove/purge pear. But it didn’t help. Tried to install the Console, Yaml etc separately, also didn’t help.

Then when I tried to purge pear again I got the following error:

Removing php-pear …
Purging configuration files for php-pear ...
dpkg: warning: while removing php-pear, directory '/usr/share/doc/php5-common/PEAR' not empty so not removed
dpkg: warning: while removing php-pear, directory '/usr/share/php/.channels' not empty so not removed

There were some other folders which was reported to be not empty:
/usr/share/php/.registry/
/usr/share/php/.channels/.alias
/usr/share/php/data
/usr/share/doc/php5-common/PEAR/Archive_Tar/docs
/usr/share/doc/php5-common/PEAR

So, I removed them all!

Now, I again installed pear.

sudo apt-get install php-pear
Fingers crossed…

Added Doctrine channel: sudo pear channel-discover pear.doctrine-project.org
And it didn’t say this time that channel is already in registry. Smiling…

Now to fire up doctrine installation, hope this time it works…
sudo pear install -o pear.doctrine-project.org/DoctrineORM

et viola! it did!
Attempting to discover channel "pear.symfony.com"...
downloading channel.xml ...
Starting to download channel.xml (811 bytes)
....done: 811 bytes
Auto-discovered channel "pear.symfony.com", alias "symfony2", adding to registry
downloading DoctrineORM-2.3.0.tgz ...
Starting to download DoctrineORM-2.3.0.tgz (260,644 bytes)
...done: 260,644 bytes
downloading DoctrineCommon-2.3.0.tgz ...
Starting to download DoctrineCommon-2.3.0.tgz (59,473 bytes)
...done: 59,473 bytes
downloading DoctrineDBAL-2.3.0.tgz ...
Starting to download DoctrineDBAL-2.3.0.tgz (143,996 bytes)
...done: 143,996 bytes
downloading Console-2.1.3.tgz ...
Starting to download Console-2.1.3.tgz (51,354 bytes)
...done: 51,354 bytes
downloading Yaml-2.1.3.tgz ...
Starting to download Yaml-2.1.3.tgz (38,573 bytes)
...done: 38,573 bytes
install ok: channel://pear.doctrine-project.org/DoctrineCommon-2.3.0
install ok: channel://pear.symfony.com/Console-2.1.3
install ok: channel://pear.symfony.com/Yaml-2.1.3
install ok: channel://pear.doctrine-project.org/DoctrineDBAL-2.3.0
install ok: channel://pear.doctrine-project.org/DoctrineORM-2.3.0

Now lets test.
sudo pear list -c pear.doctrine-project.org

Results in:
Installed packages, channel pear.doctrine-project.org:
======================================================
Package Version State
DoctrineCommon 2.3.0 stable
DoctrineDBAL 2.3.0 stable
DoctrineORM 2.3.0 stable

Now, try doctrine at terminal:
lenin@office:/usr/share/php/.channels$ doctrine
Doctrine Command Line Interface version 2.3.0

Usage:
 [options] command [arguments]
Options:
 --help -h Display this help message.
 --quiet -q Do not output any message.
 --verbose -v Increase verbosity of messages.
 --version -V Display this application version.
 --ansi Force ANSI output.
 --no-ansi Disable ANSI output.
 --no-interaction -n Do not ask any interactive question.
Available commands:
 help Displays help for a command
 list Lists commands
 dbal
 dbal:import Import SQL file(s) directly to Database.
 dbal:run-sql Executes arbitrary SQL directly from the command line.
 orm
 orm:clear-cache:metadata Clear all metadata cache of the various cache drivers.
 orm:clear-cache:query Clear all query cache of the various cache drivers.
 orm:clear-cache:result Clear all result cache of the various cache drivers.
 orm:convert-d1-schema Converts Doctrine 1.X schema into a Doctrine 2.X schema.
 orm:convert-mapping Convert mapping information between supported formats.
 orm:ensure-production-settings Verify that Doctrine is properly configured for a production environment.
 orm:generate-entities Generate entity classes and method stubs from your mapping information.
 orm:generate-proxies Generates proxy classes for entity classes.
 orm:generate-repositories Generate repository classes from your mapping information.
 orm:info Show basic information about all mapped entities
 orm:run-dql Executes arbitrary DQL directly from the command line.
 orm:schema-tool:create Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output.
 orm:schema-tool:drop Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output.
 orm:schema-tool:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata.
 orm:validate-schema Validate the mapping files.

So, thats it.

কালীগঞ্জ, গাজীপুর এবং নারায়ণগঞ্জ ভ্রমণ


Image0115Image0120Image0119Image0118Image0117Image0116
Image0121Image0126Image0125Image0124Image0123Image0122
রাঙ্গামাটিয়া, কালীগঞ্জImage0129Image0130Image0128Image0132Image0134
Image0133Image0137Image0138Image0136Image0135Image0141

This visit was mainly to Kaligonj upazilla of Gazipur (btw dont get confused that if I am from Gazipur because my name is Ghazi [notice the spelling!] ;) ). I am in fact descendant of Ghazi family of Dohar upazilla of Dhaka.

While returning we decided that we’d take different route and will not come back through Uttara. Rather we traveled via Dhaka bypass road and Kanchan bridge then we visited historical Murapara College of Narayangonj. In total it was a 100km round trip to Gazipur.

We visited 4/5 chapels and churches of Kaligonj upazilla.

My escort was Pervez Robin of Joypara, Dohar. Who actually initiated this travel idea. So, all thanks goes to him.

Running Lubuntu live CD


I’m using Lubuntu 10.04 Live CD on my home desktop for a couple of weeks now. Have chosen Lubuntu just out of curiosity that its a lightweight version of Ubuntu. But I am using this Live CD for only lazyness’ sake!

The desktop was running with one Ubuntu installation I had on my last laptop which died :(

Without installing it again I kept using that HDD on my desktop. But as I was carrying the HDD in my laptop’s bag for months the Ubuntu installation got bad sectors most probably. So it cant boot. And for being so busy I cant make time to fix the partition and revive those installations. Instead I am trying to adopt this minimalistic habit of using the least installed softwares and settings.

I use a Nokia 2730c for my home internet as I can use the internet on the go through the phone and I can get connected on my Macbook through its bluetooth internet. I hate wires!

So here’s what I use to get the PC running with my minimalistic settings.

1. Downloaded a copy of FireFox4.0 and downloaded some of the Add-ons like: Echofon, Firebug, Yslow etc.

2. Downloaded the ibus-m17n package with dependencies to another folder. Also some other softwares(minimal LAMP stack) like Skype with dependencies as I regularly need to contact with clients. And kept a file called: m17n there. Content of that file is:
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

4. Kept another file called modem with contents:
Phone=*99#
Username=waps
Password=waps

5. Another file is called bootstrap with content:
dpkg-reconfigure tzdata
cat m17n >> /home/ubuntu/.bashrc
cat modem >> /etc/wvdial.conf

So, whenever I turn on my laptop I am having to go through these steps:
go to that folder and hit F4 (opens that folder in terminal)
I copy the whole path like:
/media/E4A00195A0016EFC/bootstrap
And apply the command:
sudo -i
then, dpkg -i *.deb
and then,
./bootstrap
consecutively running the following two connects me to internet immediately:
wvdialconf
wvdial

This is kind of laziness but I am doing this on purpose on the philosophy that I am not heavily dependent upon too much customizations or softwares. And I wont like to regret much after crashing harddisks :)

Ittefaq-jobs.com | The most friendly job portal of Bangladesh


Its been a while I was not writing any posts to this blog. I am here today to talk about the Job Poral we are working with for quite a while. You may know that ittefaq being the pioneering Daily of Bangladesh has been the prime source of job advertisements in the past. But it was not up-to-date with the technology advancement of this modern times. Ittefaq decided to go for the online presence and its overhauling their main portal as well. We (Bullseyelogic) are partnered with Ittefaq Group of Publications to develop and look after their job portal. As the CTO and Project manager of my team I can tell that my boys have done a great job and we can bravely proclaim its been a great pleasure to work on this project. And the features are pretty attractive compared to any other job poratals in Bangladesh.

Our site is hosted at the wonderful RackspaceCloud. And we have developed it using the Codeigniter Framework.

I’ll present here some of the videos I have made for the ease of our visitors. After watching these videos you’ll definitely like to sign up to our site. And take the opportunity to be with the promising job portal.

Watch the above to get a primer about the Employer registration and Control Panel.

Job Seeker view.

Watch the primer for the interactive CV-Builder.

 

Follow Ittefaq jobs on twitter & Facebook