Install Windows7 + Ubuntu13.04 + Centos7

Source: Internet
Author: User

Install Windows7 + Ubuntu13.04 + Centos7

Install Windows7 + Ubuntu13.04 + Centos7

(Note: after using a USB flash drive to create a boot disk for centos7, you do not need to delete the package or copy the image file or something. You can directly use it after burning it, I tested the installation of two desktops and one notebook, but there is no problem, but during the installation, You need to modify the location of the USB flash drive, as shown below :)

During the installation process with a USB flash drive, on the installation page, press the tab key to modify or press the e key directly: (direct installation is not successful and needs to be modified)

Vmlinuz initrd = initrd. img inst. stage2 = hd: LABEL = CentOS \ x207 \ x20x86_64 rd. live. check quiet:

Vmlinuz initrd = initrd. img inst. stage2 = hd:/dev/sdb4 quiet

Among them, hd:/dev/sdb4 is the location of the USB flash drive, which may be different. I am here. Other friends who are browsing the Internet have sda1. I don't know if the USB flash drive is different or why.

After centos7 is installed on the third system, the system fails to Boot Windows 7.

Solution: Use centos as the boot System

Method: Modify the/boot/grub2/grub. cfg file, that is, add a script to the file to guide windows.

menuentry'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-xxx'{insmod chaininsmod part_msdosinsmod ntfsset root='hd0,msdos1'chainloader +1}

Or, add this

menuentry 'win7'{insmod chaininsmod ntfsset root=(hd0,msdos1)chainloader +1}menuentry 'win7 search'{insmod chaininsmod ntfssearch -f /ntldr --set rootchainloader +1}

I can see another method on the Internet to solve the problem. However, I did a test and it cannot be implemented. But write it as a reference.

#---------------------------------------------------

Steps:

1. Switch to the root user

Su

2. execute commands

Grub2-mkconfig-o/boot/grub2/grub. cfg

The execution details are as follows: Kernel [root @ localhost jiezh] # grub2-mkconfig-o/boot/grub2/grub. generating generating grub configuration file... found linux image:/boot/vmlinuz-3.10.0-123.el7.x86_64Found initrd image:/boot/initramfs-3.10.0-123.el7.x86_64.imgFound linux image:/boot/vmlinuz-3.10.0-123.4.2.el7.x86_64Found initrd image:/boot/initramfs-3.10.0-123.4.2.el7.x86_64.imgFound linux image:/boot/vmlinuz-0-rescue-70ff68ea7ac34677a25f45f3417dd76cFound initrd image: /boot/initramfs-0-rescue-70ff68ea7ac34677a25f45f3417dd76c.imgFound Windows 7 (loader) on/dev/sdb1done

After the repair is completed, you can see the Windows 7 boot after the startup and restart (it cannot be performed on my computer)

I made # sudo update-grub2 on Ubuntu

However, the above Windows 7 guidance can be implemented.

#---------------------------------------------------

