blog.plee.me About software, technology and random things

8Jun/090

How To Migrate Your Live Windows System To VirtualBox

Hey!

Ever regret that Sun didn't include something like a migration assistant for your live Windows system in VirtualBox?

My method concentrates on these basic steps:

  • Create a backup of your whole system partition
  • Create a new VirtualBox Hard Disk
  • Install Windows onto the VirtualBox Hard Disk to create a function MBR (Master Boot Record)
  • Apply the backup onto your VirtualBox Hard Disk

Done!

What you need:

Process:

    1. Start Acronis TrueImage and create a backup of your whole system partition. For version 2009 doesn't mean System State but My Computer => Disk 1 => C:. Leave Back up sector-by-sector unchecked. Adjust the other settings to your liking and start the backup process.
    2. Go to Tools => Create Bootable Rescue Media and create the image as an ISO file.
    3. Use your File-to-ISO converter or burning software to convert your .tbi backup file to an ISO that you will be able to mount it as a CD/DVD later on. (Reason being that I had problems selecting the right partition to be replaced by the backup when I had two partitions mounted to the virtual machine - the other one included the backup file. Also you won't be able to install the Guest Additions, so you can't mount folders over the VirtualBox shared folders.)
    4. Start VirtualBox and create a new Machine. Choose your current OS and name it as you like.
    5. During the process create a new Boot Hard Disk and give it the same size as your current system partition (maybe less if you know the size will be enough).
    6. Adjust the settings of your new machine and start it.
    7. Mount the Windows installation disc and install Windows. This is so that a proper MBR (Master Boot Record) is created because we will need one in order to boot from the final system.
    8. After the Windows installation (as soon as you see the Windows Start Menu and stuff), mount the Acronis Bootable Rescue Media ISO as a CD/DVD and boot from it.
    9. Select Acronis True Image Home (Full Version) and you'll see the TrueImage program like you did in Windows.
    10. Dismount the current CD/DVD image.
    11. Mount your the ISO with your backup file.
    12. Click on Manage and Restore => Browse for backup... and open the CD/DVD Drive which should have the backup image file right there. If it doesn't, try unmounting and remounting it again.
    13. Right-click on the backup in the list and select Restore.
    14. Select the hard disk (partition) you just created and continue. Make sure that the Restore MBR (Master Boot Recover) / Track 0 checkbox is unchecked.
    15. Let it run through.
    16. Now reboot your machine.
    17. Congratulations! You should have a working copy of your live system in VirtualBox!

      I guess there are a couple of kinks here and there because I didn't actually do it like that (I installed Windows on the virtual machine before I attempted to restore via Acronis Bootable Rescue Media ... yeah, silly me 😀 ) and it was about 3 days ago, so I'm writing off the top of my head.

      Please give me feedback if it worked! (And also if it didn't!) 🙂

      In the case of Windows XP (and probably Vista and 7) because of the major change of hardware (actual drivers replaced by virtual drivers) you will be required to re-activate your Windows copy. XP gives you a maximum of 3 days for that.

      Just thought I'd mention it for clarity's sake 🙂

      Good luck and have fun!

      8Jun/090

      Compiling PHP 5 with IMAP support on SuSE / openSUSE Linux

      If you get the following configure error:

      configure: error: utf8_mime2text() has old signature, but U8T_CANONICAL
      is present. This should not happen. Check config.log for additional
      information.

      It's probably because you're missing either the libc-client-devel package or imap-lib and imap-devel. Fire up yast and install those. You should be good to go now 🙂

      (I have openSUSE 11.0 and it doesn't have the libc-client-devel package, but I read about it on another page and thought I'd add it, just to be safe 🙂 )

      8Jun/090

      Asus P5B and the broken JMicron SATA/PATA controller

      Hey there!

      Yesterday, while I was trying out my new hard drive, I noticed that it apparently took ages to defragment. Not only that, but it also took away a major amount of resources. Funnily enough, the CPU usage didn't show up at all in the task manager (I'm using Windows XP x64 Professional). However, the mouse cursor was lagging behind and whenever I played audio or video - be it a YouTube video or an actual video in VLC - it lagged there as well.

      So what could it be?

      (Skip to the bottom to see the conclusion 🙂 )

      My first guess was that there was a hardware failure. Probably with the new hard drive because my others all worked, right? Technically it was unlike for my new hard drive to be damaged though as I formatted it the day before (with TrueCrypt) and it showed around 90 MB/s of formatting speed.

      After a series of rebooting and benchmarking via HD Tune (also in Windows Safe Mode) I realized that at the start (basically the first time after a bootup) the hard drive worked fine with an average of about a 100 MB/s transfer rate. However, at around 60%+ it sunk drastically to a minimum of 1.4 and a maximum of 1.5 MB/s. It stayed there till the end of the benchmark and for every following one (until you rebooted).

      Next thing I did was to change the BIOS settings for the JMicron SATA/PATA Controller from Enabled / IDE to Enabled / AHCI. After the Windows bootup it recognized a new Primary IDE channel, Secondary IDE channel, Standard Dual Channel PCI IDE Controller and one of my two optical drives (why only one? Don't ask me :D). The hard drive didn't show up at all - neither in the Disk Management nor in the Device Manager. A change from Enabled / AHCI to Enabled / RAID (with "no raid" in the JMicron settings) did the same thing: recognition of new channels and no new hard drive.

      The first run with an HDD on the JMicron controller.

      Every other run following the first one with an HDD on the JMicron controller.

      For reference - this is what a healthy drive usually looks like:

      This is what a healthy HDD usually looks like in HD Tune.

      When I looked that the Device Manager I found that there were two SATA controllers in the IDE ATA/ATAPI controllers category. One was the Intel(R) ICH8 2 port Serial ATA Storage Controller - 2825 and the other one was the Intel(R) ICH8 4 port Serial ATA Storage Controller - 2820. My main / old hard drives are all hooked to the 4 SATA ports on the lower half of the P5B, some of them using an eSATA to SATA cable. So that had to be the 4 port SATA controller, which worked fine. Thus, the 2 port controller was the one controlling the eSATA port in the back pane - and making trouble.

      The moral of the story is that obviously the JMicron SATA/PATA Controller doesn't do his job on the ASUS P5B at all. So, in case you're looking for more SATA ports, you're going to have to buy a new SATA controller.

      I myself will be settling with SATA and eSATA for my biggest drives and using USB for my smallest one.

      Cheers 🙂