bios

How to Install VirtualBox in Ubuntu

How to Install VirtualBox in Ubuntu

This step-by-step detailed guide illustrates the way to install VirtualBox in Ubuntu and then install Windows 7 within a virtual machine to run seamlessly with the Ubuntu desktop. This allows software designed for Windows to run alongside Linux-based programs.

The main benefits of this – over having a dual booting system – are speed and convenience.  You won’t have to wait for either operating system to  shutdown before you boot into the other, nor will you have to save and close down work before re-boots.

Steps Covered:

  1. How to install VirtualBox in Ubuntu.
  2. How to create a virtual machine with VirtualBox and install Windows 7.
  3. How to install Windows Guest Additions CD Image.
  4. How to integrate Ubuntu and Windows 7 desktops, seamlessly.
  5. How to share files and folders between Windows 7 and Ubuntu in VirtualBox.
  6. How to install software on the virtual machine.
  7. Adobe Lightroom running in Ubuntu via seamless integration with a Windows 7 virtual machine.

Requirements:

  • A reasonable PC.
  • An Ubuntu operating system.
  • A Windows 7 installation ISO file and activation key (1). Remember! A 64 bit version is best for computers that contain more than 3GB RAM.
  • Ample hard disk space to accommodate a new operating system.
  • Plenty of time and no distractions.

(1) – Almost any operating system can be installed within a virtual machine, provided you are able to obtain the correct ISO file. This guide details the installation of Windows 7 (64 bit).

Terminology: The Difference Between Host and Guest Operating Systems.

The host operating system is the operating system on which you install VirtualBox. In this case, Ubuntu. And Ubuntu will host the guest operating system, Windows 7.

1. How To Install VirtualBox in Ubuntu

1.1 Select the Ubuntu Software Centre Icon and in the search field, type virtualbox.

Ubuntu Software Centre | VirtualBox

Ubuntu Software Centre | VirtualBox

1.2 Select VirtualBox (Run several virtual systems on a single computer) and then click Install. You may need to enter your administrator password.

Ubuntu | VirtualBox Install

Ubuntu | VirtualBox Install

1.3 Once installed, close the Ubuntu Software Centre.

1.4 Click the Ubuntu Unity ‘Start’ icon and type virtualbox in the search bar. Select VirtualBox to run it. The Oracle VM VirtualBox Manager window will open.

Oracle VM VirtualBox Manager

Oracle VM VirtualBox Manager

2. How To Install Windows 7 in VirtualBox

2.1 Open the Oracle VM VirtualBox Manager as described in step 1.4, then select New.

2.2 In the Name field, enter a description that best describes your virtual machine and guest operating system. If you specify what your guest operating system actually is, the Type and Version fields alter to match automatically. If they do not, ensure that you select the correct type and version before proceeding and clicking Next.

VirtualBox | Configuration for Windows 7 (64 bit)

VirtualBox | Configuration for Windows 7 (64 bit)

2.3 Move the slider to select the amount of memory (RAM) you want to allocate to your guest operating system. The more RAM you make available the better, but be careful not to starve your host operating system of memory.

VirtualBox Memory Allocation for Guest Operating System

VirtualBox Memory Allocation for Guest Operating System

2.4 Create a virtual hard drive now.

Create a Virtual Hard Drive Now | VirtualBox

Create a Virtual Hard Drive Now | VirtualBox

2.5 Choose the VDI (VirtualBox Disk Image).

Create a VDI (VirtualBox Disk Image)

Create a VDI (VirtualBox Disk Image)

2.6 Select Dynamically allocated.

Create a Physical Hard Drive | Select Dynamically Allocated

Storage on Physical Hard Drive | Select Dynamically Allocated

2.7 Choose a reasonable amount of storage space for your guest operating system. Take into account the space needed for the operating system itself and the size of the programs you wish to install on it. Since we have opted for Dynamically allocated disk space in step 2.6, the size of the virtual hard drive will grow as more data is written to it, up to the maximum specified here. This maximum cannot be altered later, so chose wisely.

VirtualBox Hard Drive Size

VirtualBox Hard Drive Size

2.8 Click the Create button to complete the main configuration of your virtual drive.

2.9 Your new virtual machine will be shown in the Oracle VM Manager. Right click that drive and select Settings…

Right Click New Virtual Drive and Select Settings

