CentOS 7 with Windows dual system lost Windows startup item and default startup item modification

Source: Internet
Author: User
Tags root access






1. Why Windows Startup Items disappear:






After installing the Win7, 8/10 system +centos7 dual system, the MBR (Main Boot Record) is overwritten by default to GRUB2, and the default CentOS7 does not recognize the NTFS partition of Windows, so there is no Windows system in the startup item.






2. Solution:






(1) First to ensure that Linux can be networked (judging method can ping the network, see if Unicom)






If there is no ping pass, the workaround is as follows:






Root Access directory: cd/etc/sysconfig/network-scripts/






Use the LS command to view the NIC configuration file name (the NIC name looks like a random number in CENTOS7, so the NIC name of each machine is not the same)











Use Vim to edit the file: Vim ifcfg-eno16777






Then click "I" to enter the editing mode, the last line of Onboot=no, change to Onboot=yes;











Finally click "ESC" key, enter ": Wq" save to exit the file.






Restart Network: Service network restart






(Ping it again, you can ping it)






(2) Download Ntfs-3g:yum install Ntfs-3g-y






(3) Root user access, Vim/etc/grub.d/40_custom






In the last line join:






Menuentry = ' Windows7, 8/10 ' {






Set root= (hd0,1)






Chainloader +1 (there is a space between Chainloader and +1)






}






(4) Reset grub,root user execution: Grub2-mkconfig-o/boot/grub2/grub.cfg






(5) Restart: reboot






3. Modify the default startup item and start the read second time






Generally we are accustomed to the Windows system as the default startup item, and after installing the dual system default startup item is Linux, modify the method as follows:






(1) Root user editor: Vim/etc/default/grub






Then comment (start with ' # ') grub_default=saved, add grub_default= "Windows7, 8/10" on the next line, save and exit.






(2) The root user executes the following command: Grub2-mkconfig--output=/boot/grub2/grub.cfg






(3) The root user executes the following command: Vim/boot/grub2/grub.cfg






Change the time after "timeout" to the number of seconds you want to set, and then save the exit.






(4) Restart: reboot











4,linux system uninstall:






  When the Linux system is installed, perhaps someone would like to delete, (for example, I have a tool to expand the C-drive, after the expansion of the Linux system to find out, have to unload and then reload) someone will do this: right-click "My Computer" click "Manage", and then click " Disk Management "formatted the disk with the Linux system installed!" This is absolutely no way to do!!! (Important things to three exclamation points) because when you install the Linux dual system, the MBR (boot zone) to the Linux management, if the format will be the MBR to erase, so that your windows will not start properly! Then in the Windows System environment for the repair of the MBR, we use the tool is "Diskgenius" software, it looks like this, click on the disk "rebuild MBR" on it, then you can format Linux that hard disk, This will ensure that your windows will not be destroyed!












Done!!!















































CentOS 7 with Windows dual system lost Windows startup item and default startup item modification




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.