CentOS7 out of time is not short, the previous period of time has been in the virtual machine use, recently idle down, like in their own laptop mounted a win7 and CENTOS7 dual system experience the following solid-machine effect, after several twists and turns finally smoothly installed on the WIN7 and CentOS7 dual system! Here is mainly to share some of their own problems, for users to reference the door!
First introduce my Computer configuration, my notebook model is Y400, a total of three hard drives, 128SSD (1th) + 1T HDD (2nd) + 1T HDD (3rd), 128 of the SSD is divided into two partitions, the first partition installed Win7, the second game and a number of software-free installation I used the second hard drive and the third hard drive as a storage disk because I didn't use it, so I could use it from the back of two HDD!
I burn a USB flash drive image using the UltraISO (soft disk pass), after burning the installation steps on the Internet has been introduced very detailed, I do not introduce more here, I chose the installation process is the second hard drive (that is, 2nd hard disk, in advance already in Windows to draw 136G of unallocated space) , select "I want to match space", click "Finish", select "Standard Partition", and then through the lower left corner of the "+" partition, divided into 500MB/boot partition, 120GB/partition, 16GB swap space, then click Done, select "Accept Changes", and then step by step installation configuration is good , click Restart when the installation is complete;
Because my computer is a multi-drive, so when installing CENTOS7 installation boot can only be installed on the hard drive of CENTOS7 (default, if the change can only choose not to install the boot), at this time after the restart of the computer did not like the online Netizen said, "Only Centos7 the boot menu, Without the win7 boot menu ", my computer directly to the normal as usual directly into the Win7 interface, and then start into Win7, because my SSD default is the first boot disk, and I installed the CENTOS7 on the second hard disk, so there is no impact on the SSD things, So I tried to start with the second hard drive (F12 choose to start with a second hard drive), the result is that the upper left corner of the screen has only one point and a cursor, this method failed (just my computer so failed, a netizen so successful, you can also try);
And then on the Internet to check the information, ask netizens, and then in the Win7 installed a EASYBCD,
Then restart the computer, you can see NeoSmart Linux (this name can be changed, I changed to "menu list").
Enter the list of startup items :
There is a list of startup items , this is finally done, but after the return to the screen, found that there is no response, so forced to restart the computer, to the CentOS Linux boot list here, do not press ENTER, press the letter "E" key, check the boot menu which has the problem:
Found this boot menu some problems, my computer is three hard drives, and my CentOS7 is mounted on the second hard drive, I circled in red in the area of the block is obviously wrong,
Set root= ' Hd0,msdos2 ' specifies root as the second partition of the first hard drive, where root corresponds to the/boot partition (if the/boot partition is not specified, this root should point to the "/" partition).
Off-topic (Basic knowledge Supplement)
Hdx,msdosy
HD Specifies the hard disk, starting with 0, hd0 represents the first hard drive, and so on
MSDOS specifies a partition on a hard disk, starting with 1, MSDOS1 represents the first partition, and so on (in fact, direct write 1 is also possible)
The difference between HDA and SDA:
HD represents the native disk interface as IDE interface
SD represents the native disk interface as SCSI interface
They all start with a, with HDA or SDA representing the first disk, a,b,c,d ... And so on
HDA and SDA can be followed by numbers, representing different partitions of the first disk, such as sda1 representing the first partition of the first disk;
Take my computer's hard drive as an example to illustrate:
My computer has three hard drives (My computer is a SCSI interface, so I use SD description, but not the HD description):
SSD full disk partition one (C) Partition II (F)
SDA SDA1 Sda2
First HDD partition one (D) partition two (/boot) partition three (/) partition four (swap)
SDB sdb1 sdb2 sdb3 SDB5
Second HDD partition one (E)
SDC SDC1
Novices will surely wonder why the first HDD partition four is numbered SDB5, not SDB4, because there are up to four primary partitions in the MBR partition mode, so what if there are more than four primary partitions? At this point only the fourth partition will become an extended partition, in the extended partition in the partition, the subsequent allocation of the region will be a logical partition, the entire extended partition represents the SDB4, the extended partition is partitioned within the beginning of the number 5.
If a computer has a hard disk, the hard disk has two partitions, a primary partition, an extended partition, and only one logical partition in the extended partition, then the primary partition is SDA1, and the other logical partition is SDA5
I said here, if you do not understand or do not understand, ask me directly, or Baidu, these are 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,/boot is the second disk of the second partition, so this sentence should be changed to
Set root= ' Hd1,msdos2 ',
If the section below and else below the section is looking for the/boot partition and set the UUID (globally unique), this thing does not matter, you just know if and else in the section where the HD must be hd1,msdos2 on the line.
Know this I made a temporary change, and then through the ctrl+x implementation of the boot menu, the result is still unable to enter the system, which makes me very depressed, is it difficult to boot Centos7 more hard?
So I posted online for advice, a big God told me to select the first item in the Startup item List Press "C" (or press "CTRL + C" On the Boot Menu page) to enter the Grub> interface,
Then execute ( one line of execution, do not finish the execution once )
Linux (hd1,msdos2)/vmlinuz-3 ... root=/dev/sdb3 (if the/boot partition is not a separate partition, execute 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 top three lines of code, the first two lines to write to the number 3 can press the tab Key, there is a space before root, where (Hd1,msdos) represents the/boot partition, root for the/partition, so the/boot partition is separate partition and not separate partition there is a little difference , the veterans do not spit groove, I write so detailed mainly to help the novice!
After the execution of the above code really entered the system, into the new CENTOS7 configuration completed, and then manually started the CENTOS7, a bit depressed, maybe later start the system will have to use manual loading way, so I looked at the next boot menu code, The final Discovery menu is linux16 and initrd16, such as
I was able to start the use of the command is Linux and initrd Ah, as a try to hold the mentality of the/boot/grub2/grub.cfg in the linux16 and INITRD16 after the 16 are removed, the set after else appeared HD before the place has changed to ' Hd1,msdos2 ', and then reboot the system, actually through the CentOS boot menu to enter the system.
At this point, multiple hard drives, Win7 and CENTOS7 dual-system guidance is finally completed, but now finally can be normal use of dual systems!
There is also a lack of understanding of the place, that is, if you install a single system or in a virtual machine installed centos7,linux16 and initrd16 are no problem, the system can be started, but why in multi-drive multi-system will not start! If you have any trouble understanding this thing, please teach me.
Notebook multi-drive Win7 under the USB stick installation Cnetos7 boot problem!