Right Click New Virtual Drive and Select Settings

2.10 If you see a warning triangle and Invalid Settings Detected then click the warning box to address the highlighted issues.

2.11 Go to System and select the Processor tab. If your computer has multiple CPU cores, you can stipulate here how many cores will be dedicated to your virtual machine and guest operating system.

VirtualBox | Select the Number of CPU Dies for your Virtual Machine

VirtualBox | Select the Number of CPU Dies for your Virtual Machine

2.12 Select Storage and the Empty CD icon beneath Storage Tree. Under Attributes, select the CD/DVD Drive location icon and select Chose a virtual CD/DVD disk file…

Select your Windows Operating System ISO File

Select your Windows Operating System ISO File

Navigate to your Windows installation ISO file and Open it. The ISO file will then be shown underneath the Controller: IDE. Click OK. Effectively, this step inserts your Windows installation disk  into your virtual machine. Your virtual machine will boot from this when it is first switched on.

2.13 You are now ready to start your virtual guest machine for the first time. Click Start.

2.14 If you receive an error regarding VT -x/AMD-V, it means that you do not have that type of hardware acceleration enabled in your BIOS. At this point you will need to re-boot your computer and enter the BIOS system to enable it. Not all BIOS systems are the same. You will need to look for this setting. It is generally found under the Performance or Virtual Machine Monitor headings.

BIOS Virtualization | Dell System XPS420

BIOS Virtualization | Dell System XPS420

2.15 When your virtual machine runs for the first time, it will begin to install the operating system that you specified in step 2.12.

Ensure you select Custom (advanced).

Installation of Windows 7 (64 bit) in VirtualBox

Installation of Windows 7 (64 bit) in VirtualBox

And then select the unallocated space you created as a virtual drive.

Unallocated Space for Windows Installation | VirtualBox

Unallocated Space for Windows Installation | VirtualBox

2.16 Install your Windows operating system.

3. How To Install Windows Guest Additions

3.1 With the guest operating system installed and booted to the Windows desktop, maximize the VirtualBox window to make it full screen. Notice that the Windows environment does not rescale when you do this. We need to install something called Guest Additions in the Windows system to enable this. Hover the mouse pointer over the top menu bar to reveal the VirtualBox menu. Select Devices > Insert Guest Additions CD Image…

VirtualBox will check your host system to see if you already have the appropriate Guest Additions CD Image downloaded for your guest operating system. If it cannot be found you will be prompted to download it. Click Download.

VirtualBox Guest Additions Download Prompt

VirtualBox Guest Additions Download Prompt

And then confirm the download.

VirtualBox Guest Additions Confirm Download Confirmation

VirtualBox Guest Additions Confirm Download Confirmation

3.2 When the Guest Additions CD Image has been downloaded, you will be asked: “Do you wish to register this disk image file and insert it into the virtual CD/DVD drive?”.

Click Insert.

Register & Insert Guest Additions CD Image File

Register & Insert Guest Additions CD Image File

The Guest Addition CD Image is then made accessible through the Windows virtual CD drive. Navigate to Windows START > Computer to view in Windows explorer.

VirtualBox Guest Additions | Windows Virtual CD Drive

VirtualBox Guest Additions | Windows Virtual CD Drive

3.3 Double-click the CD Drive (D:) VirtualBox Guest Additions icon and launch the VBoxWindowsAdditions application by double-clicking it. Hit Yes when asked, “Do you want to allow the following program to make changes to this computer?”

Oracle VM Virtual Box Guest Additions Set Up

Oracle VM Virtual Box Guest Additions Setup Wizard

3.4 Work through the installation process by clicking Next and Install if asked for permission to install device software. Re-boot the guest operating system when prompted to do so.

4. How To Integrate Windows 7 and Ubuntu Desktops

4.1 When the guest operating system re-boots, you should notice that resizing the VirtualBox window also resizes the Windows desktop too. This demonstrates that the Windows Guest Additions are working properly.

4.2 To integrate the guest environment with the host operating system (i.e. integrate Windows 7 with Ubuntu, seamlessly), hover your mouse over the top menu bar to reveal the VirtualBox menu and select View > Switch to seamless mode. To switch back, move your mouse to the bottom centre of the screen to access the guest operating system menu.

Alternatively, you can use the quick-key combination of host-key + L to enable and disable seamless mode. The host-key default is the right control key. Right Ctrl + L.

Seamless integration means that the Windows task bar is accessible at the bottom of the Ubuntu desktop and both Linux and Windows programs can be run side by side.

Seamless Integration of Windows 7 with Ubuntu | VirtualBox

Seamless Integration of Windows 7 with Ubuntu | VirtualBox

 5. How To Share Files and Folders with VirtualBox

5.1 The installation of Windows Guest Additions should allow drag and drop functionality between the host and guest operating systems, either one way or bidirectionally. By default, this function is disabled. In the VirtualBox menu, select Devices > Drag’n’Drop > and your direction preference.

5.2 The clipboard can also be shared between host and guest operating systems in a similar manner. Select Devices > Shared Clipboard > and your direction preference.

5.3 Devices > Shared Folders Settings… allows the sharing of host folders with the guest operating system in order that files can be shared between them.

VirtualBox | Shared Folders

VirtualBox | Shared Folders

To add a new folder for sharing, click the add folder icon on the right. At the drop down menu entitled Folder Path, select Other… then navigate to your designated folder and click Open.

Before adding the share, you are given the opportunity to provide a name for the shared folder, make it read-only and auto-mount it. Tick Auto-mount then OK. Click OK to exit the settings menu.

5.4 Shared folders are shown as network shares in the guest operating system.

Network Shares | VirtualBox

Network Shares | VirtualBox

In Windows 7, START > Computer > Network > VBOXSVR to access your shared folders.

6. How To Install Software on the Virtual Machine

To install software on your guest operating system you have a number of options:-

  • Use the browser of the guest operating system to download the software and install it from the appropriate download folder.
  • Make an ISO file of the installation CD/DVD and have that available in a shared folder on the host operating system as described in step 5.3.
  • Make an ISO file of the installation CD/DVD and mount that in the same manner as described in step 2.12.
  • Enable Drag’n’Drop and move files accordingly.
  • Use the Shared Clipboard to Copy files from the host to the guest operating system.

7.  Adobe Lightroom Running in Ubuntu via Seamless Integration with a Windows 7 Virtual Machine

Adobe Lightroom Running in Ubuntu | VirtualBox

Adobe Lightroom Running in Ubuntu | VirtualBox

Once your virtual machine is running with folder shares, it is quite easy to start testing various types of software.

See Adobe Lightroom 6 working in Ubuntu.

To get Adobe Lightroom installed I shared two folders with the virtual machine; one that contained the installation files and a second that contained my photographs. I installed Lightroom from the Network Share described in step 5.4.

Photographs were imported into Lightroom’s Library by adding the second Network Share to Folders.

How to Reduce the Minimum Fan Speed of a nVidia GT430 Graphics Card

How to Reduce the Minimum Fan Speed of a nVidia GT430 Graphics Card

If you have an  nVidia GeForce GT 430 graphics card and you want to reduce the card’s minimum fan speed, then these instructions should help you achieve that with relative ease.
ASUS 1GB GeForce GT 430 PCI-E 2.0 with Low Profile Bracket

Introduction

Cards like the ASUS 1GB GeForce GT 430 graphics card are often incorporated in slim Home Theatre PCs (HTPC) because of their low profile fit and their relatively low cost coupled with their high performance at decoding High Definition (HD) video content.
These models have a cooling fan sat inside the heat sink that helps govern the temperature of the GPU. The minimum fan speed is set in the card’s BIOS as a percentage of it’s top rotational speed. My card’s minimum fan speed was set at 60%. I had read of other minimum fan speeds, such as 65%, when I started to research this.
Initially, the card was quiet enough for use in my HTPC. Over time however, the fan became louder at it’s minimum, idling speed. And I wanted to quieten it down by reducing it’s minimum speed and adjusting the fan’s speed v GPU temperature curve. I found I could do most things with software except reduce the hard-coded minimum fan speed. A BIOS hack was required.
I found that a great number of people had been asking how to do this hack via many different internet forums. Solutions were not clear; the posts were old and a lot of the links for the necessary software were dead.
I found two noteworthy sets of instructions here to flash the device from a bootable usb stick running DOS. No matter how I tried though, I couldn’t get mine to flash. And I think it’s because the software revisions have moved on.

