Moving an OS to another disk and still have it boot with Linux

For the longest time, I’ve had an 80 GB HDD running my Windows partition (dual-boot setup with Ubuntu on a SSD), but now I’ve finally upgraded the Windows partition to an SSD as well. I looked into how to clone my Windows partition onto the SSD, such that I can still boot the disk.

I already have Ubuntu as my main OS, so copying the disk was easy using dd, which allows copying all the contents of one disk to another. This works well when the new hard drive is greater than or the same size as the current hard drive (I upgraded from a 80GB HDD to a 128GB SSD).

First I run this to see which disk I am copying from and to

fdisk -l

Then I run dd. If I am copying from /dev/sda to /dev/sda, then it’s:

dd if=/dev/sda of=/dev/sdb

But sometimes the disks don’t have the same size, so I used gparted to move/resize the partitions to make use of the extra space on the new disk. gparted complained that it might make my disk no bootable, but the disk was still bootable for me nonetheless. I didn’t even have to mess with any grub bootloader settings either. I simply unplugged the old disk, and left the new disk plugged in and booted into the new disk no problem.

Running League of Legends in PlayOnLinux (Ubuntu 14.04)

There are various guides floating around on the Internet for running League of Legends on Linux, and no single guide worked for me, but after piecing the information together from various places, I managed to get it to work on my system.

My computer specifications:

  • Intel Core i5-4570
  • 16 GB Memory
  • Radeon HD 5770

I followed the instructions here, with these changes:

  • Using video driver “fglrx-updates” (the tutorial talks about NVIDIA cards)
  • Did not install TuxLoL
  • Did not do anything regarding the “Maestro error” since it only applies to Optimus Notebook users
  • Did not follow step 6 because I did not run into the problem for big item icon text for the item shop
  • EDIT: Thanks to Ingvar’s comment, the installation progress for the game can be viewed like so: open terminal (Ctrl+Alt+T) and execute:
    # tail -f ~/.PlayOnLinux/wineprefix/LeagueOfLegends/drive_c/Riot\ Games/League\ of\ Legends/Logs/Patcher\ Logs/*.log

There are also other steps that I had to do, which I read from here:

  • Click configure for the “League of Legends” entry in “PlayOnLinux” and find the “Display” tab and then choose the following options:
    • Direct Draw Renderer – gdi
    • Video memory size – 4096 (or something else depending on graphics card)
    • Offscreen rendering mode – fbo\0
    • Everything else on default
  • Create a file called “game.cfg” in the directory “/home/your-username-here/PlayOnLinux’s virtual drives/LeagueOfLegends/drive_c/Riot Games/League of Legends/Config”. Below is what I have in my “game.cfg”:


Running TurboTax 2014 in PlayOnLinux

This guide describes how to run TurboTax 2014 in PlayOnLinux.  The PlayOnLinux (in combination with WINE) software allows users to install Windows-based software.

CAVEAT: NETFILE did not work for me.  I had to submit my taxes through an installation done on Windows

  1. Install PlayOnLinux and then run it (e.g. starting it through the Terminal)
sudo apt-get install playonlinux
  1. Click “Tools” > “Manage wine versions”
  2. Choose 1.7.27 under “Available Wine versions” and then click the right arrow “>”
  3. Go through the steps in the installer and let it finish
  4. Back in the PlayOnLinux main screen, click “Install” in the menu, and then click “Install a non-listed program” on the bottom left
  5. Choose “Use another version of Wine”, when asked, and then choose 1.7.27
  6. Choose “Install a program in a new virtual drive”, when asked
  7. Choose “32 bits windows installation”, when asked
  8. Find the location of setup.exe for the TurboTax installer (I copied the files off of the disc to a place on my hard drive)
  9. Ignore the message “Error in FS_Check” if it appears
  10. Let the install complete, but do not launch TurboTax right away
  11. Choose “tt2014.exe”, if asked to create a shortcut
  12. Back in the PlayOnLinux main screen, select entry for TurboTax and click “Configure” in the menu
  13. Make sure the “Wine version” is set to 1.7.27
  14. Under “Install components”, install the following in this order (some of these may not be required, but I don’t know which since this is the configuration that worked for me):
    • vcrun2012
    • Microsoft Core Fonts
    • msvc100
    • RegisterFonts
    • vcrun2010
    • dotnet40
    • d3dx9
    • mono28
    • Internet Explorer 8 (click “Restart” in the installer)
    • crypt32
  15. Back in the PlayOnLinux main screen, clicking “Run” for TurboTax 2014 should now work!

