Sunday, June 28, 2009

Wubi - ubuntu installer

New to ubuntu? not used to ubuntu environment yet?
Dont want use virtual machine for ubuntu?

No need to worry, there is WUBI... an ubuntu installer..
Wubi can help you install the ubuntu in your hard disk and make it dual boot loader.
You can choose either to boot into ubuntu or your current windows..


Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Are you curious about Linux and Ubuntu? Trying them out has never been easier!


Very simple step..
get yourself the wubi installer at here and the ubuntu desktop cd at here.

Then.. insert the ubuntu desktop CD to the CD-ROM and run the wubi installer..
It will ask where you wish to install the ubuntu.
Just follow the instruction... It will guide all the process..
Once done.. when you reboot your PC/ Laptop, the boot menu will ask which OS you wish to boot into..

That all.. you can experience ubuntu on your PC.. without touching on the current windows..
If not satisfy or want to uninstall the ubuntu, you can just re-run the wubi installer.

Wubi Website

Wubi installer

Monday, June 22, 2009

Find words in each files..

This is something useful command when you want to scan hundreds of file for 1 specified words..
Such as.. you have thousands of files.. and you want to check which file consists "kame" words inside the files..
This is the commands..

grep -n -r 'kame' *

Sunday, June 21, 2009

NTLDR is missing..

Sometimes.. It is very common to see such missing or file corrupt for windows..
Just dont be panic.. everythings can be solved...
Most serious ma just FORMAT LOL..
That why, at least.. 2 partition will be made whenever I do the formatting..
1st Partition only store the Windows and Software..
No important data will store..
Which mean, My Document folder I wont use at all..
2nd partition will store all the important and personal data..
So.. when the main Windows file system corrupt..
Personal data at 2nd partition still safe..

Therefore.. when say whatever file is missing.. no harm.. just repair the windows whatever you like..
For this problem..

NTLDR is missing
Press Ctrl+Alt+Del to restart

What does NTLDR means and the function.. can be found at here
When this message appear after boot the windows..
What you need to do are:

1. Put OS Cd to the CD-ROM and boot into the CD.
2. Then enter to the repair mode which you need press "R".
3. Then you will require to choose which Windows to repair.. Choose "1" which is the main Windows.
4. It will require your Windows Administrator Passwords.. If you have then keyin, else just press "Enter".

Then you will enter the repair mode.. At here, you needs:

1. Run this 2 command..
copy e:\i386\ntldr c:\
copy e:\i386\ntdetect.com c:\
2. exit the repair mode and reboot.

After reboot, you will able to login to the Windows.. Then do some checking on the boot.ini file is it still at there or deleted. This file is located at:
Control Panel > System > Advanced > Startup and Recovery > Settings > System startup

If still exist, check the file is correct or not.. check the boot sequence is it Windows XP Pro/Home as main boot loader.

If not exist anymore..
Then just Edit and create a new boot.ini file.
Add this value into the file.

For Windows XP Professional:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect

For Windows XP Home:
[Boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating system]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect


After do the changes on boot.ini.. Restart the Windows..
To make sure does the problem still exist or not...
For more info on boot.ini and the tuning.. Mayb can refer to here and here

Friday, June 5, 2009

Forget MySQL Root Password

It is normal to forget password when you have to remember so many diff and type password..
For MySQL, there are few way you can reset the root password..
But the main condition is.. you must have access to the physical server..
It can't be reset through mysql connection..

Here I will use 1 simple way which I prefer the most.

1. Check which mysql daemon need to reset. At here.. I want to reset mysql port 3306 which using the /etc/my5.cnf config file. Use command "netstat -ntulp" to check the running process and port.


2. Check the mysql /etc/my5.cnf daemon PID. Use command "ps aux | grep mysqld".


3. After identify the pid. Kill the process with "kill -9 db_pid".


4. Double check the mysql port 3306 had been killed or not.


5. Start the mysql with additional parameter "--skip-grant-tables".. which the command will be "mysqld_safe --defaults-file=/etc/my5.cnf --skip-grant-tables --user=root &".


6. Enter the mysql port 3306. It can be access without any password.


7. Now update the root password with new password with command "UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root';".
Then flush the privileges with "flush privileges".

8. Shutdown the mysql with "mysqladmin -uroot -h127.0.0.1 -P3306 shutdown". At here.. since the grant-tables privileges not open yet, shutdown also does not require password.


9. Start back the mysql without the "--skip-grant-tables" parameter.



That all. The MySQL root password had been reset. Here is some reminder.. After reset, remember to restart the mysql without the skip-grant-tables.

Do not let anyone have access to the physical DB server, to avoid DB daemon is restart without knowledge.