Installation of CentOS, boot recovery of win7 system

Source: Internet
Author: User


Installation of a CentOS


Using a U disk installation, because my computer has a year, U disk start can only choose Usb-zip boot. And the new version of Ubuntu, although can be made. But it can't be installed. Finally, select CentOS7 's ISO to complete the installation. USB drive boot disk is made using soft disc pass UltraISO to complete. Detailed steps I don't have to say anything. I'm talking about the problem and the solution.



Note: When installing CentOS, select the Chinese environment, encounter a lot of errors, and then can only exit the installation situation. No reason was found. Finally, skip Chinese, install the English environment directly, and then change the Chinese environment and upgrade after successful installation.


Guidance and recovery of two Win7 systems


Because of CentOS, the installation is not the same as Ubuntu recognition of the NTFS format of the letter, resulting in the Win7 system can not be GRUB2 boot, the boot does not win7 the option. We need to deal with it ourselves.



Method:



1 use Vim to edit the Grub.cfg file after entering the/BOOT/GRUB2 directory. :






### BEGIN /etc/grub.d/30_os-prober ###
menuentry ‘Windows 7 (loader) (on /dev/sda1)‘ --class windows --class os $menuentry_id_option ‘osprober-chain-XXX‘ {
insmod part_msdos
insmod ntfs set root=‘hd0,msdos1‘ chainloader +1 }
### END /etc/grub.d/30_os-prober ###


Add in # # # End/etc/grub.d/00_header # # #之后. where xxx is the UUID for your Windows 7 system partition.



Here are 2 points:


  • ' Osprober-chain-xxx ', this XXX is the Win7 system's disk UUID, the lookup method is to enter sudo blkid in the terminal, you must obtain administrator privileges to display the UUID of all the drive characters. The terminal is displayed as follows:
  • /dev/sda1: UUID="42D48160D4815757" LABEL="System" TYPE="ntfs"
  • /dev/sda3: UUID="6cd307c9-0a2d-4bb1-9cd1-7e5a5e8b491e" TYPE="ext3"
  • /dev/sda5: UUID="45936577-c54b-463b-9807-6d3e14ac5907" TYPE="ext3"
  • /dev/sda6: TYPE="swap" UUID="a33b070c-a73c-44b7-bfde-8f284bf070b5"
  • Set root= ' hd0,msdos1 ', this ' hd0,msdos1 ' represents the first hard disk, the first partition. Need to change to their corresponding hard disk number and partition number. You can use the sudo fdisk-l command to view the hard disk partition.


2 After the completion, restart the machine, you can see the long-lost Win7.


Conclusion:


It took me 6 hours to complete this short amount of time. In order not to want me to have this kind of problem again next time. Just jot it down. I hope to avoid these unnecessary detours. Although Linux server is stable, but proud to live. Cherish life to write more blog.






Installation of CentOS, boot recovery of win7 system


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.