A chronological documentation test project, nothing serious, really!

02 Nov 2015 How to mount LVM partitions from rescue mode

This is a short post about mounting LVM partitions when you are using a rescue CDROM or a desktop install CDROM. The whole process is only four easy steps.

  1. Boot your rescue media. This can be a CentOS, Ubuntu, Red Hat or other CDROM that gives you a console access to the server. Most newer linux distributions have LVM support available.Scan for volume groups
    # lvm vgscan -v
  2. Activate all Volume Groups
    # lvm vgchange -y
  3. List Logical Volumes
    # lvm lvs –all
  4. You have now activated the volumes and have all the information you need to mount them
    # mkdir /media/your-mount-point
    # mount /dev/volumegroup/logical-volume /media/your-mount-point

You can now look into /media/your-mount-point and see the content of your mounted LVM volume.


Tags: , , , ,

Posted by

21 May 2014 Using the USB31000SPTB (AX88179) on CentOS 6.5

This post is a short HOWTO and describes how to get the Startech USB31000SPTB network adapter working on CentOS 6.5. USB31000SPTB uses the AX88179 chipset and is a USB3.0 to 10/100/1000M Gigabit Ethernet Controller.  This adapter works without any modifications on Ubuntu 13.10 and 14.04 LTS.

I am using kernel version 2.6.32-431.17.1.el6.x86_64 in this post

Use the root user if sudo is unavailable.

Steps taken to download, compile and install the Axis kernel module

  1. Download the Axis linux kernel driver from;71;112. I downloaded the Linux kernel 3.x/2.6.x Driver V1.10.0 2014-04-22 For Android 1.x/2.x/3.x/4.x, Linux kernel 2.6.25 and later. The file downloaded was named AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE.tar.bz2
  2. Install the build tools
    $ sudo yum groupinstall “Development Tools”
  3. Install the kernel headers
    $ sudo yum install kernel-headers
  4. Unpack the Axis kernel driver
    $ tar xfj AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE.tar.bz2
    $ cd AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE
  5. Compile and install the Axis AX88179 kernel module
    $ make
    $ sudo make install
    The kernel module is now compiled and available in the /lib/modules/2.6.32-431.17.1.el6.x86_64/kernel/drivers/net/usb folder.
    $ cd /lib/modules/2.6.32-431.17.1.el6.x86_64/kernel/drivers/net/usb
    $ sudo chmod u+x ax88179_178a.ko
  6. The Axis module is now available on the system but not enabled. The easiest way to test it is to perform a reboot or you can modprobe usbnet and insmod ax88179_178a.ko kernel module

Network adapter eth0 is now available and ready to be used.

Tags: , , , ,

Posted by

26 May 2013 Remux MTS (AVCHD) files to MKV using mkvmerge in linux

This post came to life because I did not manager to get my newly aquired Raspberry Pi 512MB version revision 2 running raspbmc to play my MTS files without freeze/rebuffering. One solution was to overclock the Arm processor to 1000MHz, but then I struggled to find a way to get the CPU temperature down. The other solution was to convert or remux the MTS file to Matroska format using a Ubuntu linux server using the mkvmerge command.

From a console window install the required package to perform the remux operation
$ sudo apt-get install mkvtoolnix

Then I did a quick test to remux the MTS file to MKV
$ mkvmerge -o OutputFile.MKV InputFile.MTS
mkvmerge v6.1.0 ('Old Devil') built on Mar 4 2013 20:24:55
'InputFile.MTS': Using the demultiplexer for the format 'MPEG transport stream'.
'InputFile.MTS' track 0: Using the output module for the format 'AVC/h.264'.
'InputFile.MTS' track 1: Using the output module for the format 'AC3'.
'InputFile.MTS' track 2: Using the output module for the format 'PGS'.
The file 'OutputFile.MKV' has been opened for writing.
'InputFile.MTS' track 0: Extracted the aspect ratio information from the MPEG-4 layer 10 (AVC) video data and set the display dimensions to 1920/1080.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 19 seconds.

This example remuxed a 339MB MTS file to Matroska in 19 seconds and is a quick and easy fix to perform on my video collection.
Muxing a 1.3GB MTS file took 2 minutes 9 seconds. The resulting MKV file is a little bit smaller than the original MTS file.

I have not experienced any playback problems using raspbmc connected to my Sony Bravidia KDL-40EX711 LED TV even though some people complain that older devices cannot play files remuxed using newer version of mkvmerge because of “Header compression” is enabled by default, ref

Playback of the MKV file is now without any freeze or rebuffering and the Raspberry Pi is now working as a power efficient media PC directly connected to my TV using a HDMI cable and using a external power suppply.

Playback has been tested on Raspbmc running XBMC 12.2 Git:20130502-32b1a5e using “System Performace Profile – Normal” without any advanced overclocking options enabled.

As a note .MTS files are AVCHD coded and can also end with the .M2TS file suffix.

Tags: , , , , , , , , , , ,

Posted by

17 May 2013 Howto enter VMware ESXi license key after it has expired

vmware-esxi-5-license-has-expired“Disable VMware ESX” is the warning message that is displayed when you open your VMware vSphere Client after the 60-day evaluation period has expired without typing in a new license key for your free VMware vSphere Hypervisor 5 install. You cannot type in the license key in the vSphere Client after the evaluation period has expired. If you do not type in the key before it expires you will not be able to power on VMs after they have been powered down.

This is a short howto describing how you can type in the license key for you free VMware Hypervisor after it has expired, since you cannot use the vSphere Client.
This requires that you have enabled the SSH service on your host before it expired and you can access it using your favourite SSH client to your ESXi host.
The file should look something like this if you have not entered any license information 00000-00000-00000-00000-00000.
This key should be replaced with the key you have gotten from VMware when you downloaded the installer file.

This is a step by step description of how you can update the license file

  1. Start a SSH session to your ESXi host using your favourite SSH client like Putty
  2. Log in with the username root (unless you have changed it to something else)
  3. Open the file /etc/vmware/vmware.lic using the vi editor
    ~# vi /etc/vmware/vmware.lic
  4. Delete the old license key with the dd command
  5. Insert a new license key by with the i command

    The key above is just an example and is not a valid key. Replace the key used above with the evaluation license key you received from VMware.

  6. Save the file using the write command w
  7. Now you can open a new vSphere Client window and see if the license warning windows appears again. If it does not, then you have successfully updated the license key. If not, then you need to check if the license key is typed in correctly.

All this can be done without a reboot of the ESXi host.

Tags: , , , , , , ,

Posted by

13 Nov 2012 Script to delete files listed in a file

This is a short one liner bash script to delete files in a file.
The script also handles filenames with space in them.

$ while read file; do rm "$file"; done < filename.txt

To generate a filename.txt file by searching for a specific pattern you can use the following command

$ find / -type f -name "filname*" > filename.txt

You should verify the files you are about to delete before you invoke this script!

Tags: ,

Posted by