How to install the guidance module for multiple hard drive Windows USB flash drives in your laptop !, Win7x0tos7

Source: Internet
Author: User

How to install the guidance module for multiple hard drive Windows USB flash drives in your laptop !, Win7x0tos7

CentOS7 has been used on virtual machines for a while and has been idle recently, just like installing a win7 and Centos7 dual system in your laptop to experience the effects of the following physical machines, after several twists and turns, we finally installed the WIN7 and CentOS7 dual systems! Here, I want to share some of my problems for reference!

First, I will introduce my computer configuration. My laptop model is Y400, a total of three hard disks, 128ssd (1) + 1 TB hdd (2) + 1 TB hdd (No. 3); 128 SSD is divided into two partitions. The first partition is installed with win7, the second is the game, and some software without installation; I used the second hard disk and the third hard disk as the warehouse disk. because they are not used up, I can use them from the two hdds at any time!

I used UltraISO to burn a USB flash drive image. After burning, the installation steps have been described in detail on the Internet. I will not introduce them here, during the installation process, I chose the second hard disk (that is, the No. 2 hard disk, which has already drawn a GB unallocated space in advance under windows) and selected "I want to allocate space ", click "finish", select "Standard partition", and then use the "+" in the lower-left corner to partition MB/boot, GB/partition, and 16 GB swap space, click "finish", select "accept changes", and install the configuration step by step. After the installation is complete, click "restart;

Because my computer has multiple hard disks, you can only install the Boot Tool on the hard disk where Centos7 is installed (default, if you change it, you can only choose not to Install Boot ), at this time, the computer after the restart is not as "only the boot menu of Centos7, but the boot menu of win7" as the online user said ", my computer directly enters the win7 interface as usual, and then starts to enter win7, because my ssd is the first boot disk by default, and I installed Centos7 ON THE SECOND hard disk, this does not affect everything on the ssd, so I tried to start it with the second hard disk (F12 selected to start with the second hard disk). The result is that there is only one vertex and one cursor in the upper left corner of the screen, this method failed (only my computer has failed like this. If some netizens have succeeded like this, you can try it );

Then I checked the information on the Internet and asked a netizen, So I installed an EasyBCD in win7,

Then restart the computer and you will see NeoSmart Linux. (You can change the name to "menu list ").

 

 

Press enter to go To the startup Item List:

There is a list of boot items, and this is done, but after you press enter, you will find that the screen is black and there is no response, so force the computer to restart. When you go to the CentOS Linux boot item list, do not press Enter, press the "E" key to check whether the Startup menu is faulty:

I found some problems with the boot menu. My computer is a three-hard drive, and my CentOS7 is mounted on the second hard drive. It is obviously incorrect in the area circled in red,

Set root = 'hd0, msdos2 'specifies that root is the second partition of the first hard disk. Here, root corresponds to/boot partition (if/boot partition is not specified separately, this root should point to the "/" partition ).

Digression (basic knowledge supplement)

Hdx, msdosy

Hd specifies the hard disk, starting with 0. hd0 indicates the first hard disk, and so on.

Msdos specifies the partition on a hard disk. Starting from 1, msdos1 indicates the first partition, and so on (in fact, it is also possible to directly write 1)

Differences between hda and sda:

Hd indicates that the local disk interface is an IDE interface.

Sd indicates that the local disk interface is a SCSI interface.

They all start with a and use hda or sda to represent the first disk, a, B, c, d... and so on.

After hda and sda, you can use numbers to represent different partitions of the first disk. For example, sda1 indicates the first partition of the first disk;

Take my computer hard drive as an example:

My computer has three hard disks (my computer uses the scsi interface, so I use the sd description instead of the hd description ):

Partition 1 (C) Partition 2 (F) of the entire SSD Disk)

Sda sda1 sda2

Partition 1 (D) Partition 2 (/boot) Partition 3 (/) Partition 4 (swap)

Sdb sdb1 sdb2 sdb3 sdb5

HDD partition 1 (E)

Sdc sdc1