Guide for Flashing BIOS of nVidia GPU – techpowerup.com
Bootable USB Drive, Flashing nVidia GPU – Recovering From a Bad Flash – bjorn3d.com

It’s worth checking out how to recover from a bad flash and be prepared for such an event.

What You Will Need

I did everything in Windows 7 x64. There was no need to create a DOS bootable usb drive. All I had to do was re-boot the PC when the BIOS flash reported as being successful.

NiBiTor
nvflash (windows version)

EVGA Precision X

Method

Download NiBiTor and nvflash (windows version) and unzip them if necessary by extracting them to their own folders. Remember their locations.
Download and install EVGA Precision X on your computer.
Click once on Windows Start and type in cmd where it says Search programs and files. Do not press Enter.
The cmd program should be shown at the top of the list under the heading: Programs. Right click on it once and select Run as administrator. Click Yes when prompted.
The command console should appear and look something like this:

Double click the nvflash folder and right click on the directory path at the top of the folder window.

Select Copy address text from the context menu.

You can see here that my nvflash folder resides on my F drive at
F:\GT430 BIOS FLASH\nvflash_windows_5.142

Now click on the cmd window and type cd and a space. Right click and select paste.
The full directory name should be pasted into the window like this:

Press Enter to change into that directory. Notice that if you have your files on a different drive to C, you will have to change to that drive before hand like I have done here with F:

Back Up the Original ROM

In the cmd window, type

nvflash -b original.rom

and press Enter

This will make a back up copy of the nVidia card’s BIOS to your nvflash directory with the filename
original.rom
You can use a filename of your choice.
It is important at this stage to make back up copies of this BIOS image. Store a copy on a usb stick. Store a copy on another PC. Should things go wrong, you will need access to this file. A bad flash may prevent your card from outputting any display at all. So it’s no good just to have the one copy on that machine. You won’t be able to see to get at it!

Modify the BIOS with NiBiTor

Go into your NiBiTor folder and run the program.
Go to File > Open BIOS…
and select the file original.rom from your nvflash directory

You should see something like this as you browse the different tabs:

Change the Min fan speed here to something like 30

Then go to File > Save BIOS…

and select a new name for you modified ROM. Ensure you don’t overwrite your back up file.

Save this file to your nvflash directory. I used the filename:

modified.rom

Ready to Flash the BIOS?

The files in your nvflash directory should look something like this:

The nvflash files; the modified BIOS and your back up file.
Note: I have two back up files of the original BIOS in this screenshot entitled backup.rom and GF108.rom. You will just have the one back up file entitled original.rom
WARNING: The next command starts the flash process!
Ensure that this process is not going to be interrupted by anything.
DO THIS AT YOUR OWN RISK
Click on the cmd window once more and type:

nvflash modified.rom

and press Enter

The BIOS will be flashed with your modifications. Wait until the program reports success, then reboot your PC.
In the event that the flash goes wrong, you will need your original BIOS rom file to attempt a blind flash using a usb stick. Details of how to do this are explained in the links I gave in the introduction.

Controlling Fan Speed

Launch EVGA Precision X

  • Tick Windows Start Up so the software runs every time Windows boots. If you click on the settings icon (the two gears in mesh – top right) you will be able to select Start minimized if you don’t want this screen to appear every time Windows starts.
  • Change the minimum speed of the fan. (I believe that there is another value in the BIOS that prevents the fan from stalling at low rotational speeds). I found  I couldn’t enter values less than 31% even though I’d set the minimum value in my modified BIOS to 20.
  • Ensure Auto is ticked.

Now click on fan curve and ensure that Enable software automatic fan control is ticked

Here you can drag the points on the curve to create your own profile of fan speed vs GPU temperature. Experimentation and monitoring is key here. Spend a while monitoring your GPU temperature under different conditions of load. Playing games for example will cause the GPU to generate lots of heat. That heat has to be dissipated effectively or your GPU will burn out.
This profile works for me but the sole use of my card is the decoding of HD video. What I’ve done here is:
  • halve the fan’s minimum speed
  • keep the fan at it’s new minimum speed until the GPU temperature hits 68’C
  • then increase fan speed accordingly to maintain 68’C – 74’C operating temperature range when decoding HD content
In a nut shell; silent operation at the expense of running the GPU 10 to 15 degrees hotter than before. It may lessen the card’s life but my HTPC is almost silent now.