How To: Fix Google Chrome Logo Disappearing on Windows 7

I had a few users mention that the Google Chrome logo had disappeared from the icon to launch the software. While Chrome functioned as expected, the issue is aesthetic only but I can see why it would become frustrating!

Google Chrome Logo Disappears

Image via Super User

I’m not necessarily sure what caused this issue to occur however I have not received reports of the issue happening again after implementing this fix. From further looking online it seems like this issue is rather common without a solid fix. With this in mind, the below solution may not work for you.

Solution

– Unpin Chrome from taskbar

– Locate Chrome in the start menu and right click “Properties”

– Click “Change Icon…”

– Replace the directory that is currently being looked in with %ProgramFiles% (x86)\Google\Chrome\Application\chrome.exe and hit enter

– The Google Chrome icon should now be viewable in the below window

Did the above solution not work for you? Check out this Super User post for a potential fix.

Found this helpful? Please share!

How To: Install XenCenter on Linux (Fedora/CentOS)

When I started using XenServer to host Virtual Machines I was checking on VMs using a Windows system. With a Windows system it’s easy to download & install XenCenter to get a visual solution for VM management as well as performance metrics.

After moving to a Linux desktop distro on my laptop I was faced with the struggle of finding an alternative. There are solutions out there, some are free to use but lack key features, others are feature rich but require a paid subscription to unlock said features.

To keep myself working with familiar software I decided to attempt to get XenCenter to work on Linux through Wine.

Known Issues

  • No SSL functionality
  • Cannot open “Properties” menu for a Virtual Machine
  • High likelihood of application crashing when using the “VM Console”

How To

– Install dependencies to local system

[stuart@asuka ~]$ sudo dnf install cabextract
[stuart@asuka ~]$ wine_dir=~/.wine32-xen

– Create fresh 32-bit wine directory

[stuart@asuka ~]$ WINEARCH=win32 WINEPREFIX=$wine_dir winecfg

– Download the .NET Cleanup Tool from https://www.microsoft.com/en-gb/download/details.aspx?id=30135

– Run the .NET Cleanup Tool (assumes that the tool was downloaded to ~/Downloads/)

[stuart@asuka ~]$ WINEPREFIX=$wine_dir wine ~/Downloads/cleanup_tool.exe

– Install msxml3 (Recommended to do before installing .NET 4.0 on WineHQ)

[stuart@asuka ~]$ WINEPREFIX=$wine_dir winetricks msxml3

– Install .NET 4.5

[stuart@asuka ~]$ WINEPREFIX=$wine_dir winetricks dotnet45 corefonts

– Install .NET 4.0 with winetricks

[stuart@asuka ~]$ WINEPREFIX=$wine_dir winetricks dotnet40 corefonts

– Install .NET 3.5 SP1 w/ dependencies

[stuart@asuka ~]$ WINEPREFIX=$wine_dir winetricks dotnet35sp1

– Install gdiplus

[stuart@asuka ~]$ WINEPREFIX=$wine_dir winetricks gdiplus

– Install XenCenter

[stuart@asuka ~]$ WINEPREFIX=$wine_dir wine ~/Downloads/XenCenterSetup.exe

– Run XenCenter

[stuart@asuka ~]$ WINEPREFIX=$wine_dir wine "C:\\Program Files\Citrix\XenCenter\XenCenter.exe"

Note: When connecting to a server, add :80 to the end to bypass SSL issues with connection

Found this helpful? Please share!

How To: Rename a Volume Group

The default naming convention for a logical volume during an OS install will put the hostname in there (depending on the OS & options chosen). This can be useful for identifying what machine the volume group belongs to but, what if the system hostname were to change?

These instructions describe how to rename a volume group, in order to complete the renaming procedure the machine will need to be rebooted. Bear this in mind if working on a production system!

– Rename the volume group

[stuart@asuka ~]$ sudo vgrename /dev/vg_oldname /dev/vg_newname

– Replace the old group name with the new one in /etc/fstab

[stuart@asuka ~]$ sudo sed -i 's/oldname/newname/g' /etc/fstab

– Replace the old group name with the new one in /boot/grub/grub.cfg (may need to update /boot/grub2/grub.cfg depending on the OS you are using)

[stuart@asuka ~]$ sudo sed -i 's/oldname/newname/g' /boot/grub/grub.cfg

– Reboot the system and the renamed volume group will be properly mounted

[stuart@asuka ~]$ sudo /sbin/init 6
Found this helpful? Please share!

