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.
[email protected] ~ $ sudo mkdir /mnt/boot
[email protected] ~ $ sudo mount /dev/sda9 /mnt/boot
[email protected] ~ $ sudo grub-install --boot-directory=/mnt/boot /dev/sdb
grub-probe: error: failed to get canonical path of ‘/cow‘.
Installing for i386-pc platform.
Installation finished. No error reported.
[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.
title Linux Mint 18
find --set-root /grub/i386-pc/core.img
kernel /grub/i386-pc/core.img
boot
Use VMware to install Linux on a physical hard drive and boot to Linux