Recover Grub after Windows 7 installation

Source: Internet
Author: User

Install Windows 7 and Debian 7 dual systems. Installed a second boot could not be found. Install Debian 7 First, then install Windows 7,debian Grub is overwritten. Here is my recovery operation, can be successful, record down, lest next encounter, but also find long time.

1. Making LIVEUSB System

To http://www.pendrivelinux.com/tag/live-linux-usb-creator/or http://www.linuxliveusb.com/to find a download, according to the installation can be.

2. Set the USB drive to boot in the BIOS. After booting into Debian Live, open a terminal as an administrator. First, you need to update the source, install GRUB-PC.

># apt-get Update

># Apt-get Install grub-pc

3. Use Fdisk-l to view the Linux partition. Assuming that the Debian root system is in the/DEV/SDA6 partition,/boot in the/DEV/SDA2 partition, mount the two partitions.

># fdisk-l

># mount/dev/sda6/mnt

># Mount/dev/sda2/mnt/boot

4. Installing Grub

># Grub-install--root-directory=/mnt//DEV/SDA

Success If it shows "installation finished. No error reported. ", otherwise, failed.

5. Bind the system running state on the mounted partition. This step is important, be sure to bind, or grub will not update anything.

># Mount--bind/proc/mnt/proc

># Mount--bind/dev/mnt/dev

># Mount--bind/sys/mnt/sys

6. Update Grub

># chroot/mnt Update-grub

7. Uninstalling the system operation status

># Umount/mnt/sys

># Umount/mnt/dev

># Umount/mnt/proc

8. OK, re-install grub successfully, reboot the system.

># reboot


Reference:

[1] http://blog.csdn.net/eric_jjc/article/details/5682210 This less binding system running state.

[2] http://www.ubuntugeek.com/how-to-restore-grub-boot-loader-after-installing-windows.html This less installs the grub-pc.

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.