windows

How to Convert a GPT disk layout to a MS-DOS/MBR layout without data loss (and Gigabyte Hybrid EFI)

If you're coming here from Google searching for how to convert a GPT disk layout to MS-DOS/MBR and don't want to read through my (probably boring) story, click here ;)

Adventures with Hybrid EFI

My gaming PC has been long overdue due for a reformat. I naively allocated only 30GB to the Windows partition (and the other 120GB to 3 flavours of Linux) thinking I wouldn't use Windows for much other than Starcraft 2, but a few months back I had the urge to play Battlefield 2 again. Ever since installing and fully patching it disk space has been running pretty tight. I had to disable sleep, hibernation as well as system restore and still only had 4GB of free space, so my filesystem became fragmented easily. With the release of Windows 8 Customer Preview (download it free here), I figured it was a good time to reformat my disk and reinstall all my OSs from scratch.

I figured while I'm at it, I would make all of the big changes at once and enabled EFI booting on my Gigabyte GA-Z68A-D3H board. Little did I know that when the BIOS says "EFI," it really means Gigabyte's "Hybrid EFI" implementation and not UEFI (although in retrospect, the fact that I made the change in the BIOS should have been enough of a hint, right?). With Hybrid EFI enabled, Windows 7 and Windows 8CP installed perfectly and even created a nice GPT disk layout so reinstalled my games and activated Windows 7. Then I rebooted to play around in Windows 8CP for a bit (I do not like it, btw).

I then tried installing Fedora 16. To my surprise EFI booting failed every time, despite the all of the Fedora 16 installation media being EFI-capable. When attempting to boot from my Fedora 16 Live (x86_64) USB key I just would get a black screen with "........." printed one dot a time and then it would proceed to fall back to the next boot device (Windows boot manager on the hard disk). Upon re-examining my BIOS settings, I was disappointed to find that the setting was actually called "CD/DVD EFI Boot Option" indicating that perhaps USB EFI booting was not supported. Fair enough, I burnt the same F16 image I was using on the USB key to a CD and tried again. The same "........." text appeared.

It was then as I went back to boot Windows 7 that I discovered my attempts to set it as the default OS from Windows 8CP removed my capability of booting Windows 7 somehow. At this point it was 2AM and I was fed up with this stupid Hybrid EFI. I looked for a way to revert to a good old MS-DOS/MBR partition layout. After some Googling I stumbled across Rod Smith's website. He has extensive documentation on EFI booting, including with Gigabyte's implementation of Hybrid EFI. He says that it shares a large amount of code with EFI DUET (tianocore) and although it does work natively with Windows 7, it is not a full UEFI implementation. That would explain the problems I was having with Fedora, then.

The actual GPT to MBR conversion

Through the Rod Smith's guidance and a few dirty tricks, I was successfully able to convert my GPT partition - without data loss or deleting any partitions - and then boot Windows 7 in legacy/MBR mode. In order to do this you'll need your Windows installation media at hand as well as a copy of the Fedora 16 Live media. If you don't have a copy of Fedora 16 Live handy, you can download the Live media ISO (64-bit) from a local mirror here. See the Fedora 16 Installation Guide for details on burning this image to a CD or on creating a bootable USB key.

Keep in mind that at this point I only had 3 partitions and a bunch of unpartitioned space on the disk, so conversion was a rather straightforward process (all GPT partitions mapped directly to primary partitions). Although it is theoretically possible to convert GPT partitions with >4 partitions by defining which ones are to be logical partitions after conversion, I have not tested this.

  1. Boot your Fedora 16 Live media and wait for your session to start. If you're having troubles booting, press Tab at the boot loader screen and try booting with the nomodeset parameter added.
  2. Depending on your graphics card, you'll either be presented with the new Gnome 3 Shell or with the traditional interface. Start a terminal session by putting your mouse in the top right corner of the screen and typing "terminal" in the search (Gnome Shell) or by selecting Applications > System Tools > Terminal (traditional interface)
  3. Install gdisk:
    su -
    yum -y install gdisk
    This may take a few moments.
  4. Make a backup of your current GPT scheme:
    gdisk -b sda-preconvert.gpt /dev/sda
  5. Now we will attempt to convert your GPT disk layout to MS-DOS/MBR. Start gdisk:
    gdisk /dev/sda

    You should be prompted with:
    Command (? for help):
  6. Press r to start recovery/transformation.
  7. Press g to convert GPT to MBR.
  8. Press p to preview the converted MBR partition table.
  9. Make any modification necessary to the partition layout. See Rod Smith's Converting to or from GPT page for more details on this.
  10. When you're happy with the MS-DOS/MBR layout, press w to write changes to the disk.
  11. Shutdown Fedora 16 and boot from the Windows 7 installation media
  12. Enter your language & keyboard layout and then select the option to repair your computer in the bottom left corner.
  13. From the available options, select Startup Repair. Windows will ask for a reboot.
  14. Follow the previous three steps again to boot the Windows 7 installation and run startup repair
  15. Once again, boot the Windows 7 installation media but this time opt to open a command prompt instead of choosing startup repair. Type:
    bootrec /scanos
    bootrec /rebuildbcd
    bootrec /fixmbr
    bootrec /fixboot
  16. Close the command prompt and run Startup Repair one last time.