How To: Convert OpenOffice HSQLDB to MySQL Database

This entry explains how to convert OpenOffice HSQLDB database to a MySQL server which can then be accessed using a front end (OpenOffice base, web gui, etc). This article assumes that a basic mySQL server is running (root password configured, server listening on port 3306, httpd and mysqld running).

Export OpenOffice Base as SQL File

– Open the database in OpenOffice Base

– Click on Tools -> SQL…

– Execute export command to a location on disk (I created a directory on the top level of my C drive called temp for this)

SCRIPT 'C:\temp\database.sql'

Import SQL File to MySQL Server

– Copy the sql file to the machine that will be the sql server

– Open the .sql file with your favourite text editor and make the following changes

Replace instances of CREATE CACHED TABLE with CREATE TABLE
Replace instances of INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) with INTEGER AUTOINCREMENT
Remove the following lines
SET DATABASE COLLATION "Latin1_General"
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
...
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 60
SET SCHEMA PUBLIC
...
ALTER TABLE "Table Name" ALTER COLUMN "Column Name" RESTART WITH Integer

– Create a new database

[stuart@asuka ~]$ mysql -u user -p
mysql> create database database; 
mysql> exit;

– Import the database

[stuart@asuka ~]$ mysqladmin -u user -p database < database.sql

Set Up Front End

– Start OpenOffice Base

– In the Database Wizard that opens, select ‘Connect to an existing database’, select MySQL from the drop down and click next

– Select ‘Connect using JDBC’ and click next

– On the next window, input the database name and server ip. Leave port number and driver class on the default settings unless these details have been changed otherwise.

– Input the username for the database, select requires password and click test connection (you’ll be asked for the password of the user and will then get a message about successful or failed connection)

– If the connection was successful then finish the setup wizard and the database front end should now open

– From the front end, queries and forms can be created for the database

More info for connecting MySQL and OpenOffice Base here – https://wiki.openoffice.org/wiki/Connect_MySQL_and_Base

Found this helpful? Please share!

How To: Mount box.com Account on Fedora/CentOS

Box.com is one of many online services that offer secure file sharing & cloud storage. A cool feature of box.com is that it can be easily mounted to a Linux system. Reasons you might want to mount box.com to your local filesystem could include:

  • Creating automated cloud backups (as easy as rsync‘ing or cp‘ing files to the mount directory)
  • Improving the ease of modifying cloud-based files
  • Making it easier to share many files with a friend

Mount Box.com Account

– Install davfs2 with dnf (replace dnf with yum on CentOS)

[stuart@asuka ~]$ sudo dnf install davfs

– Create the directory that you will mount box.com to

[stuart@asuka ~]$ sudo mkdir /box.com

– Open /etc/fstab in your favourite editor and add the following line

https://www.box.com/dav    /box.com    davfs    rw,user,noauto    0 0

– Create configuration files for the mount

[stuart@asuka ~]$ mkdir ~/.davfs2
[stuart@asuka ~]$ cp /etc/davfs2/davfs2.conf ~/.davfs2/
[stuart@asuka ~]$ cp /etc/davfs2/secrets ~/.davfs2/

– Ensure correct permissions are applied to the secrets file

[stuart@asuka ~]$ chown stuart ~/.davfs2/secrets
[stuart@asuka ~]$ chmod 600 ~/.davfs2/secrets

– Open ~/.davfs2/davfs2.conf in your favourite editor and make the following changes

Uncomment the line:  # secrets    ~/.davfs2/secrets
At the bottom of the file add:  use_locks    1

– Open ~/.davfs2/secrets in your favourite editor and add the following line to the bottom of the file

https://www.box.com/dav    box.com-username    box.com-password

– Add the user to the group davfs2

[stuart@asuka ~]$ sudo usermod -aG davfs stuart

– Mount the box.com account (do this as the user the secrets file has been setup for)

[stuart@asuka ~]$ mount /box.com/
Found this helpful? Please share!

How To: Mount a Logical Volume

A volume group is a filesystem that can be put onto a partition of a hard drive. What this filesystem type allows you to do is to break down that partition into smaller partitions (each one known as a logical volume), allowing for more compact & versatile storage management.

When trying to check or recover a logical volume it can be unintuitive to mount as you don’t mount the /dev/sdxY partition, instead, the volume group on the partition needs activating and then the separate volumes can be mounted.

How To

– Identify the ID of the disk to be mounted:

[stuart@asuka ~]$ sudo fdisk -l

– Display all volume groups:

[stuart@asuka ~]$ sudo pvs

– Identify logical volumes for volume group:

[stuart@asuka ~]$ sudo lvdisplay /dev/VolGroupXX

– Activate volume group:

[stuart@asuka ~]$ sudo vgchange VolGroupXX -a y 4

– Mount the logical volume:

[stuart@asuka ~]$ sudo mount /dev/VolGroupXX/LogVolXX /mnt/
Found this helpful? Please share!

How To: Compile a Kernel on a Linux System

A Kernel?

The kernel is the core of the Operating System, bridging the connection between the hardware & applications by providing the necessary drivers & utilities for the system to function. If you’re running newer hardware or are just wanting to optimise your kernel then you’ll need to know how to compile a kernel.

Over at kernel.org the latest stable, development & longterm kernels are maintained.

Due to the kernel being used by all Linux distributions there is a very low chance that the kernel running on any popular Linux operating system is the latest & greatest. This is due to the extensive tweaking & testing done by the distribution maintainers to deliver a stable user experience.

How To

In the event that a new kernel is released with functionality required for your system then you can compile a new version of the kernel on your system as follows.

– Download kernel source tarball (from kernel.org downloads) to /tmp/

– Untar the source in the correct location

[root@asuka ~]# cd /usr/src/
[root@asuka ~]# tar xf /tmp/linux-kernel-version.tar.gz

– Change to the source directory

[root@asuka ~]# cd linux-kernel-version

– Configure the kernel

[root@asuka ~]# make oldconfig  [Keeps old kernel configuration and only asks for answers to kernel additions]
[root@asuka ~]# make menuconfig  [Starts again with a menu configuration, can be used after make oldconfig to tweak/change settings]

– Create and install the kernel

[root@asuka ~]# make && make modules_install && make install

– Check /boot/grub/grub.cfg for latest kernel bootload

– Reboot the machine and check for new kernel

[root@asuka ~]# /sbin/init 6
Wait for machine to come back up
[root@asuka ~]# uname -r
Found this helpful? Please share!

Git Command Cheat Sheet

Git is a powerful version control tool. The git command list below contains the more commonly used commands for creating & controlling a git repository. For a guide on connecting a local git repository to BitBucket, check out my guide Initialise a Local Git Repository & Connect to Remote BitBucket Repository.

– Add current directory as a repository

[stuart@asuka MyProject]$ git init

– Add all files to repository

[stuart@asuka MyProject]$ git add *

– Add specific file to repository

[stuart@asuka MyProject]$ git add file

– Commit changes to all files (-m "message" is optional)

[stuart@asuka MyProject]$ git commit -a -m "message"

– Commit changes to specific files

[stuart@asuka MyProject]$ git commit file -m "message"

– Push commit changes to repository

[stuart@asuka MyProject]$ git push

– Pull changes from git repository

[stuart@asuka MyProject]$ git pull

– Create a new branch

[stuart@asuka MyProject]$ git checkout -b new_branch

– Push new branch to remote server

[stuart@asuka MyProject]$ git push origin new_branch

– View current branch and other branches

[stuart@asuka MyProject]$ git branch

– Change current branch

[stuart@asuka MyProject]$ git checkout new_branch

For more information about the git command & available command options, check out the manual page for git (man git) or see the official git documentation.

Found this helpful? Please share!

How To: Update Firmware on Nvidia GRID K2

Creating VMs that are powerful enough for heavy graphical programs (e.g. CAD & modelling software) requires a lot of graphics processing power from a capable GPU. In my experience, using XenServer along with the Nvidia GRID graphics cards allows for a compact & powerful solution to virtualising CAD desktops.

The Nvidia GRID cards I had been using were being temperamental with the VMs and upon further digging I found that a firmware update for the cards to fix issues with “multiple monitors on VMs” was released at the end of 2013. It seems that the Nvidia GRID card will not function with XenServer if this firmware update is not installed.

Symptoms

There aren’t any noticeable symptoms to this problem however there are a couple of ways of identifying differences between the GRID cards.

Detailed PCI Information

– Identify card bus ID

[root@asuka ~]# lspci |grep -i nvid
00:06.0 VGA compatible controller: NVIDIA Corporation GK107GL [GRID K1] (rev a1)

– Show verbose information about card (Check the lines starting with Region to see if the memory has a mapped address, question marks indicate a passthrough issue)

[root@asuka ~]# lspci -vvv -s 00:06.0  [Note: Replace 00:06.0 with the bus ID in the output from above command]
Identify Version of VGA BIOS

– Boot up a VM with the issue GRID card passed through

– Find the BIOS version from the VMs command line

[root@asuka ~]# grep VideoBIOS /var/log/Xorg.0.log

VideoBIOS Versions

From the output in Xorg.0.log above it will identify the VideoBIOS version, the versions below are ones that I have encountered on GRID cards along with info on whether or not they worked.
80.04.60.00.31 – GRID K2 – Doesn’t work with a VM
80.04.d4.00.0a – GRID K2 – Works with a VM

80.07.6d.00.15 – GRID K1 – Doesn’t work with a VM
80.07.be.00.0{2/3/4/5} – GRID K1 – Works with a VM

Firmware Update

– Download the firmware from the link at the bottom of the page

– On the XenServer, change to the location of the tarfile

– Untar the file

[root@asuka ~]# tar xvzf GRID_UPDATE_K1_K2.tar.gz

– Change into the new directory

[root@asuka ~]# cd GRID_UPDATE_K1_K2/

– Run the non-automated installation script

[root@asuka GRID_UPDATE_K1_K2]# ./gridpro-update_R1.0.run

– Respond to the prompts as shown in the below output, lines in bold have user responses [Note: The first 2 firmware updates are skipped as the version numbers differ from the desired firmware version]

[root@glatz GRID_UPDATE_K1_K2]# ./gridpro-update_R1.0.run

NVIDIA Firmware Update Utility
Version 5.151g

Press 'y' to confirm ('s' to skip, 'a' to abort): y                                                  *** IMPORTANT ***
Do not turn off the computer or attempt to reboot your computer while the NVIDIA firmware is being updated. If the computer is turned off, or power is lost, you may be unable to restart your computer.

Searching for display adapters to update...
VGA BIOS Version: F0.47.1D.00.B0 REV:00000000
Found display adapter suitable for this upgrade.
CONFIRM: You are about to update the firmware of the display adapter. Are you sure you want to do this?
Press 'y' to confirm ('s' to skip, 'a' to abort): s

VGA BIOS Version: 80.04.D4.00.09
Found display adapter suitable for this upgrade.
CONFIRM: You are about to update the firmware of the display adapter. Are you sure you want to do this?
Press 'y' to confirm ('s' to skip, 'a' to abort): s 

VGA BIOS Version: 80.04.D4.00.0A
Found display adapter suitable for this upgrade.
CONFIRM: You are about to update the firmware of the display adapter.
Are you sure you want to do this?
Press 'y' to confirm ('s' to skip, 'a' to abort):  y

The display may go *BLANK* on and off for up to 10 seconds or more during the update process depending on your display adapter and output device.
Clearing original firmware image...
.Storing updated firmware image...
.........
Verifying update...
Update successful.

No more matches found.

– Once the update has finished, reboot the XenServer

[root@asuka GRID_UPDATE_K1_K2]# /sbin/init 6

Download Link

http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=1YCT8

Found this helpful? Please share!

How To: Convert VDI to IMG (VirtualBox Disk Image Conversion)

VirtualBox Disk Images (VDIs) store all of the information & data for a VM. It is the virtualised hard disk drive for running the contained OS.

A while back at work we were migrating to XenServer from VirtualBox to get a stronger virtualisation platform working, as part of this, we had to move the VMs from VirtualBox to XenServer which required the images to be in a format that is compatible with XenServer.

The below instructions describe how to convert the VDI image to IMG format on a Linux system as well as how to check that the converted image works properly.

– Clone VDI file to IMG [Note: For most VMs there are 2 disks (name.vdi & name-disk1.vdi), use the name.vdi disk]

VBoxManage internalcommands converttoraw /route/to/disk.vdi /route/to/output.img

– Check that there are partitions on the img

fdisk -lu /route/to/output.img

– Mount LVM partition for editing/checking files

losetup /dev/loop0 /route/to/output.img  [Note: /dev/loop0 doesn't need to exist for this command to work]
kpartx -a /dev/loop0
vgscan 
vgchange -a y vg_name  [Note: Output of vgscan will show vg_name]
mount /dev/vg_name/lv_root /mnt/

– Undo mounting

umount /mnt/
vgchange -a n vg_name
kpartx -d /dev/loop0
losetup -d /dev/loop0
Found this helpful? Please share!