For developers experienced with Microsoft Windows, Linux Mint offers and relatively easy migration to Linux. I enjoyed using it so much in my virtual world that I threw out Windows 10 and installed Mint as my primary day-to-day Operating System (“OS”) on my host. “Host” here means the machine that runs “on the iron” or hardware. That is, the host will, well, “host” the virtual machines or “guests”.
NOTE: I plan to put up the guest we build so users can download the completed guest; but, I strongly encourage the student to follow the steps in this chapter completely as a great learning exercise.
And for those of you who would rather watch than read, here’s the whole thing on a YouTube Video
As of today, July 2017, the current version of Mint is 18.2 and so we’ll use the links here to download the OS ISO image.
- Start up VirtualBox and press the New button to create a new Virtual Machine. Key in “Mint for Class” as the name and Virtual Box will select the Type as “Linux” and the Version for you:
- In the next screen, you can select how much memory to use. Mint and Linux do not require nearly as much RAM as Windows so you can select a value that makes sense for your machine. For our use, we’ll use 2GB
- In the next screen, you will let Virtual Box create a new virtual hard disk for you and so press the Create button.
- Next screen , leave the type as the default: VirtualBox Disk Image or VDI
- I prefer the Dynamically Allocated option on the next screen. This allows the disk to grow to what I need; and doesn’t grab as much space as the fixed disk would. However, there is some negligible impact on performance as Virtual Box will need to grow your disk when you require more space.
- If you select the Dynamically Allocated option, the next screen is very important. Here, you will want to configure much more space than you think you will need. Remember, Virtual Box will not provision the space until you need it so it’s OK to go large since you will have what you need later if your requirements turn out to be greater than you think. I use 250GB. NOTE: at the end of this lesson, I’ll touch on file locations and drive types; but in general for now you can just use the default file locations.
- Before we start our new virtual machine, let’s make a few tweaks:
- Right-click on the new Mint for Class vm in the Virtual Box Manager and click on Settings
- Navigate to System in the left panel and then the Processor tab. You will want to increase the number of virtual CPUs and if your CPU supports it, enable PAE
- Move down to the Display option on the left and click it. I suggest you slide the Video Memory over to the right some to give your guest more video memory. The Cinnamon desktop is fairly robust and extra video memory will help. Make sure you ENABLE the Enable 3D Acceleration. Note: is you try to enable the 2D, you will see a warning at the bottom of the dialog that this is an invalid setting so make sure to not enable that.
- Move down to the Storage tab on the left and we’ll want to select our mint ISO image for the optical drive. That way, it will automatically launch the Mint Setup when we start the virtual machine. Click on the empty optical drive icon under Storage. Then, press the optical drive icon on the far right to bring up a list of available ISO images. Yours may not be listed and so you will want to select the Choose Virtual Optical Disk File… to browse for the Mint Iso you downloaded. Click OK to select the file once you find it to load it into the virtual optical drive.
- Back at the Virtual Box Manager, press the Start icon on the top menu bar. As you can see after it loads, it will allow you to play with it some before actually installing it. However, our VM will allow us to do all that and so press the new desktop icon: Install Linux Mint
- When prompted, proceed to Install 3rd Party Software…
- In the next window, select the Erase Disk… as the only option and then Install Now and then Continue. NOTE: this will only impact your new virtual disk and since you chose to allow it to grow dynamically, it will not actually consume space on your host hard drive (the “real” disk) until you need and use it. Nor will it touch the files in your host system and so don’t worry about the Warning.
- Continue on through the setup dialogs and answer the prompts as needed with your specific details.
- After you reboot and see your live Mint installation, it will warn you that the cinnamon desktop is running in software rendering mode. That’s because we need to load the Virtual Box video (and other) drivers. Click on the warning window to dismiss it
- Inside the Virtual Box Window for your Mint VM, select the Devices tab from the Menu bar and then the option: Insert Guest Additions…
- When the dialog box you see here shows up, press the Run button
- After the program completes, you can dismiss the terminal window and reboot your guest system (Mint). There are several ways to do this, but the simplest is to press the “X” button or “Close” button on the guest VM screen. You can then select the Send the Shutdown Signal option, and when prompted, select the Restart button
- After the guest (Mint), comes back up, we should update the platform as well. Press the Menu button in the lower left corner and key in “Update” in the prompt.
- Launch the Update Manager and install any/all updates offered. Note, each time you update, there may be several new updates that follow including updates to firmware, headers, and the kernel.
- NOTE: if you get some spurious utf8 warnings, you can either disregard them (they are generally harmless); or, you can follow the instructions here.
- If you have updated the kernel, it’s a good idea to reboot the guest. Once that’s done, restart the Update Manager and press the Edit button in the menu bar and the press the Upgrade to “Linux Mint…” if available
- Continue to run the Update Manager after each reboot until there is nothing left to update.
- Once you have everything updated, it’s a great idea to take a snapshot. Shut down the guest and from the Virtual Box Manager, press the guest (such as Mint for Class) and then press the Snapshots icon in the upper right corner. Press the snapshot icon in the panel and name it something such as: “Base”.
The following are tweaks I like to make to my system to make development easier:
- With the guest shutdown, I open the VirutalBox Manager and right-click on the VM from the panel on the left; e.g. “Mint for Class” and select the settings again. From the General option on the left, I select the Advanced tab and enable the Shared Clipboard, Bidirectional.
- Next, I create a “shared” folder on my host so that I can move files between the host and guests. Note that I don’t put anything valuable in this folder and so I create a folder, and using the local file manager (Nemo since I’m running Mint on the host too) to create a share where everyone can read and write:
- To use the folder from the guest, just click on the Computer icon on the Mint desktop (in the guest). Then, click on the Network selection on the left. Finally, double click on the share name to mount the share. If you gave everyone permission, you can just use the anonymous user.
A Word About Disk Types & File Locations
Inside the Virtual Box Manager, click on the File menu option and then the first selection of Preferences.
In the Default Machine Folder, you can select the path to where your VMs will be held. I have two locations I use: one is on an SSD drive and the other is on a fast hard drive.
Virtual Box is very, very fast on an SSD drive – especially when you use snapshots and such. If you can afford it, this is an investment that pays dividends in increased productivity.
This lesson should have enabled you to get your basic Mint Operating System up and running. If you have problems or questions, post a comment/question and I’ll attempt to answer.
Next, we’ll install the development bits.