Chinaunix首页 | 论坛 | 博客
  • 博客访问: 149142
  • 博文数量: 52
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 490
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-05 12:05
文章分类

全部博文(52)

文章存档

2013年(1)

2010年(3)

2009年(6)

2008年(25)

2007年(17)

我的朋友

分类: LINUX

2007-12-06 10:51:43

GRUB Restore DIARY

PC boot sequence
After power on, BIOS program reads the MBR record which locates at the first beginning sectors of the harddisk. As I known, MBR record contains DPT(Disk partition table and Boot loader such as NTLDR, GRLDR). after Boot program was loaded to Mememory it started to read corresponding configuration file boot.ini or menu.lst which point to OS system, then boot to the OS level.

Two condition we usually meet
1, Install Windows first then install Linux
2, Install Linux first then isntall Windows

All goes well in the first situation cause GRLDR installation can detect whether MBR has record already, if there is already something such as NTLDR, it will included the record. while you are not so fortunately in the second situation, NTLDR will occupied and remove all other boot record resided in MBR.

We need to resotre Grub during the second situation, steps lists as follow

1, Find a way go to the grub command prompt "grub>", you can use grub4dos put on any FAT partition in Windows then boot to DOS and run grub.exe. Alternative way you can install Wingrub and it has a function install grub to MBR, or else you can run grubinst_gui and install Grub in Windows.

2, After you see "grub>" command,
grub>root (hd0,2)    

#specified where you Linux grub located it is usually /boot partition.

grub>setup (hd0)  
  
#install the grub in /boot
partition to first harddisk MBR.

grub>reboot


Note:
some unclearly issue
1, What was installed to MBR, boot program NTLDR, GRLDR? can it be seen after you boot to OS system? I can see NTLDR in windows C:, can I delete NTLDR?

2, Supposed NTLDR was install to MBR. NTLDR reads boot.ini when it was loaded. so I can delete NRLDR under C:\ ?

3, Hope somebody familiar with it will tell me or I will do test.

阅读(626) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~