After Windows 7 is reinstalled, you cannot access Ubuntu 10.04.

Source: Internet
Author: User
When I installed Ubuntu 10.04, I heard that Ubuntu 10.04 adopts the new ext4 file system, so I chose it during installation. As a result, most grub4dos versions are old, this file system is not supported. Some people on the Internet say that the latest version 0.4.4 seems to be supported, but it is too complicated and not suitable for most people. Otherwise, it may make Windows 7 unavailable. Guide This method is also available on the Internet. If you like to study it, you can share it with others. I have also found some methods on the Internet for coexistence between earlier versions of ubuntu 10.04 and Windows 7, but grub used by Ubuntu 10.04 is the new version of grub2 [1.97 beta is displayed at startup]. so the previous method is no longer applicable.

I believe that all the friends who have installed Ubuntu 10.04 have livecd installation discs. Today we will use Ubuntu 10.04 livecd to fix grub2 boot. Start the Ubuntu 10.04 CD and select livecd. Mode , And then select to enter the terminal. Enter the following command on the terminal:

Sudo fdisk-l (note the lower-case l, not the number 1. This step is used to determine the location of the partition where Ubuntu 10.04 is installed on the computer. After the input, the following information is output, find the line with ID 83 and remember the/dev/sdax situation. For example, if your computer is/dev/sda7, use this as an example. Please change it)
Disk/dev/SDA: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 Cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Disk identifier: 0x624aa2e0

Device boot start end blocks ID system

/Dev/sda1*1 1388 11149078 + 7 HPFs/NTFS

/Dev/sda2 1389 3825 19575202 + 7 HPFs/NTFS

/Dev/sda3 3826 9729 47423880 F w95 ext 'd (LBA)

/Dev/sda5 3826 5851 16273813 + B w95 FAT32

/Dev/sda6 5852 8323 19856308 + B w95 FAT32

/Dev/sda7 8324 9598 10241406 83 Linux

/Dev/sda8 9599 9729 1052226 82 Linux swap/Solaris



Then enter

Sudo-I (this step is used to obtain the root Permission , No input required Password To facilitate the following operations)

Enter mkdir/Media/tempdir (here, we will create a folder named tempdir to mount the folder named sda7. You can choose this folder name based on your interests. There are not many requirements)

Then input Mount/dev/sda7/Media/tempdir (Mount sda7 to the tempdir folder)

The following is the most critical and exciting time for this recovery. Enter the following command on the terminal:

Grub-install -- root-directory =/Media/tempdir/dev/SDA (this step is used to reinstall the Master Boot Record [MBR] From grub2 to hard disk, which is very important !)

If the "installation finished. No error reported." character appears after the input, the operation is successful. But now only half of the successful ones can be completely successful with the following operations.

Restart your computer and you will be able to see the grub2 boot interface. (I am here, you can access both systems. If you cannot access win7, you can try the following operations). However, this operation can only be used to boot Ubuntu 10.04, but Windows 7 is not yet available. In this case, select Ubuntu 10.04, locate and start the terminal, and enter the following command on the terminal:

Sudo update-grub2

Follow the prompts to enter the password. If the password succeeds, the following similar statements will appear, indicating that the password is successful.

Grub. cfg...

Found Debian Background: moreblue-orbit-grub.png

Found Linux image:/boot/vmlinuz-2.6.31-15-generic

Found initrd image:/boot/initrd. img-2.6.31-15-generic

Found memtest86 + image:/boot/memtest86 +. Bin

Found Windows 7 (loader) on/dev/sda1

Done

If none of the preceding statements are similar, you can use the new statement. Search Grub, you can install the grub-PC with the Ubuntu logo, after installation, then enter the sudo update-grub2 to update grub2.
Related Article

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.