Saturday, May 30, 2009

Series: The Arrivals

A very good series on Antichrist Dajjal movements.

Tuesday, May 26, 2009

Fix GRUB MBR After Reinstall Windows

For CentOS/Fedora, it is very easy to do this using the "grub-install [device name]" command.
For me, I use:
(If you have an IDE hard disk, the [device name] is "hda", while for my SCSI disk, it is "sda")
# /sbin/grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(hd0) /dev/sda

I have a dual install, with Windows Server 2008 (for testing) in the 200GB first partition, a small unpartitioned space in the second partition, and CentOS 5 in another 200GB third partition. There is also unpartitioned space (in LVM) left afterward for my Xen virtual machine testing.

After a few weeks, I decided to install Windows 7 in the first 200GB partition removing the Windows Server 2008. However, after completing the Windows 7 installation, I found that the splash GRUB screen asking for which OS for boot-up was not there anymore.

Here is my method to fix it:
1. Boot with CentOS 5 CD, in rescue mode:
$linux rescue

2. It will search for previous Linux installation. Mount the Linux installation:
$chroot /sys/sysimage

3. Find your installation disk, by checking in previously working /etc/grub.conf file:
$cat /etc/grub.conf

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
title CentOS (2.6.18-128.1.10.el5xen)
root (hd0,1)
kernel /xen.gz-3.3.1
module /vmlinuz-2.6.18-128.1.10.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-128.1.10.el5xen.img
title CentOS (2.6.18-128.1.10.el5)
root (hd0,1)
kernel /vmlinuz-2.6.18-128.1.10.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-128.1.10.el5.img
title CentOS (2.6.18-128.el5)
root (hd0,1)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-128.el5.img
title Other (Microsoft Windows)
rootnoverify (hd0,0)
chainloader +1

As we can see, the OS is installed in hd0, with CentOS in (hd0,1) and Windows in (hd0,0).

4. Run the following grub command, and you can setup/modify/fix GRUB MBR:
$>root (hd0,1)
$>setup --stage2=/root/grub/stage2 (hd0)

5. Restart the PC with:
$shutdown -r now

Averything should return to normal now.


Saturday, May 23, 2009

福山雅治 - 最愛 (Fukuyama Masaharu - SaiAi)

A very good song by Fukuyama Masaharu, now becoming theme song for new Toshiba Regza flat-panel TV. "SaiAi" means "the most loved".