That's it! You should now have a bootable installation of Windows 7 on a MBR partition layout.

References

Rating: 

Lisa and Jackson get a Sony VAIO

I read an article on Ars Technica about the new Windows advertisement titled "Lisa and Jackson get a Sony VAIO". In the advertisement, Lisa and her 11-year old
son Jackson are looking for a $1500 computer, choosing a PC over a Mac. While I think it's good that Microsoft is recovering from the "Vista blunder" and starting to retaliate against Apple's aggressive ads, it bothers me that these ads are based on absolutely nothing.

After watching the ad (several times), the only valid point I could find was that Apple computer don't include Blu-ray drives (yet). Here are the things Jackson says he needs:

  • Speed
  • A big hard drive
  • A good gaming computer
  • Price under $1500

Hm, so we have one quantifiable objective and 3 other subjective ones.

Jackson starts by takes a look at the Macs and decides they are "a little too small" and immediately moves on. While I'll agree that the MacBook's 13.3" screen is a bit small (and the MacBook Pro is outside his price range), Jackson and his mother completely ignore all specifications! They move on to the PCs where they discover that they can use a remote to control the computer... Of course, no mention that Apple's computers have also this feature (and for years before it became mainstream on PCs, might I add). So in short, because the Sony VIAO Jackson is looking at has a Blu-ray drive and a 16" screen, he's sold. What happened to checking for "speed", "a big hard drive" or a graphics card? A large screen is always nice, but useless for gaming unless you have a decent GPU.

I did a quick search on bestbuy.ca (16" laptops, price range >= $1500) and it found two matching Sony VIAOs, so I took the more expensive one. For $1349.99, the Sony VAIO 16.4" Laptop (VGNFW275DW) (click for specs) features:

  • CPU: 2.26GHz Intel Centrino Core 2 Duo P8400 (3MB Cache, 1066MHz FSB)
  • RAM: 4GB DDR2 800MHz (2GB x 2)
  • Hard drive: 320GB 5400RPM
  • Optical drive: 2X Blu-ray writer, 8X DVD writer
  • Screen: 16.4" (1920 x 1080)
  • Display output: VGA, HDMI (not HDCP compliant)
  • Dedicated GPU: None (Mobile Intel GM45 Express, 1750MB shared system memory)
  • Battery: Lithium-ion (approx. 1-3 hour battery life)
  • Internal microphone amplifier
  • MS Duo & SD card readers

Here's the comparison with Apple's MacBook (click for specs), available for a very similar $1,399.00:

  • CPU: 2.0GHz Intel Centrino Core 2 Duo P7350 (3MB Cache, 1066MHz FSB)
  • RAM: 2GB DDR3 1066MHz (1GB x 2)
  • Hard drive: 160GB 5400RPM
  • Optical drive: 8X DVD writer
  • Screen: 13.3" (1280 x 800 LED backlit)
  • Display output: mini-DisplayPort (VGA, HDMI (HDCP compliant), DVI and dual-DVI available via $34 adapters)
  • Dedicated GPU: None (nVidia GeForce 9400M, 256MB shared system memory)
  • Battery: Lithium-ion (approx. 5 hours)
  • Multitouch trackpad (supports gestures such as three-finger swipe for back/foward and two-finger scrolling)
  • Extremely environmentally friendly: EPEAT Gold rating + more (see spec page for more info)
  • MagSafe power port: Magnetic power latch

I've left out any sort of software comparison since that is very subjective and opinions vary from user to user. As well, I did not list components which were equivalent such as the built-in webcam or wireless 802.11a/b/g/n.

Let's return to Jackson's original criteria:

  • Speed: VAIO wins by a tiny margin... The difference between the P7350 and the P8400 would be negligible during "real world" use.
  • Big hard drive: VAIO wins by a large margin, as Apple tends to be very conservative with their laptop hard drive size.
  • Good gaming computer: In reality, neither computer has a dedicated graphics card which is what really matters for gaming. Ignoring that fact, the MacBook wins by a huge margin. nVidia has reported that their 9400M is up to 5x faster than Intel's GM45 integrated graphics chipset. As always reports like that should be taken with a grain of salt since the "up to" can be a bit misleading. The 9400M, however, is still a much better choice than the GM45 even if it's only 2-3x faster on average and in one or two cases, 5x faster. Finally, we must also consider the RAM size and type. Sure, it makes the VAIO look great if you say "4GB of RAM!" but let's take a look at the bigger picture. The GM45 is using up to 1750MB of system memory, so that means that if you're gaming on the VAIO, you only really have 2GB of RAM... Just like the MacBook. The 9400M used in the new MacBooks only uses 256MB of system memory, which is much smaller than the GM45 - leaving 1.75GB available for system use. Let's not also forget that Apple is using faster RAM than the VAIO; DDR2 800MHz versus the DDR3 1066MHz RAM on the Macbook.

I'm not even going to compare the features outside of Jackson's criteria, I think you can see where this is going ;)

