Today with a U disk installed Linux accidentally install grub to the U disk, resulting in each boot system have to plug the U disk, the following is the solution, the copy forgot to write the source of the reprint, really embarrassed.
————————————————————————————————————————————————————————————————
Install Redhat Linux with a U-disk installation, accidentally put grub on the U disk, and then every time you start from the U disk, of course, can not tolerate this way, the following is the process of repairing grub:
After the U-disk is booted into the system, first check the system installation location, that is, execute DF-K View system disk/boot location
[[email protected]/] #df-K #可能会得到/dev/hda1
[Email protected]/]#/sbin/grub #进入grub命令行模式
grub> find/boot/grub/stage1 find/grub/stage1 Find Stage1 #命令行下输入下列三条命令, there's always a way to return to the correct grub location
Grub> Find/grub/stage1
Find/grub/stage1
(hd1,1)
Grub>root (hd0,0) #第一条
Grub>setup (hd0) #第二条
Grub>quit executes these three commands in a #第三条 grub environment to return to the shell
Finally, modify the grub.conf and Menu.lst (hd1,1) for (hd0,0) reboot.
[[email protected]/] #vi/boot/grub/grub.conf ... vi/boot/grub/menu.1st ...
[[Email protected]/]init 6
Done!
================================================================================
Postscript:
In particular, the CENTOS default on the VG to the boot into a separate partition, so start the start time and the system startup root is not the same, that is, the system boot time/, is the Linux/boot, so, The location of the GRUB configuration file in the system should be in/boot/boot/grub/grub.conf.
—————————-
Description: You may be found in the find/boot/grub/stage1 when it is (hd0,0), it may be grub.conf and menu.lst there is HD (), also according to the author's method can be solved.
U-Disk install Linux, install grub to the U-disk, resulting in no USB flash drive system cannot boot the solution