Centos7, Windows 7 grub2 dual-system boot, centos7grub2
Because the original Windows 7 and centos6.3 are installed on a notebook. Because centos6.3 does not recognize wireless NICs, you can find them online and want to upgrade the kernel to 3.2 or above.
Because I am a beginner, I dare not take actions without authorization, and I am afraid to lose the data in Windows 7.
On the host that has been installed with Windows 7, a 40 Gb space is allocated to install contos7. Due to insufficient homework, it is found that after centos7 is installed, Windows 7 is gone. Scared,
Finally, we found that grub is no longer needed for centos7 and grub2 is used. Grub2 is used differently from grub. The wireless network card has been installed after many times.
We hereby record
A:
Start Installation
After the reboot, there are many tutorials on the Internet that the USB flash drive is set as the first boot item when F2 is pressed into the BIOS during boot, but I cannot find the USB flash drive boot item in the BIOS, press F12 to display a Selection Guide interface, and then select a USB flash drive to directly enter the installation program. So different machines are different, depending on your own boot interface prompts.
After loading the USB flash drive, the following interface appears. First select the first option with the direction key.
Press the TAB key to enter the interface.
Modify the command at the bottom of the interface:
vmlinuz initrd=initrd.img linux dd quiet
Press enter to enter the interface. This step is to view the drive letter of the USB flash disk more accurately, that is, the last line in the figure.sr0
My figure is captured using a virtual machine demonstration, so the drive letter issr0
Generally, the USB flash drive will besdc4
In this case, the actual situation is subject to what you see. Put a picture on the Internet
Then pressC
Press enter and wait until the command line is finished. When the cursor appears, enter reboot to restart the computer. Alternatively, you can press the power key to force the shutdown and start it manually. Repeat the previous steps to go to The CentOS installation page and press the TAB key to change the command line
vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdc4 quiet
Insdc4
Is the USB drive letter you see, which can be changed according to the actual situation. Press enter. If you have not entered the correct language, you will be directed to the language selection interface, followed by the graphical settings interface.
The installation after B is executed step by step according to the Wizard. After the installation is restarted, centos is started. At this time, the windows Startup item does not appear.
I. Boot win7:
1. Use the root identity (required) to open/boot/grub2/grub. cfg
2. Find ### BEGIN/etc/grub. d/30_os-prober ###
Add
Menuentry "Windows 7 "{
Insmod ntfs
Set root = (hd0, 2)
Chainloader + 1
}
Note: set root = (hd0, 2) Where hd0 represents the hard disk, 2 represents the drive C, and my win7 is mounted on the drive C, which is sda2. /Dev/sda2... *.................... HPFS/NTFS/exFAT
2. Modify the boot sequence:
# Grub2-set-default "Windows 7"
Verify default startup items:
# Grub2-editenv list
Output:
Saved_entry = Windows 7
Last executed
$ Grub2-mkconfig-o/boot/grub2/grub. cfg
$ Reboot
You can.
Refer:
CentOS7 + Win7 dual-system installation is successful without the need for bcd boot-song Xiaoyu-blog ParkBlog.sina.com.cn by CICO Li yijie
And so on.