The complete code of this file is as follows: # do not edit this file # It is automatically generated by grub2-mkconfig using templates # from/etc/grub. d and settings from/etc/default/grub #### BEGIN/etc/grub. d/00_header ### set pager = 1if [-s $ prefix/grubenv]; thenload_envfiif ["$ {next_entry}"]; thenset default = "$ {next_entry}" set next_entry = save_env next_entryset boot_once = trueelseset default = "$ {saved_entry}" fiif [x "$ {feature_menuentry_id}" = xy]; thenmenuentry_id_option = "-- id" elsemenuentry_id_option = "" fiexport menuentry_id_optionif ["$ {prev_saved_entry}"]; thenset saved_entry = "$ {prev_saved_entry}" save_env saved_entryset prev_saved_entry = save_env restart boot_once = truefifunction savedefault {if [-z "$ {boot_once}"]; thensaved_entry = "$ {chosen}" save_env saved_entryfi} function load_video {if [x $ feature_all_video_module = xy]; theninsmod extends efi_ugainsmod ieee1275_fbinsmod vbeinsmod vgainsmod video_bochsinsmod video_cirrusfi} terminal_output consoleif [x $ feature_timeout_style = xy]; thenset timeout_style = menuset timeout = 5 # Fallback normal timeout code in case the timeout_style feature is # unavailable. elseset timeout = 5fi ### END/etc/grub. d/00_header ###### BEGIN/etc/grub. d/10_linux ### menuentry 'centos Linux, with Linux 3.10.0-123. el7.x86 _ 64' -- class centos -- class gnu-linux -- class gnu -- class OS -- unrestricted $ menuentry_id_option 'gnulinux-3.10.0-123. el7.x86 _ upload' {load_videoset gfxpayload = keepinsmod gzioinsmod part_msdosinsmod xfsset root = 'hd0, msdos10' if [x $ feature_platform_search_hint = xy]; thensearch -- no-floppy -- fs-uuid -- set = root -- hint-bios = hd0, msdos10 -- hint-efi = hd0, msdos10 -- hint-baremetal = ahci0, msdos10 -- hint = 'hd0, msdos10' ab21651b-b9d9-403a-9115-f288ca6b7bd5elsesearch -- no-floppy -- fs-uuid -- set = root ab21651b-b9d9-403a-9115-f288ca6b7bd5filinux16/vmlinuz-3.10.0-123.el7.x86_64 root = UUID = 8091b91e-1049-4c97-8e64-59fa7cda6671 ro rd. lvm. lv = centos/swap vconsole. font = latarcyrheb-sun16 rd. lvm. lv = centos/root crashkernel = auto vconsole. keymap = us rhgb quiet LANG = zh_CN.UTF-8initrd16/initramfs-3.10.0-123.el7.x86_64.img} menuentry 'windows 7 (loader) (on/dev/sda1) '-- class windows -- class OS $ menuentry_id_option' osprober-chain-XXX' {insmod chaininsmod part_msdosinsmod ntfsset root = 'hd0, msdos1 'chainloader + 1} menuentry' CentOS Linux, with Linux compiler '-- class centos -- class gnu-linux -- class gnu -- class OS -- unrestricted $ comment 'gnulinux-authorization' {load_videoinsmod gzioinsmod part_msdosinsmod xfsset root = 'hd0, msdos10' if [x $ feature_platform_search_hint = xy]; thensearch -- no-floppy -- fs-uuid -- set = root -- hint-bios = hd0, msdos10 -- hint-efi = hd0, msdos10 -- hint-baremetal = ahci0, msdos10 -- hint = 'hd0, msdos10 'ab21651b-b9d9-403a-9115-f288ca6b7bd5elsesearch -- no-floppy -- fs-uuid -- set = root ab21651b-b9d9-403a-9115-f288ca6b7bd5filinux16/vmlinuz-0-rescue-a9741edb99374138ad3514311cc1ba77 root = UUID = 8091b91e-1049-4c97-8e64-59fa7cda6671 ro rd. lvm. lv = centos/swap vconsole. font = latarcyrheb-sun16 rd. lvm. lv = centos/root crashkernel = auto vconsole. keymap = us rhgb quietinitrd16/initramfs-0-rescue-a9741edb99374138ad3514311cc1ba77.img} if ["x $ default" = 'centos Linux, with Linux 3.10.0-123. el7.x86 _ 64']; then default = 'advanced options for CentOS Linux> CentOS Linux, with Linux 3.10.0-123. el7.x86 _ 64'; fi ### END/etc/grub. d/10_linux ###### BEGIN/etc/grub. d/20_linux_xen ##### END/etc/grub. d/20_linux_xen ##### BEGIN/etc/grub. d/20_ppc_terminfo ##### END/etc/grub. d/20_ppc_terminfo ###### BEGIN/etc/grub. d/30_os-prober ### menuentry 'ubuntu 13.04 (13.04) (on/dev/sda9) '-- class gnu-linux -- class gnu -- class OS $ menuentry_id_option' osprober-gnulinux-simple-0cbece5c-328e-4f94-aa52-da220cca34a2 '{insmod part_msdosinsmod ext2set root = 'hd0, msdos9' if [x $ export = xy]; thensearch -- no-floppy -- fs-uuid -- set = root -- hint-bios = hd0, msdos9 -- hint-efi = hd0, msdos9 -- hint-baremetal = ahci0, msdos9 -- hint = 'hd0, msdos9 'plugin -- no-floppy -- fs-uuid -- set = root folder/boot/vmlinuz-3.8.0-19-generic root = UUID = GoPro locale = zh_CN quiet splash $ vt_handoffinitrd/boot/initrd. img-3.8.0-19-generic} submenu 'advanced options for Ubuntu 13.04 (13.04) (on/dev/sda9) '$ menuentry_id_option' osprober-gnulinux-advanced-0cbece5c-328e-4f94-aa52-da220cca34a2 '{menuentry' Ubuntu (on/dev/sda9) '-- class gnu-linux -- class gnu -- class OS $ menuentry_id_option' osprober-gnulinux-/boot/vmlinuz-3.8.0-19-generic -- optional '{insmod part_msdosinsmod ext2set root = 'hd0, msdos9' if [x $ feature_platform_search_hint = xy]; thensearch -- no-floppy -- fs-uuid -- set = root -- hint-bios = hd0, msdos9 -- hint-efi = hd0, msdos9 -- hint-baremetal = ahci0, msdos9 -- hint = 'hd0, msdos9 'plugin -- no-floppy -- fs-uuid -- set = root folder/boot/vmlinuz-3.8.0-19-generic root = UUID = GoPro locale = zh_CN quiet splash $ vt_handoffinitrd/boot/initrd. img-3.8.0-19-generic} menuentry 'ubuntu, Linux 3.8.0-19-generic (on/dev/sda9) '-- class gnu-linux -- class gnu -- class OS $ menuentry_id_option' osprober-gnulinux-/boot/vmlinuz-3.8.0-19-generic -- optional '{insmod part_msdosinsmod ext2set root = 'hd0, msdos9' if [x $ feature_platform_search_hint = xy]; thensearch -- no-floppy -- fs-uuid -- set = root -- hint-bios = hd0, msdos9 -- hint-efi = hd0, msdos9 -- hint-baremetal = ahci0, msdos9 -- hint = 'hd0, msdos9 'plugin -- no-floppy -- fs-uuid -- set = root folder/boot/vmlinuz-3.8.0-19-generic root = UUID = GoPro locale = zh_CN quiet splash $ vt_handoffinitrd/boot/initrd. img-3.8.0-19-generic} menuentry 'ubuntu, Linux 3.8.0-19-generic (recovery mode) (on/dev/sda9) '-- class gnu-linux -- class gnu -- class OS $ menuentry_id_option' osprober-gnulinux-/boot/vmlinuz-3.8.0-19-generic -- optional '{insmod part_msdosinsmod ext2set root = 'hd0, msdos9' if [x $ feature_platform_search_hint = xy]; thensearch -- no-floppy -- fs-uuid -- set = root -- hint-bios = hd0, msdos9 -- hint-efi = hd0, msdos9 -- hint-baremetal = ahci0, msdos9 -- hint = 'hd0, msdos9 'plugin -- no-floppy -- fs-uuid -- set = root users/boot/vmlinuz-3.8.0-19-generic root = UUID = GoPro recovery nomodeset locale = zh_CNinitrd/boot/initrd. img-3.8.0-19-generic }### END/etc/grub. d/30_os-prober ###### BEGIN/etc/grub. d/40_custom #### This file provides an easy way to add custom menu entries. simply type the # menu entries you want to add after this comment. be careful not to change # the 'exec tail' line above. ### END/etc/grub. d/40_custom ###### BEGIN/etc/grub. d/41_custom ### if [-f $ {config_directory}/custom. cfg]; thensource $ {config_directory}/custom. cancelif [-z "$ {config_directory}"-a-f $ prefix/custom. cfg]; thensource $ prefix/custom. cfg; fi ### END/etc/grub. d/41_custom ###

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.