This is what worked for me, so hopefully this will work for others.

Deleted IME’s still appear in the list even though they have been removed in Ubuntu 14.04

I had this weird problem when my Japanese and Chinese IME stayed in my IME list even though I had removed them.  It was driving me nuts, but it turns out that they can be disabled through the dconf-editor

First, run:

sudo apt-get install dconf-editor

Navigate to:


Bold options are options that have been modified.  The interesting one is the row labeled “sources”.  Clear the entries of the IME’s that should not appear in the list and that should remove the IME’s that shouldn’t be appearing.

Running LINE Messenger in Ubuntu 14.04

LINE is a messaging program kind of like WhatsApp, but it has a desktop client.  However, this desktop client only runs on Windows.  On Linux, it has to run under Wine, which allows running Windows programs (some) inside the Linux environment.  Caveat: sending stickers does not appear to work.

UPDATE 7. JULY 2015: Since this post, my version of LINE has been updated to, and it looks like stickers work now!

UPDATE 31. JULY 2016: Looks like in July 2015, LINE released a Chrome app.  Users of Chrome can just use that extension instead of using this method: Link

Running LINE in Ubuntu 14.04

  1. Install Wine
sudo apt-get install wine
  1. Install VC++ 2008 Redistributable
winetricks vcrun2008
  1. Download and install LINE for Windows

Without installing the VC++ 2008 Redistributable, LINE would intermittently crash (even though it was able to start correctly).  This worked on my Ubuntu 14.04 x64 system.

LINE Version:
Wine Version: 1.6.2

Disabling Mouse Acceleration in Ubuntu

I’ve been quite accustomed to disabling mouse acceleration on my Windows machine (thanks to playing massive amounts of Counter-Strike back in the day), but now that I’ve started to use Linux a bit more, I’ve found that disabling mouse acceleration was not as easy as in Windows.


I’ve managed to produce a script to disable mouse acceleration (works for me on Ubuntu 14.04).  However, this script needs to be run every time the computer boots because the settings don’t stay.  Here is the script:

#wait for the desktop to settle
sleep 5

#gets the hardware id's of all mice plugged into the system
hardwareIds=$(xinput | grep -i mouse | awk '{print substr($(NF-3),4)}')

#turn off mouse acceleration
for i in $hardwareIds
xinput set-prop ${i} 'Device Accel Profile' -1
xinput set-prop ${i} 'Device Accel Velocity Scaling' 1


The script works by extracting the hardware id’s of the mice that are connected to the system and then applying properties to them that disable mouse acceleration for that device.  The extraction of the mouse hardware id’s are done with this:

#gets the hardware id's of all mice plugged into the system
hardwareIds=$(xinput | grep -i mouse | awk '{print substr($(NF-3),4)}')

Calling xinput in the Terminal will list all the connected input devices, which is grepped (case insensitively) for the word “mouse”, which gives something like this on my machine:

⎜ ↳ Logitech G500s Laser Gaming Mouse id=14 [slave pointer (2)] ⎜ ↳ Logitech G500s Laser Gaming Mouse id=15 [slave pointer (2)]

The call to awk extracts the hardware id from those two lines (14, 15 in the above case) and stores them in an array that is iterated through when setting the mouse properties.


This is the website that showed me how to disable mouse acceleration to begin with:

My Brief Experience with iPodLinux and Rockbox

Sometime in 2005 I saw a video of someone playing Half-Life on an iPod and I thought it was kind of cool that it was possible.  I found out that the person was running Linux on their iPod with id Software’s Doom installed (a version ported to the iPod).  I also found out that Linux on an iPod comes in two flavors: iPodLinux and Rockbox.  I decided to try both.  I started with iPodLinux.

iPod Linux

The installation of iPodLinux requires the user to download the source code from their Subversion Repository and then compile it.  There were binaries available for download, but those were two years out of date.  Downloading the source code required the installation of an SVN client, and compiling the source code required the installation of Qt with MinGW.  I ran into a slight snag here as the installation guide on their site neglected to tell me that Qt would not set the system environment variables needed in order for me to follow the instructions in the guide as is.  Typing “qmake” kept giving me “qmake is not recognized” error in the Windows command line.  Once I set up the environment variables, I was able to compile the source code.

