Restart ubuntu after windows is reinstalled.

Source: Internet
Author: User
I believe many windows + linux users will encounter the same problems as me. A major problem with windows is that, after a long period of time and a large number of loaded items, the speed may be too slow to bear. You have to reload it when you can't bear it. After windows is reinstalled, the originally installed OSloader is washed out, so that the linux system is inaccessible. One solution is to use the linux installation disk to reinstall grub. My system is xp + Ubuntu6.06. first of all, I need to use the installation disk to start. I believe many windows + linux users will encounter the same problems as me. A major problem with windows is that, after a long period of time and a large number of loaded items, the speed may be too slow to bear. You have to reload it when you can't bear it. After windows is reinstalled, the original OS loader is rushed out, so that the linux system is inaccessible. One solution is to use the linux installation disk to reinstall grub. My system is xp + Ubuntu 6.06.

First, you need to use the installation disk to start to enter the recover mode, because grub-install can be used to install grub at this time.

1. boot:> rescue // enter rescue mode;
2.> grub // enter grub
Grub> root (hd0, x) // specify the Mount partition of/boot.
Grub> setup (hd0) // install grub to the MBR of the first hard disk

There was a small accident: I encountered a small problem when I used the 6.06 installation disk to enter the recover mode. I didn't know why. In addition, when you use live cd (6.06 of live cd and installation cd are integrated), the system only virtualizes A ubuntu environment and has not mounted the hard disk yet, when you enter root (hd0, x), the system prompts that the hardware does not exist. Therefore, you need to attach your hard disk first. I found a method to attach it on the Internet (assuming/boot is in hdax ):

1. mkdir-p/mnt/hdax
Mount-t ext3/dev/hdax/mnt/hdax // mount your hard disk partition

2. I am not very familiar with the operations in the mount-t proc none/mnt/hdax/proc // step. Why? Is it // necessary? Try again next time you reinstall it.
Chroot/mnt/hdax/bin/bash
Source/etc/profile // read the profile again (bash description file)

3. Start grub and install it according to the preceding steps.

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.