Partition Error and Fail to Install GRUB on Windows 8 Hard Disk


I have install Windows 8 Professional on my hard disk. It works fine until it is moved to another computer for Linux.

At first, I use Clonezilla to do drive-to-drive copy. It fails to copy grub to destination disk. Even I use GPartrd to delete all existing partition, it’s the same.

What’s Wrong with Windows 8 Hard Disk

A Q&A on superuser caught my eye: GParted errors on MBR Disk, Claims it’s GPT. (It’s mistaken, but why?). It brings me more new terms like GUID Partition Table (GPT), Master boot record(MBR)Unified Extensible Firmware Interface (UEFI) and etc. It is all because this hard disk used to be part of an UEFI computer and install GPT by Windows 8.

Rod explain very clearly in his reply to GParted errors on MBR Disk, Claims it’s GPT. (It’s mistaken, but why?)

If a GPT disk is repartitioned by a GPT-unaware utility, that utility is likely to replace just sector 0 (the MBR), leaving most of the GPT data intact. Technically, the disk is then an MBR disk; however, some partitioning tools, including many Linux tools that are based on libparted (including GParted) become confused by this. They may show the disk as being completely blank or show the old GPT partitions rather than the new MBR partitions. This is a bug in libparted, but it’s triggered by some inconsistent data on the disk.

The solution is to wipe the old GPT data. This can be done various ways, but the simplest is probably to use FixParts, which is designed for this and some other partition table repair tasks. Alternatively, you could use dd to wipe sector 1 (numbered from 0) and the final sector on the disk; that’s where the GPT signatures that are confusing libparted reside.

Fix the GPT Error

I read Wiping Out Old GPT Data by Rod Smith and decide to fix the GPT and MBR with gdisk: Zap GPT Data in Expert mode. Now, I fix my MBR and empty GPT. But Clonezilla report there is no GRUB on destination and refused to copy from source disk, the story doesn’t end up here…

Zap GPT Data in Expert Mode by su
Zap GPT Data in Expert Mode by su

Manually Install GRUB

I follow the instruction in The Boot Loader GRUB to install GRUB manually but fail. Then I use the OpenSuSE Installation program to upgrade my existing destination disk and expect it to install GRUB for me. It finish the installation but fails to install GRUB. Exactly the same like the Thread: Install issue(s) openSUSE 12.3 / Windows 8 / ASUS (AMD) CM1855 and Linux cannot alter partition table of main hard disk of my laptop described.

Lucky me, caf4926‘s Re-install Grub2 from DVD Rescue helps me to install GRUB by follow commands:

mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
chroot /mnt
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda
'exit'

reboot

Yes, it works. I may see GRUB and boot my Linux. But something strange, it took me more than 2 minute to see the desktop which never took so long before.

Fresh Re-install

Okay, I give up. I preferred to do a clean install. OpenSuSE installation warns me that it may use the partition table but cannot modify them. Screw you! I still delete and create all the partitions and finish the installation without any problem. Yes, including GRUB.

Now, I may see GRUB at boot time and launch my Linux desktop as fast as before.

Final Thoughts

I never expect to take so much time installing Linux on a Windows 8 hard disk. It did help me to learn more about the new features on Windows 8.I wish Linux could improve and handle GPT better in the future.

Reference

  1. Clonezilla
  2. Gnome Partition Editor
  3. superuser: GParted errors on MBR Disk, Claims it’s GPT. (It’s mistaken, but why?)
  4. Wiki: GUID Partition Table
  5. Wiki: Unified Extensible Firmware Interface
  6. Wiki: Master boot record
  7. Rod Smith: Wiping Out Old GPT Data
  8. OpenSuSE: Chapter 9. The Boot Loader GRUB
  9. OpenSuSE: Thread: Install issue(s) openSUSE 12.3 / Windows 8 / ASUS (AMD) CM1855
  10. superuser: Linux cannot alter partition table of main hard disk of my laptop
  11. OpenSuSE: Re-install Grub2 from DVD Rescue

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s