Fix kernal panic in Ubuntu server 9.04

Yesterday (Feb 26, 2010), my web server was down with the message: "kernal panic... cannot access ex4 file on root...grub..."

I fixed it today with the following steps:

1. Reboot with a Ubuntu Desktop live-cd, to check the file system. What I've got:
Disk 1:
1gb for /boot
50 gb for /
20 gb for /var

Disk 2:
320 gb for /home (/home/server/www)

2. copy mysql data and web files
/var/lib/mysql

/var/www

3. Download the old server file at http:\\release.ubuntu.com\release (server 904)

4. Reboot from the server CD and choose rescue mode

5. under the partition disk, choose
rewrite /boot
keep other files untouched (/pariions (/var; /; /home), but need to choose the correct partition and file system (all my files are ext4).

6. After reboot, the server is OK but it cannot connect mysql server

7. Restore and rewrite /var/lib/mysql

8. run
sudo dpkg-reconfigure mysql-server-5.0
to fix the mysql root

Reboot, and everything is back to normal.