After compiling the code, I went onto installation.  Whenever I tried to install iPodLinux, the installer would close while trying to partition my iPod.  As a result, my iPod was left half partitioned with no OS.  I had to restore my iPod with iTunes every time this happened.  I figured it was because I was using Windows 7 Pro x64.  Even after setting compatibility options and running as administrator, the installer wouldn’t work.  I then repeated everything I had done so far on a Windows XP Pro machine and was finally able to install iPodLinux.

The next step was to boot the OS for the first time.  While loading the different modules, the OS would complain about how some modules were didn’t exist or my iPod had run out of memory.  Then the iPod later got stuck while initializing some module called “MPDc”.  So what I tried to do next was to install iPodLinux without this module.  Stupidly enough, the installer refused to let me uncheck any of the options while clearly stating that I could uncheck certain ones if I didn’t want them.  What I don’t get is why I’m getting all these errors with my iPod when the developers state that my 5th gen iPod Video is supported.  Maybe I’m missing something?

Then I found out about the ZeroSlackr Project, which is supposed to provide a “simple, coherent, easy-to-use and newbie friendly method of installing iPodLinux on iPods”.  After downloading, first thing I did was look at the readme’s to see how to install it.  I opened up the readme and it gave me the worst formatting I’d ever seen in a text file.  There were no line breaks.  Rather than searching through this wall of text I just looked up how to install it on Google.  I opened the batch file included with the install files and it gave me a message saying installation successful and that I could now boot ZeroSlackr from my iPod.  I took out the iPod and booted it up just to see no option for ZeroSlackr in the Bootloader.  Maybe I did something wrong.

I also tried a program called iPod Manager 2.0.5, but it didn’t even open no matter how many times I tried to open it.

Afterward, I figure I could use a program to see the ext2 partition that iPodLinux makes and delete the modules manually from there.  Browsing the iPodLinux forums and Google searches led me to a program called LTOOLS.  It was supposedly able to let me modify the ext2 partition.  No luck with that either.  I kept getting stopped by the “Windows could not find file specified” error whenever  I tried to look in the ext2 partition.  Next program I tried was Ext2 IFS for Windows.  I’ve used this program successfully in the past to grab files from my Ubuntu partition.  For some reason this program didn’t work either.  Luckily using my Ubuntu 8.04 Live CD to open the ext2 partition on the iPod worked for me.  The ext2 and the FAT32 partition appeared right away in Ubuntu and all I had to do was do a “gksudo nautilus” to delete the files I didn’t want.

After removing the problematic modules, I finally loaded up the OS.  However, the moment I selected any menu option, the iPod would freeze.  I waited about 30 seconds with no response.  This problem is probably quite beyond me so I stopped here.


The thing I liked the most out of Rockbox is that the installation of it worked, without any hassles.  All I did was download it, double click, follow the instructions and then bam it worked.  It also installs without requiring you to partition your iPod to ext2.  As a result, I could access the Rockbox files easily within Windows.  I loaded up iTunes and it was still able to sync my stuff onto it.

Once I synced my music onto the iPod again, I tried playing music with it.  Without looking at the manual, I could not use my library as one huge playlist.  I find that if using the interface on an mp3 player needs a manual for people to know whats going on, its probably too complex.  Take the iPod interface for example.  It is very intuitive.  There was virtually no learning curve in figuring out how to use it.

Another thing that really annoyed me on Rockbox is that even after setting the language options, I still was not able to see Chinese ID3 tags on songs.  How am I supposed to be able to choose a song if I can’t see the title?

What I did like about Rockbox are the apps.  I know iPodLinux has them too, but seeing that I never got past the freezing problem, I couldn’t try them out.  My favorite was RockDoom.  Being able to play a classic game like that on an iPod made me feel a bit nostalgic.


iPodLinux needs a little bit more work in making installation of the OS easier.  To be specific, their documentation needs to add solutions for problems like the one I mentioned before.  It should also let people uncheck things in the installer.  And most important of all, it should work without freezing up all the time.  If all 5th gen iPod Videos are standard, then if I have a problem on mine, wouldn’t that mean everyone else’s 5G iPod will have problems with it?

