How to fix Grub with Live cd

Source: Internet
Author: User

I wanted to simply change the Linux OS, and xp will let it go to hell, but the angry eyes of my wife told me that it was King to let it go, so I had to reinstall XP, then the grub of fedora is killed.


If you use Live cd to fix Grub, grub will not be able to guide my Fedora 9 after it is killed, so you have to fix grub. In fact, there are many ways to fix and guide Grub, install maxdos and use its grub to guide the linux system. You can also use loading. Of course, the most convenient method is to directly use the rescue iso of fedora 9, while I use LiveCD of ubuntu 6.04, this CD was applied for when ubuntu was sending a free CD. If you have a good idea, let's get started.
Use Live cd to repair Grub system environment:
Dual hard disk, sda, hdc, xp mounted in/partition of sda, hdc6 fedora 9, hdc7/home partition, hdc5 swap.
Run the following command to directly open a KDE terminal after you use ubuntu livecd to boot and log on.
 

 
 
  1. $ Sudo su (directly su is a root-saving sudo every time)
  2. # Mkdir/mnt/hdc6
  3. # Mount/dev/hdc6/mnt/hdc6
  4. # Chroot/mnt/hdc6

Use the Live cd command to fix Grub to access the fedora 9 system. I only divided/AND/home, And/home can be mounted here. If you mount/bin, /boot these are placed in independent partitions. Note that these partitions are also mounted by location. Go to fedora 9 and run the following command.
# Mknod/dev/hdc B 22 0
# Mknod/dev/hdc6 B 22 6
/*
Here is the device file for creating hdc and hdc6, because fedora 9 uses udev to manage devices, I am not properly guided to fedora 9, so my device is not created. There is only one null file under/dev/, so I need to create the relevant device file myself. For more information about the mknod command, see this article.
 

 
 
  1. */  
  2. # grub  
  3. grub> root (hd0,5)  
  4. grub> setup (hd0)  
  5. grub> quit  
  6. /*  

Reload grub and exit the grub command line. Now the grub repair is complete, the system is exited, and the system is restarted.

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.