Install dual-system CentOS under Win7 and fix problems with the CentOS boot loader installed on the USB flash drive

Source: Internet
Author: User

1. When installing CentOS with a USB flash drive, partition partitions should note: The system (contains Win7) can only be 4 primary partitions, so you can only delete a primary partition or in the extended partition in the free partition to establish the directory.

2, CentOS at the end of the installation step, the boot loader option only "installed on the USB stick" One, note: not easily installed on the MBR, will overwrite the Win7 system boot loader.

So let's first choose to install the bootloader on the USB stick and then fix it.

3, CentOS repair Grub boot Loader

Reference and turn from: http://blog.csdn.net/llhwin2010/article/details/8435153

Install CentOS with a USB stick, if using the default boot mount, the boot will be installed on the USB stick, must be started with a USB stick, this situation can be manually written to boot through grub. (When I install on another server manually set boot but installed to stay in grub can not start, this did not delve into, here is the first to say manual modification of the boot method, for those who encounter the same problem reference, if there are errors, welcome to shoot Bricks)

Enter GRUB

Linux Code
    1. [Email protected] home]#/sbin/grub

Find the location of Grub

Linux Code
    1. Grub> Find/grub/stage1
    2. (hd0,6)

If you are prompted for error 15:file not found, try to find/boot/grub/stage1 or find Stage1 (hd0,6) represents the 7th partition of the 1th hard disk, and the corresponding (hd0,0) represents the first partition of the first hard disk, This step actually tells us whether the boot was written to the USB stick

[ because under normal circumstances, we have only one hard disk in our computer, so the second hard drive is a USB drive. (HD1-hd0) As for partitioning, when creating a directory with free disk space, the device name such as/DEV/SDA ' X ' is displayed, the partition is ' x-1 ', or the DF command is used to view the disk where the/boot directory is located ]

Get down to the chase.

We will boot the write (hd0,6), that is, the first disk in the partition, I am here in the system disk is this, specifically can be used under Linux with the DF command to view

Linux Code
  1. grub> Root (hd0,6) [In my system, for example, the partition number of the directory/boot in my CentOS system is 6, so this is the root (hd0,6)]
  2. Filesystem type is EXT2FS, partition type 0x83
  3. grub> Setup (hd0)
  4. Checking if "/boot/grub/stage1" exists ... no
  5. Checking if "/grub/stage1" exists ... yes
  6. Checking if "/grub/stage2" exists ... yes
  7. Checking if "/grub/e2fs_stage1_5" exists ... yes
  8. Running "embed/grub/e2fs_stage1_5 (hd0)" ...      sectors is embedded.
  9. Succeeded
  10. Running "Install/grub/stage1 (hd0) (hd0) 1+15 P (hd0,0)/grub/stage2/grub/grub.conf" ... succeeded
  11. Done.
  12. Grub> reboot

Then modify the boot/boot/grub/menu.lst or/boot/grub/grub.conf CentOS under these two files are bound, change one can

Linux Code
  1. [Email protected] home]# Vi/boot/grub/menu.lst
  2. # grub.conf generated by Anaconda
  3. #
  4. # Note that you don't have the to rerun grub after making changes to the This file
  5. # notice:you has a/boot partition. This means
  6. # all kernel and INITRD paths is relative to/boot/, eg.
  7. # Root (hd0,6) [corresponds to the above/boot area]
  8. # kernel/vmlinuz-version RO root=/dev/volgroup00/logvol00
  9. # initrd/initrd-version.img
  10. #boot =/dev/sdb
  11. default=0
  12. timeout=5
  13. Splashimage= (hd0,6)/grub/splash.xpm.gz
  14. Hiddenmenu
  15. Title CentOS (2.6. 18-274.3. 1.EL5)
  16. Root (hd0,6)
  17. kernel/vmlinuz-2.6. 18-274.3. 1.el5 ro root=/dev/volgroup00/logvol00
  18. initrd/initrd-2.6. 18-274.3. 1.el5.img
  19. Title CentOS (2.6. 18-238.el5)
  20. Root (hd0,6)
  21. kernel/vmlinuz-2.6. 18-238.el5 ro root=/dev/volgroup00/logvol00
  22. initrd/initrd-2.6. 18-238.el5.img
  23. Title Other
  24. rootnoverify (hd0,6)
  25. Chainloader +1

The (hd1,0) to change (hd0,6), splashimage= (hd0,6)/grub/splash.xpm.gz This is the boot background image of the location, change does not change the relationship is not big, restart CentOS can start normally

Install dual-system CentOS under Win7 and fix problems with the CentOS boot loader installed on the USB flash drive

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.