(Method 2, 3 seem to fail in Windows 7, the alternative way is use other grub substitute for Windows 7, then edit manually to retrieve Linux system. For my computer, when entering the grub menu of grub windows-substitute, press e or c, then edit
root (hd0,2)kernel (hd0,2)/boot/vmlinuz-... root=/dev/hda3 roinitrd (hd0,2)/boot/initrd-...imgboot
then press b to boot. It will boot Linux system. Use root privilege to reinstall grub boot loader on MBR.
$ grub
grub > root (hd0,2)
grub > setup (hd0)
I didn't test Method 1 because my Debian CD failed to be loaded by my computer. Ubuntu DVD failed by that Ubuntu installation DVD recognize HD partition as SCSI partition. I don't know how to do it for GRUB.
# This is someone's method. http://sillydong.is-programmer.com/posts/11430
Method 1:
- Use a debian installation CD to boot computer
- Select install option
- After entering the installation menu, use Ctrl+F2 to access the shell
- chroot your Linux environment
- Use grub-install /dev/hda (or grub-install --root-directory=prefix '(hd0)' )
- Restart computer
Method 2
- Download GRUB for DOS
- Uncompress and copy grldr and grub.exe in C root drive
- Edit C:boot.ini (in CMD, msconfig -> choose boot.ini)
- Add C:grldr="grub" in the last line
Method 3
- Download wingrub
- After finishing installation, install grub -> boot.ini, drive: C: -> install
- Restart computer
- There are two options in the boot menu: windows, mygrub
- Entering mygrub, choose YourLinuxSystemLabel, press c
- Edit GRUB: grub>root (hdX,Y); grub>setup (hd0)