U-Disk install Linux, install grub to the U-disk, resulting in no USB flash drive system cannot boot the solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.