Recently, I get into a problem with installing Linux environment: Debian. I install it in my working machine which also has a system XP, but I install it in another partition.
A day before yesterday, I missed the system XP and Linux which is not installed fully. The booting tips is "Grub loading stage1.5 error". I run a command "fdisk /mbr" in DOS and find back the system XP.
So I install the Debian again, and select "Install grub into partition" instead of "Install grub to mbr" when finishing to install. I reboot the machine when the install is finished. Then the system can not be loaded with an unknown error which can not be found in the network. I do not want to install XP again because there are many softwares installed used to working. So I use the XP cd to repair the system XP but fail. After trying many ideas, I decide to install XP again. After nearly one day, I finish the XP. And following work is to find back the Linux Debian. Fortunately my colleagues and the network help me to find the grub4dos. The steps is :
1: Copy files named "grldr", "grub.exe" and "menu.lst" to "C:\"(System Partition)
2: Use "explore2fs" to export "grub.conf"(Red Hat) or "menu.lst"(Debian) to anywhere you can find.
3: Copy the grub information to "menu.lst" in "C:\" or replace it.
such as:
title Red Hat Enterprise Linux AS (2.6.9-42.EL)
root (hd0,7) # no space char after ','
kernel /boot/vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet # Red Hat ?
#kernel /boot/vmlinuz-2.6.9-42.EL root=/dev/sda8 ro
initrd /boot/initrd-2.6.9-42.EL.img
savedefault # "savedefault" looks like not necessary
boot
# we can use "TAB" for all commands and files for tips.
4: Edit "boot.ini" and add "C:\grldr="grub4dos"", you can change "grub4dos" to what you want.
5: reboot and select "grub4dos".
NOTE:
1: If you could not sure about '3', boot grub4dos to command line mode.
Run "root", "kernel", "initrd", "boot" one by one to confirm contents in "menu.lst".
2: "hd0" in "root" indicates the first harddisk in your system where the linux is installed in.
"7" in "root" indicates the linux is installed in partition 7th which is used in "kernel" with "/dev/sda8"
3: In debian,
arguments after "kernel" usually is like "/boot/wmlinuz-2.6.18-5-686"
arguments after "initrd" usually is like "/boot/initrd.img-2.6.18-5-686"
4: My harddisk is SATA, so if yours is IDE, change "/dev/sda8" to "/dev/hda8".
And I have one harddisk only, so if yours is larger than 1, select the right NUMBER