Use VMware to install Linux on a physical hard drive and boot to Linux

Source: Internet
Author: User
Tags linux mint

My notebook is dual system windows and Linux. It is often troublesome to switch between the two systems. So I thought that if you can load a system on a physical hard disk with a VMware virtual machine, you can start the other system directly when needed.

Note: My dual system is booting with Windows EASYBCD. If you are using Linux's Grub boot dual system, be careful. It is possible to break the boot, causing both systems to fail to load.
The disk partitioning situation is as follows:SDA1, Sda5, Sda6, and SDA7 are Windows partitions. SDA8~SDA11 is a Linux partition, where sda9 is the boot partition. Required Conditions:VMWare Workstation Player. The version I'm using is 12. ISO image file for Linux Mint's installation disk. EasyBCD. After the virtual machine is established, it may not be possible to physically start mint. This time needs EASYBCD.To establish a virtual machine step: First, create a new virtual machine in VMware. The virtual machine parameters are set according to the actual situation. Second, delete the default hard disk in the virtual machineIn the previous step, a hard disk was established by default. We're going to erase this hard drive. Manually set up the hard drive. third, load the physical partitionSelect "Edit Virtual machine settings" To delete the disk and then click on the "Add" button. Select "Disk" and click Next. This should be based on the type of physical hard disk selected, I chose "SATA". Click Next. Select the Use Physical Disk option. Click Next. Select the disk device where Linux is located, and then select Use a single partition. Click Next. Select the Linux partition, including the swap partition. Remember, do not select partitions for Windows. Click Next.
Click the Finish button. Completed loading of the physical disk. Iv. setting up a boot partitionWe need to build a virtual hard disk to boot Linux. Repeat the steps above to create a virtual hard disk. In the select disk step. Select Create a new virtual disk. Click Next. The capacity of this disk does not need to be large, 1G is large enough. After the establishment is complete as follows. Check the "Virtual device node" of the disk to ensure that the physical disk is "0:0". v. Booting a virtual machine with a Linux Mint disc imageSet up disc mirroring first. Then, start the virtual machine. Start a terminal and enter the sudo fdisk-l to view the disk condition. My virtual disk is as follows. The physical disk that is loaded is/DEV/SDA, and the newly created 1G virtual disk is/dev/sdb. Vi. Creating partitions for the Startup diskEnter sudo fdisk/dev/sdb to create the partition on the SDB. Enter N to create a new partition. Then enter p to establish the primary partition. The next steps are the default options. Finally, enter W to write and exit Fdisk. Vii. Creating a boot record on the boot partitionFirst, you want to hang the boot partition. My boot partition is/dev/sda9. Then, create the boot record with the Grub-install command.
  1. [email protected] ~ $ sudo mkdir /mnt/boot
  2. [email protected] ~ $ sudo mount /dev/sda9 /mnt/boot
  3. [email protected] ~ $ sudo grub-install --boot-directory=/mnt/boot /dev/sdb
  4. grub-probe: error: failed to get canonical path of ‘/cow‘.
  5. Installing for i386-pc platform.
  6. Installation finished. No error reported.
  7. [email protected] ~ $
Eight, start mintYou can now restart the system. When the virtual machine starts, press the F2 key to enter the virtual machine's BIOS settings. On the Boot Options page, adjust the boot order of the hard drive device. Use the 0:2 device as the first hard deive device to start. This will allow you to load the Mint boot menu and start the mint normally.
Nine, repair the physical machine Linux bootWhen Linux is loaded with a virtual machine, it is possible that the physical machine could not load Linux. You can then use EASYBCD's neogrub to boot Linux. First delete the original Linux boot in the EASYBCD. Next, in the "Add New Item"-"Neogrub" page, configure Neogrub (if Neogrub is not installed, first click the Install button). Click the Configure button to add the following lines to the pop-up Notepad.
    1. title Linux Mint 18
    2. find --set-root /grub/i386-pc/core.img
    3. kernel /grub/i386-pc/core.img
    4. boot

Use VMware to install Linux on a physical hard drive and boot to Linux

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.