New users are sure to wonder why the first HDD partition 4 is numbered sdb5, not sdb4, because it is in the mbr partition mode (there is also a GPT partition that does not have this limit, but I don't know much about this partition.) The next hard disk can have up to four primary partitions. What if there are more than four primary partitions? At this time, only the fourth partition can be converted into an extended partition. When the extended partition is used for partitioning, the allocated areas will all become logical partitions. The whole extended partition represents sdb4, extended partitions start with number 5.

If a computer has a hard disk, and the hard disk has two partitions, one primary partition, one extended partition, and only one logical partition in the extended partition, the primary partition is sda1, And the other logical partition is sda5.

I will talk about it here. If you don't understand or don't understand it, you can directly ask me or Baidu. These are all very basic things.

 

This configuration statement is obviously inconsistent with my actual situation. My Centos7 is installed on the second hard disk, so it should be hd1 and/boot is the second partition of the second hard disk, so this sentence should be changed

Set root = 'hd1, msdos2 ',

If the lower section and the lower section of else are looking for/boot partitions and setting uuid for them (globally unique identifier), it doesn't matter if you know this, you only need to know That hd1 and msdos2 are the places where hd appears between if and else (here I checked grub of Centos7 installed through the Virtual Machine. cfg, it turns out that the location where hd appears must be consistent with the value set by root ).

After knowing this, I made a temporary modification, and then executed the Start Menu through ctrl + X, and the result still failed to enter the system, which made me very depressed, is it so difficult to boot Centos7 with multiple hard disks?

So I posted a post asking for advice on the Internet. A great God told me to select the first item in the startup Item List and press "C" (or press "ctrl + C" on the startup Item menu page ") go to the grub> interface,

Then execute (execute one row instead of writing it once)

Linux (hd1, msdos2)/vmlinuz-3... root =/dev/sdb3 (if the/boot partition is not a separate partition, run linux (hd1, msdos2)/boot/vm... root =/dev/sdb2 );

Initrd (hd1, msdos)/initramfs-3 .... img (if the/boot partition is not a separate partition, execute initrd (hd1, msdos2)/boot/initramfs-3... img );

Boot

The above three lines of code can be completed by pressing the tab key when the first two lines are written to number 3. There is a space before the root, where (hd1, msdos) represents the/boot partition, root represents/partition, so there is a slight difference between/boot partition and not separately. The old birds should not speak out. I wrote this details mainly to help new beginners!

After the above code is executed, the system enters the system. After the new Centos7 configuration is complete, Centos7 is started manually again, which may be a bit depressing. You may have to manually load the system later, so I read the Startup Menu code again and finally found that the menu uses linux16 and initrd16, as shown in

 

The commands I used before can be successfully started are linux and initrd, so I tried/boot/grub2/grub. remove both linux16 and initrd16 in cfg, change the hd location after else To 'hd1, msdos2', and restart the system, the Centos Startup menu is used to access the system.

Now, with multiple hard disks, the boot from both win7 and Centos7 is complete, but now the dual-system can be used normally!

However, I didn't stop it. I suddenly remembered that I had encountered a similar situation when I installed win7 and ubuntu on my dual-hard-disk computer (I forgot whether I used easyBCD at the beginning, however, when I installed Windows 7 and ubuntu on a single hard disk, the system was successful, so I split a GB disk on the third hard disk to allocate space. I installed ubuntu14.04 in that disk. After the installation, it was still unable to start because of multiple hard disks, your own guide was not successful, by reading relevant information on the Internet, grub2 has a more convenient and powerful function, grub2-mkconfig-o/boot/grub2/grub. cfg, this command can scan all the startup items and display them on the Startup menu. (when used in linux, it can only scan the drive letters recognized by linux, if your windows disk is in ntfs format, you cannot scan windows boot items. If you want it to scan windows boot items, you must use the ntfs software to attach the corresponding windows system disk, after mounting, you will be able to scan it. For details about mounting a windows disk, refer to my "Centos6.5 system beginner Basic System Configuration 1"), because Centos7 uses grub2 for guidance, grub2 is used internally, so I directly go to CentOS7 and run the grub2-mkconfig-o/boot/grub2/grub through the root user. cfg, then restart the computer, and find that there is a startup Item for ubuntu.

Then you can enter ubuntu. It seems that grub2 is quite powerful. If you are interested, you can do a lot of research,

There is another thing you don't know here, that is, if Centos7, linux16, and initrd16 are installed in a single system or in a virtual machine, the system can be started, but why cannot it be started in multiple hard drive systems! If you have any questions about this, please advise.

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.