Really, I liked everything about Rockbox except its interface and its lack of support for seeing Chinese characters.  I was even able to play a Counter-Strike mod for RockDoom.  I thought that was fantastic.

There are probably also some fixes out there that I don’t know about that can solve my problems, but seeing that I only used iPodLinux and Rockbox so briefly, I probably never came across those fixes.  I also feel that the sorts of problems I had should not need fixes, but rather they shouldn’t occur at all.

Qt Environment Variables

A long time ago I had come across a project that involved porting Linux on the iPod called iPodLinux (read more at the link).  It basically adds additional functionality than that of regular iPods such as the use of third party apps such as gameboy and NES emulators.  Seeing that I like to mess with these things, I decided to try it out.  According to their website,

iPodLinux currently works on all iPod generations with the exception of the 2nd/3rd/4th generation iPod nano, 6th generation iPod classic, all iPod shuffles and the iPod Touch. Donations always help when it comes to supporting new hardware. Progress can be tracked on the Project Status.

The installation of iPodLinux is somewhat tedious.  They recommend that you download the source code and compile them yourself (instructions on the site), which is what I’m doing right now.  Compiling the source code requires a program called Qt.  I downloaded the Qt4 + MinGW installer to compile the code.  However, when trying to compile the code using “qmake”, Windows did not let me run the program.

Apparently the source of the problem is that my environment variables were not set properly.

The environment variables settings page can be found in Control Panel > System > Advanced System Settings > Environment Variables.  Click the New… button.

Here are the required environment variables:

Variable Name: PATH (should exist already)
Variable Value: C:MinGWbin and C:Qt4.x.xbin

Variable Name: QTDIR
Variable Value: C:Qt4.x.x (whatever your version is)

Variable Name: QMAKESPEC
Variable Value: win32-g++

Ubuntu Network Configuration Using Command Line


The basics for any network based on *nix hosts is the Transport Control Protocol/ Internet Protocol (TCP/IP) combination of three protocols. This combination consists of the Internet Protocol (IP),Transport Control Protocol (TCP), and Universal Datagram Protocol (UDP).

By Default most of the users configure their network card during the installation of Ubuntu. You can however, use the ifconfig command at the shell prompt or Ubuntu’s graphical network configuration tools, such as network-admin, to edit your system’s network device information or to add or remove network devices on your system

Configure Network Interface Using Command-Line
You can configure a network interface from the command line using the networking utilities. You configure your network client hosts with the command line by using commands to change your current settings or by editing a number of system files.

Configuring DHCP address for your network card
If you want to configure DHCP address you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card

sudo vi /etc/network/interfaces

# The primary network interface – use DHCP to find our address
auto eth0
iface eth0 inet dhcp

Configuring Static IP address for your network card
If you want to configure Static IP address you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card

sudo vi /etc/network/interfaces

# The primary network interface
auto eth0
iface eth0 inet static

After entering all the details you need to restart networking services using the following command

sudo /etc/init.d/networking restart

Setting up Second IP address or Virtual IP address in Ubuntu
If you are a server system administrator or normal user some time you need to assign a second ipaddress to your Ubuntu machine.For this you need to edit the /etc/network/interfaces file and you need to add the following syntax.Below one is the only example you need to chnage according to your ip address settings

sudo vi /etc/network/interfaces

auto eth0:1
iface eth0:1 inet static
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x

You need to enter all the details like address,netmask,network,broadcast and gateways values after entering all the values save this file and you need to restart networking services in debian using the following command to take effect of our new ipaddress.
After entering all the details you need to restart networking services using the following command

sudo /etc/init.d/networking restart

Setting your ubuntu stytem hostname
Setting up your hostname upon a ubuntu installation is very straightforward. You can directly query, or set, the hostname with the hostname command.
As an user you can see your current hostname with

sudo /bin/hostname

To set the hostname directly you can become root and run

sudo /bin/hostname newname

When your system boots it will automatically read the hostname from the file /etc/hostname
If you want to know more about how to setup host name check here

Setting up DNS
When it comes to DNS setup Ubuntu doesn’t differ from other distributions. You can add hostname and IP addresses to the file /etc/hosts for static lookups.
To cause your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.
For example a machine which should perform lookups from the DNS server at IP address would have a resolv.conf file looking like this

sudo vi /etc/resolv.conf

enter the following details


© 2017 Henry Poon's Blog

Theme by Anders NorénUp ↑