For your viewing pleasure, here's the ad:

Rating: 

File Fragmentation

The 500GB SATA drive in an external enclosure that I use for backups (eSATA/USB 2.0 connectivity) is currently NTFS-formatted for compatibility reasons. I would much prefer to use ext3 or HFS+, but it's pretty hard to get those two working correctly on all operating systems. Thanks to NTFS-3G and (Mac)Fuse, I can reliably access NTFS partitions on Linux, OS X and Windows (of course) so it's become my FS of choice when it comes to compatibility.

Unfortunately, that means that the drive becomes horribly fragmented (and pretty quickly, too). I decided to do a defrag today and found that the NTFS partition was 38% fragmented with 78% file fragmentation... Yuck. I'm going to be really happy when there's a filesystem that I can use on all operating systems that doesn't fragment or choke all the time. Ext2/3 was looking like a pretty good for the "doesn't fragment" part, but the ext2fsx project for OS X seems to have died out and ext2fsd, the only driver I've found for Windows that supports ext3 filesystems with inode sizes > 128, tends to bluescreen a lot. Back to waiting, I guess...

Rating: 

Realtek HD + Mic (aka Intel Integrated Audio on ICH8)

I bought a low-end Logitech headset recently and it works perfectly in Linux but for some reason in Windows the volume was terrible. To make matters worse, it seemed like the drivers don't support mic boost and only the main "capture" slider is changable… The others such as line-in are locked!

After a bit of Googleing I came to relatively simple fix to the problem. If you're looking for a way to bring up your mic's volume, follow these steps:

  1. Update to the lastest drivers available from the Realtek website.
  2. Browse to C:\Program Files\Realtek\Audio\InstallShield and run the program named MicCal.exe
  3. Follow the on-screen instructions and when promted with a slider, bring it down to zero, leave it there for a few seconds. Raise it to 100% and be sure to click Next right away. Continue with the on-screen instructions to finish the wizard.
  4. Open up Realtek HD Sound Effect Manager from the Sounds, Speech & Audio Devices control panel category. You'll notice under the Playback knob on the left, you have a litte wrench/tool icon; click it and make sure Rear Pink In is checked off.
  5. Now, (use the arrows as needed) click the small button labeled .. (the Advanced button) under Rear Pink In. There, hidden, are the options for Mic Boost!

Reference: johnnygoodface's post at techspot forums

Rating: 

Favourite Freeware Apps for Windows

Well, as usual, it's been a while... I'll start by saying happy new year! Better late than never I guess ;)

Anyways, ever since I started developing fwbackups for Windows I've had to use it a lot more often than I used to. Here's a list of some (free) Windows apps I've found to be very useful:

  • iTunes: As much trouble as I've had in the past with Apple products, I've yet to see a better media player that's as easy to use, configure and has equivalent features. The only thing I wish is that I could import with lame directly from iTunes.
    • iTunes Lyrics Importer searches lyricswiki.org for song lyrics and automatically updates your iTunes library
    • iTunes Library Updater (iTLU) makes it a breeze to manage your library when it comes to updating track info, adding new songs or removing the dead links in your library.
  • Notepad++: One of the best text editors I've seen when it comes to programming or just general-purpose text. Of course, nothing beats good old GEdit though ;)
  • MediaCoder is a free audio and video transcoder. It supports almost any format you can imagine, has a nice interface, huge amount of features, and even some presets for various devices like the PSP or iPod.
  • WinSCP for all your secure file copying needs.
  • PuTTY for all your SSH needs.
  • 7-zip: Finally, open bz2 archives and a whole lot more without any annoying "trial" and "upgrade now" messages!

All these programs are free to download & use, and most are open source. Enjoy!

Rating: 

DBA

DBA: Drivers before Activation.

I'll have to remember that next time I install XP, as after installing the Intel and JMicron RAID/SATA controller drivers Windows thought I had "major hardware changes" and required me to reactivate my machine... At which point it said I had reached the maximum number of activations (which really was only one, half an hour before, to be precise) so I had to call Microsoft to get that sorted out.

I wish I could opt out of all this genuine activation.

Rating: