Category: Linux


Like most others, if you tried installing Windows 8.1 or Windows Server 2012 R2 64Bit in Oracle Virtualbox, you must have encountered the following error.

Win_VM_Error

This error occurs when the instruction CMPXCHG16B is disabled in your CPU. It is so by default in Oracle Virtualbox. The simple solution is to enable this instruction & then you should not get the error on initializing the Windows 8.1/Windows 2012 virtual machine.

To do this on your linux system first issue the following command,

$VBoxManage list vms

The above command will list all the virtual machines present. Be sure to run this command as a normal user. You won’t see a list of vm’s if the command is executed as a root. The VboxManage command is case-sensitive, keep that in mind. So make sure you use it properly as VboxManage.

Once done, copy down the vms name. In my case “Windows”.

[shuttertux@localhost ~]$ VBoxManage list vms

“Windows” {6e60906c-d449-4142-ba17-bb0424d3da3d}

Now to enable the CMPXCHG16B CPU instruction one needs to execute,

$VBoxManage setextradata “Windows” VBoxInternal/CPUM/CMPXCHG16B 1

The value ‘1’ at the end of the command enables the desired CPU instructions. Now you can go ahead successfully and install Windows 8.1/Windows 2012 64Bit in Oracle VirtualBox.

The wikipedia explains the following on CMPXCHG16B CPU instructions:

Early AMD64 processors lacked the CMPXCHG16B instruction, which is an extension of the CMPXCHG8B instruction present on most post-80486 processors. Similar to CMPXCHG8B,CMPXCHG16B allows for atomic operations on octal words. This is useful for parallel algorithms that use compare and swap on data larger than the size of a pointer, common in lock-free and wait-free algorithms. Without CMPXCHG16B one must use workarounds, such as a critical section or alternative lock-free approaches. This also prevents 64-bit Windows from having a user-mode address space larger than 8 terabytes. The 64-bit version of Windows 8.1 requires this feature.

As we saw earlier, Rsync can be a nifty tool to transfer data across the systems in an organization while taking backup. However, its prompt for password during transfers can irritate everytime you transfer. Even having a cron-job for automatic backups using rsync will mean you having to enter password which defeats the purpose of cron-job. Here I will show you how you can use rsync over ssh to sync data across computers without password. That’s right, password less transfers with rsync.

First on your server(IP:192.168.100.101) create a ssh key using ssh-keygen,

#ssh-keygen

It will ask you for a location, hit enter for the default location. Next you’ll be prompted for a pass-phrase, hit enter & confirm it with another enter. We want the pass-phrase to be blank. You’ll get the following.

Generating public/private rsa key pair.
Enter file in which to save the key (root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

Next we will need to copy the public key to the remote system(192.168.100.102). On the local system(192.168.100.101) enter the following;

#ssh-copy-id -i /root/.ssh/id_rsa.pub 192.168.100.102

You’ll be prompted for password for the remote system. Once you enter it, the key will be copied on the remote host. Now you can use rsync to connect & transfer to the remote system(192.168.100.102) without any password prompt.

#rsync -avz -e ssh /root/Desktop/test root@192.168.100.102:/root/Desktop

Now the transfer will be commenced without any prompt for password. You can transfer your public key to various other systems on your network to facilitate a password-less rsync over ssh.

At times, we need to combine multiple pdf file’s into one pdf file. However, instead of running to get a dedicated program to join the multiple pdf’s, here is a simple & fast way to do so.

Convert command can be used to merge multiple pdf’s into one. Convert command is a subset of the ‘ImageMagick’ suite of tools. So you’ll need to install it first from your distribution’s repository. On a Fedora/Red Hat system it can be done by;

#yum install ImageMagick

Once installed, simply open a terminal & navigate to the directory where you have the multiple pdf’s which need to be merged into one pdf. Once there issue;

$convert file1.pdf file2.pdf output.pdf

I created a calendar for the coming year & in all had 12 pdf’s for each month which I wanted to be merged into one. Hence, I issued the following;

$convert Jan.pdf Feb.pdf March.pdf April.pdf May.pdf June.pdf July.pdf August.pdf September.pdf October.pdf November.pdf December.pdf calendar.pdf

Here my output pdf file will be named ‘calendar.pdf’. Once you execute the above command, it will take sometime(depending on how big or small & how many pdf’s are) and once done it will return you to the prompt. Now your merged pdf file will be saved in the same folder by the name you gave in the command above.

That’s it! It’s so easy.

RSync is useful for fast incremental transfer of data. It is very popular across business organizations as it comes with some pretty handy features which sets it apart from the rest. Some of them are;

1) Security – One can transmit the data using the ssh tunneling which provides encryption & safety from eavesdroppers.

2) Speed – Since rsync transmits only the data which has changed over subsequent time, the transmission is fast as only the bits which are changed are transferred & not the entire file. This can mean tremendous saving of time. It also comes with options which lets you fine-tune the transfer which can further improve the transfer speed.

3) Less Bandwidth Intensive – Rsync uses compression & decompression algorithms at the sending & receiving end respectively. This not only speeds up the transfer but also saves the bandwidth.

Continue reading

Install Cisco Packet Tracer under Linux

Cisco Packet Tracer can be a very useful tool for learning about networking without needing to spend tons of money(infact, none). The simulator allows you to create a networking topology & then carry on your configurations & changes before they can be implemented in the real world networking environment. This is critical as you get to learn from any mistakes in simulation thus not needing your network to act as a guinea pig. Here, I’ll show you how you can install the Cisco Packet Tracer under your linux system. I would be installing it on Fedora 18.

Cisco Packet Tracer Linux

Continue reading

Follow

Get every new post delivered to your Inbox.

Join 82 other followers

%d bloggers like this: