Ubuntu10.04 boot restart reinstall grub to Master Boot MBR repair Linux boot

Source: Internet
Author: User

During Linux installation, grub was used to guiding the system. Recently, Windows crashed and re-installed the system. Grub was deleted on the MBR,

In this way, although there is a complete system and boot configuration file in the hard disk, Linux cannot be started...

 

There are two solutions: Install grub4dos, modify the configuration file, and then start Linux.

Also, reinstall grub on the MBR.

 

Now we are used to the boot method, so we re-install grub on the hard disk MBR.

There are two methods for this step. One is to install grub4dos, start it, select the Linux boot file on the hard disk, and install grub on the MBR after entering Linux;

You can also install grub after starting the CD.

 

Since you do not want to install grub4dos, we select the latter, after starting from the CD or ISO to the Linux system.

Open the terminal (CTRL + ALT + T) and obtain the Administrator permission:

Sudo Su

 

Find the linux root directory partition:

Fdisk-l

Find your partition name. It looks like this on your computer. My name is/dev/sda3.

Device boot start end blocks ID system <br/>/dev/sda1*1 5099 40957686 7 HPFs/NTFS <br/>/dev/sda2 5100 25236 161750220 F w95 ext 'd (LBA) <br/>/dev/sda3 25236 26233 8003584 83 Linux <br/>/dev/sda4 26233 30402 33485824 83 Linux <br/>/dev/sda5 5100 15298 81923436 7 HPFs/ NTFS <br/>/dev/sda6 15299 21672 51199123 + 7 HPFs/NTFS <br/>/dev/sda7 21673 21673 30 + 83 Linux <br/>/dev/sda8 21673 24987 26627706 83 Linux <br/>/dev/sda9 24988 25236 1999872 82 Linux swap/Solaris <br/> 

 

Mount your Linux primary partition and run the following command

CD media

Mkdir sda3

Mount/dev/sda3/Media/sda3

 

Here, we will add that SDA is your first hard disk, and sda3 is probably your first hard disk's 3rd partitions ,,,

Then install grub on the MBR of the first hard disk.

Grub-install -- root-directory =/Media/sda3/dev/SDA

After the installation, restart the computer and you will see the original menu,

Remember several commands to start Windows from the grub command line:

Root (hd0, 1)

Chainloader + 1

Boot

 

The last problem occurred. Calm down ~~~

After restarting the CD system, try the update-grub2, good luck!

 

 

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.