Fedora15 + Win7 dual-system reboot after Win7 recovery Fedora15 boot

Source: Internet
Author: User
I wrote an article about how to restore Ubuntu boot. I thought that Fedora15 can restore boot like ubuntu, but I still encountered some problems. Now I will record it in case I forget it later! To learn how to restore ubuntu boot, click here: Ubuntu 10.10 + Win7 dual-system reinstall Win7 to restore ubuntu Boot Method http://www.linuxidc.com/linux/2011-07/41086.htmrecovery Guide

I wrote an article about how to restore Ubuntu boot. I thought that Fedora15 can restore boot like ubuntu, but I still encountered some problems. Now I will record it in case I forget it later!

To learn how to restore ubuntu boot, click here:

Ubuntu 10.10 + Win7 dual system reboot Win7 after recovery Ubuntu Boot Method http://www.linuxidc.com/Linux/2011-07/38086.htm

Recovery guide method:

1. Put liveCD in it and restart it. When the page is displayed, select trial. Do not click Install.

2. After Entering the ora15 trial version, open the terminal

3. Enter the following command:

Su

Fdisk-l // The result is similar to the following. Check the root directory of fedora. You can only identify it by yourself. You can determine whether the root partition is the size of the partition, that is, when you install fedora, the partition where the mount point is/

The result shows that the root partition is in sda12. because the wolf scored/partitioned 20 GB, and the root partition was first divided/partitioned, then a 20g/home partition is divided. So it is determined that sda12 is/partition, not sda13, although it is also 20G. Remember sda12.

 

Note: If you separate the boot partitions during partitioning,Another step is to find the boot partition:

As you can see, the boot partition is sda8, because it is the smallest, only 200 M. (what you did when installing ubuntu)

Remember sda8.

Mount/dev/Your/root partition location/mnt

5. Enter

Grub-install-root-directory =/mnt/dev/sda

There should be no problem here, because if the location is incorrect and cannot be installed, you can always enter this command until the location is correct.

6. If no error report is displayed. Then you almost succeeded. Then sudo init 6. Restart.

7. You will find it helpless after restarting ...... Windows cannot be started either. The grub command line is entered ..... Don't be afraid. You are not far from success.

Input:

Root (hdX, Y) // x indicates the hard disk location. If you only have one hard disk, X = 0. If there are multiple hard disks, set x accordingly. Y indicates the location of the boot partition. Here is 8. If the boot partition is not separately divided, y indicates the location of your/partition.

Kenrel/vmlinuz-2.xxxxx-generic root =/dev/sda12, click tab here to complete the filling)

 

Note:

This is different from ubuntu. If there is no linux Command, use kenrel.

If the boot is not separately divided

Kenrel/boot/vmlinuz-2.xxxxx-generic root =/dev/sda12

Then enter:

Initrd/initrd. img-2.xxxxx-generic

Or

Initrd/boot/initrd. img-2.xxxxx-generic (case with no separate boot partition)

Last

Boot

You can enter the fedora15 desktop.

The next step is to update the grub version. The grub that comes with fedora15 is actually version 0.98. You can enter grub-install-v in the terminal to see it, even though the old version is also available, but upgrade to grub2 for convenience.

Upgrade Method:

Su

Yum install grub2

Enter

Grub2-install/dev/sda

Grub-mkconfig-o/boot/grub. cfg

At this time, the work is completed. At this time, you can see the boot menu after the restart, but only the fedora boot menu, grub probe can not find the win7 boot,

So the wolf can only guide win7 manually, open the terminal, obtain the root permission, and then enter

Vi/boot/grub2/grub. cfg

Find a part similar to the following statement

Menuentry "Fedora "{

Set root = (hd0, 1)

Search-no-floppy-fs-uuid-set cb201140-52f8-4449-9a95-749b27b58ce8

Linux/boot/vmlinuz-2.6.31-11-generic root = UUID = cb201140-52f8-4449-9a95-749b27b58ce8 ro quiet splash

Initrd/boot/initrd. img-2.6.31-11-generic

}

After all menuentries, input

Menuentry "Win7 ″{

Set root = (hd0, 1)

Chainloader + 1

}

Win7 is the name of the win7 boot menu you will see. You can write it at will, while 1 in the second line of set root (hd0, 1, this is generally the partition where your win7C disk is located, and most computers are in the first partition. If you are in a special case, use fdisk-l to check the partition where your win7 system disk is located, change 1 to the corresponding Partition Number.

Then, restart the instance!

Note:

In addition to the preceding statement, do not modify other statements unless you are familiar with them. The official documents have repeatedly stressed that grub should not be directly modified. cfg file, which indicates that other guiding entities should be added to the/etc/default/grub file, that is, the preceding three statements, then run grub2-mkconfig-o/boot/grub2/grub. cfg command, the effect is the same, but it is more secure, because you do not need to directly modify the boot configuration file. However, you can modify grub. cfg directly if you look at it. Forgive me ....

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.