Jump to content

Migrating Windows install to a new drive


wormyrocks
 Share

17 posts in this topic

Recommended Posts

Hi all,


After one too many "Your hard drive is running low on space" messages I decided that it was time to stop running my OS partitions off two halves of the same 128GB SSD. So I bought and installed a separate 1TB hard drive and cloned my Windows 7 install from a 60GB partition of my solid state drive onto the hard drive using Macrium Reflect. I've been able to boot into my Mac or Windows partitions over Clover, but now Clover presents me with two Windows boot drives (I'm expecting this, given that I have two supposedly identical Windows installs on separate drives). However, whichever one I pick boots me into the same Windows install; the one currently located on the SSD partition. The eventual intent is to nuke the Windows partition on the SSD in order to free up space for my OS X install that currently lives on the other half.


I've tried unplugging the solid state drive to try and force the machine to boot from the new hard drive, but unfortunately it has the EFI partition on it and so Clover won't even start with it unplugged. I think I'm probably missing something in Clover settings that would allow me to boot into the remaining hard drive, but I can't for the life of me figure out what it is, especially because the new hard drive should in theory be an exact copy of the partition it's going to replace.


If it matters, the machine had been running Chameleon-based bootloaders since 2012, but a few months after Yosemite came out I installed Clover over it, changing pretty much no settings, and it's been running reasonably smoothly ever since. So I'm running this on top of a pretty much stock Clover install.


I'd appreciate any and all tips that people might be able to offer! I got really into the Hackintosh scene about three years ago, but I haven't kept up with the technology as it's advanced since I've been running a fairly stable machine for quite a while and every time I try to upgrade something I end up breaking it.


Link to comment
Share on other sites

Hi,

 

Unplug the SSD, insert the Windows installation media, and use startup repair on the 1TB drive. 

After that Windows should boot from that drive, and it should be save to insert the SSD again and delete the old Windows installation.

  • Like 1
Link to comment
Share on other sites

The only problem is that Clover is located on the EFI block of the solid state drive. Should I try to boot to the install media straight from the BIOS boot menu? Will that work?

 

Also, I no longer have the install disk. Is there a way for me to do it from within Windows?

Link to comment
Share on other sites

@wormyrocks,

 

When cloning a hard drive, it is best practice to disconnect your original (source) hard drive when booting the new (clone) drive for the first time, otherwise you can run into problems with Windows always wanting to boot the original drive.

 

If your clone drive can't boot by itself, you can do a startup repair with the original Windows 7 install media or a System Repair Disc (procedure to create a SRD in Windows 7 in this guide).

 

Once the new drive can boot by itself (and you have confirmed it has all your important data intact), reconnect the old SSD and delete the original Windows installation.  You can then give first priority in your BIOS to the SSD ---> boot OSX and Windows through Clover.

 

 


Edit: Okay, now that I've verified the install is working, I need to nuke the Windows System partition on my solid state... Disk Utility says it can't do it because the drive is MBR. Is there any way around wiping and restoring the solid-state drive with only one partition? I'm not sure if my OS X install will survive something like that...

 

IMHO, the best utility for partitioning GPT drives is GDisk.

 

Download from sourceforge

Man page

 

First, convert the drive from hybrid MBR/GPT to full GPT by creating a new "protective" MBR, then

 

use the 'd' option to delete the Windows partition from your SSD, then OSX disk utility to extend the Yosemite partition to fill the whole drive.

 

Good Luck!

  • Like 2
Link to comment
Share on other sites

Thank you! I disconnected the drives and performed the startup repair... now when booting to the new drive it tells me that "my copy of Windows is not genuine".

 

Edit: reassigned the drive letter and now the machine acknowledges that it is genuine... a little bit of slowdown but I'm assuming that'll go away eventually. Or I'm just not used to booting from a hard drive.

 

Edit: Okay, now that I've verified the install is working, I need to nuke the Windows System partition on my solid state... Disk Utility says it can't do it because the drive is MBR. Is there any way around wiping and restoring the solid-state drive with only one partition? I'm not sure if my OS X install will survive something like that...

Link to comment
Share on other sites

@wormyrocks,

 

When cloning a hard drive, it is best practice to disconnect your original (source) hard drive when booting the new (clone) drive for the first time, otherwise you can run into problems with Windows always wanting to boot the original drive.

 

If your clone drive can't boot by itself, you can do a startup repair with the original Windows 7 install media or a System Repair Disc (procedure to create a SRD in Windows 7 in this guide).

 

Once the new drive can boot by itself (and you have confirmed it has all your important data intact), reconnect the old SSD and delete the original Windows installation.  You can then give first priority in your BIOS to the SSD ---> boot OSX and Windows through Clover.

 

 

 

IMHO, the best utility for partitioning GPT drives is GDisk.

 

Download from sourceforge

Man page

 

First, convert the drive from hybrid MBR/GPT to full GPT by creating a new "protective" MBR, then

 

use the 'd' option to delete the Windows partition from your SSD, then OSX disk utility to extend the Yosemite partition to fill the whole drive.

 

Good Luck!

Before I go through with this, is it safe to recreate the partition table on the SSD on the Mac while I am booted into the operating system that resides on that partition table?

 

Also, am I going to need to reinstall Clover following this procedure?

 

Thanks!

Link to comment
Share on other sites

@wormyrocks,

 

Yes, it is safe to run GDisk even if you are booted into the disk where the operation will be performed.  See post#359 for examples.

 

For added peace of mind, first run the 'p' and 'b' options to print the current GPT partition table and then save it to a file on the other hard disk (so if you do something wrong, you can revert the changes without data loss).  I don't think you will need to reinstall Clover but it is always handy to create a FAT32 Clover boot USB just in case ;).

 

You can also run GDisk in Windows if you want - cd to the GDisk directory from a command prompt and type

gdisk64.exe X: (where X is the disk number of the drive you want to perform operations on).

Good Luck!

 

Edit

 

Thank you!

 

One last question before I run this; my laptop just got stolen so my hack is my primary machine at this point; it's backed up but I really don't want to go through the trouble of reinstalling everything if something goes wrong.

 

I'm getting this message; is this what I should be expecting? Any other steps I should be taking?

 

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

  MBR: MBR only

  BSD: not present

  APM: not present

  GPT: not present

 

 

***************************************************************

Found invalid GPT and valid MBR; converting MBR to GPT format

in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by

typing 'q' if you don't want to convert your MBR partitions

to GPT format!

***************************************************************

 

Warning! Main partition table overlaps the first partition by 32 blocks!

You will need to delete this partition or resize it in another utility.

 

Warning! Secondary partition table overlaps the last partition by

33 blocks!

You will need to delete this partition or resize it in another utility.

 

 

Thanks again.

 

GDisk is designed for GPT or hybrid GPT disks.

 

The "shared lock" message is normal if you are loading GDisk from the drive which is being operated on.  However, the partition table scan shows your SSD is MBR and not GPT....

 

If so, you can run GParted from a live linux USB (eg Linux Mint) and remove your Windows parition with that utility instead.

  • Like 1
Link to comment
Share on other sites

@wormyrocks,

 

Yes, it is safe to run GDisk even if you are booted into the disk where the operation will be performed.  See post#359 for examples.

 

For added peace of mind, first run the 'p' and 'b' options to print the current GPT partition table and then save it to a file on the other hard disk (so if you do something wrong, you can revert the changes without data loss).  I don't think you will need to reinstall Clover but it is always handy to create a FAT32 Clover boot USB just in case ;).

 

You can also run GDisk in Windows if you want - cd to the GDisk directory from a command prompt and type

gdisk64.exe X: (where X is the disk number of the drive you want to perform operations on).

Good Luck!

Thank you!

 

One last question before I run this; my laptop just got stolen so my hack is my primary machine at this point; it's backed up but I really don't want to go through the trouble of reinstalling everything if something goes wrong.

 

I'm getting this message; is this what I should be expecting? Any other steps I should be taking?

 

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

  MBR: MBR only

  BSD: not present

  APM: not present

  GPT: not present

 

 

***************************************************************

Found invalid GPT and valid MBR; converting MBR to GPT format

in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by

typing 'q' if you don't want to convert your MBR partitions

to GPT format!

***************************************************************

 

Warning! Main partition table overlaps the first partition by 32 blocks!

You will need to delete this partition or resize it in another utility.

 

Warning! Secondary partition table overlaps the last partition by

33 blocks!

You will need to delete this partition or resize it in another utility.

 

 

Thanks again.

Link to comment
Share on other sites

@wormyrocks,

 

Yes, it is safe to run GDisk even if you are booted into the disk where the operation will be performed.  See post#359 for examples.

 

For added peace of mind, first run the 'p' and 'b' options to print the current GPT partition table and then save it to a file on the other hard disk (so if you do something wrong, you can revert the changes without data loss).  I don't think you will need to reinstall Clover but it is always handy to create a FAT32 Clover boot USB just in case ;).

 

You can also run GDisk in Windows if you want - cd to the GDisk directory from a command prompt and type

gdisk64.exe X: (where X is the disk number of the drive you want to perform operations on).

Good Luck!

 

Edit

 

 

GDisk is designed for GPT or hybrid GPT disks.

 

The "shared lock" message is normal if you are loading GDisk from the drive which is being operated on.  However, the partition table scan shows your SSD is MBR and not GPT....

 

If so, you can run GParted from a live linux USB (eg Linux Mint) and remove your Windows parition with that utility instead.

Thanks again - so it isn't an issue that the partition tables overlap? That just happens because I'm running my OS off the drive?

 

I am writing gparted to a flash drive now; hopefully this should fix things. thanks!

Link to comment
Share on other sites

@wormyrocks,

 

Yes, it is safe to run GDisk even if you are booted into the disk where the operation will be performed.  See post#359 for examples.

 

For added peace of mind, first run the 'p' and 'b' options to print the current GPT partition table and then save it to a file on the other hard disk (so if you do something wrong, you can revert the changes without data loss).  I don't think you will need to reinstall Clover but it is always handy to create a FAT32 Clover boot USB just in case ;).

 

You can also run GDisk in Windows if you want - cd to the GDisk directory from a command prompt and type

gdisk64.exe X: (where X is the disk number of the drive you want to perform operations on).

Good Luck!

 

Edit

 

 

GDisk is designed for GPT or hybrid GPT disks.

 

The "shared lock" message is normal if you are loading GDisk from the drive which is being operated on.  However, the partition table scan shows your SSD is MBR and not GPT....

 

If so, you can run GParted from a live linux USB (eg Linux Mint) and remove your Windows parition with that utility instead.

Okay, so I was able to remove the Windows partition with GParted, but neither it nor Disk Utility wants to let me resize my Mac partition.

 

I get the following error message when poking about with Gdisk:

 

https://www.dropbox.com/s/eisg520vqthaozk/IMG_20150625_183157.jpg?dl=0

 

What steps should I take to resize the partition? I'm happy to convert to GPT if it is relatively risk-free from my current state.

 

Thanks again!

 

Edit: Also, while I'm at it, would it be worth my while to convert my MBR Windows disk to GPT as well?

Link to comment
Share on other sites

@wormyrocks,

 

The linked photo is GDisk's output for the 1TB hard drive and is MBR.  I thought you wanted to resize the Mac partition on your 128GB SSD :huh:?  What is the output of running diskutil list in OSX terminal (or parted -l in Linux)?

 

If GParted or Disk Utility won't resize your HFS partition on an MBR drive, maybe try fdisk as suggested by @aarons510 post#7.

 

It might be easier to save all your DATA (Time machine backup or CCC clone onto an external hard drive) then start afresh ---> clean install into your freshly formatted SSD with GUID Partition Table.  I have included a a procedure to convert an MBR disk to GPT with EFI partiton in post#359 but it isn't for the faint of heart and you should backup anyway incase of disaster :).

 

Clover works best when all OS's are installed in UEFI mode so it is worth doing if you have the time.

  • Like 1
Link to comment
Share on other sites

@wormyrocks,

 

The linked photo is GDisk's output for the 1TB hard drive and is MBR.  I thought you wanted to resize the Mac parition on your 128GB SSD :huh:?  What is the output of running diskutil list in OSX terminal (or parted -l in Linux)?

 

If GParted or Disk Utility won't resize your HFS partition on an MBR drive, maybe try fdisk as suggested by @aarons510 post#7.

 

It might be easier to save all your DATA (Time machine backup or CCC clone onto an external hard drive) then start afresh ---> clean install into your freshly formatted SSD with GUID Partition Table.  I have included a a procedure to convert an MBR disk to GPT with EFI partiton in post#359 but it isn't for the faint of heart and you should backup anyway incase of disaster :).

 

Clover works best when all OS's are installed in UEFI mode so it is worth doing if you have the time.

Well, that's the thing... I think it's actually the output for the solid state. GParted lists it as /dev/sda1, and it says that it has a 56 GiB capacity in the middle of the text.

What constitutes installing an OS in UEFI mode? Does EFI require GPT to work properly?

Also, weird problem: after deleting the old Windows partition, when I select my SSD for startup, the screen hangs for a few seconds and then kicks me back to Clover. When I select it again, it boots fine... but I always have to hit the boot drive twice in order to successfully get into the OS. I have absolutely no idea what could be causing this.

 

Here is the output of diskutil list:

 

➜  diskutil list

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:     FDisk_partition_scheme                        *120.0 GB   disk0

   1:                  Apple_HFS MacSystem               60.1 GB    disk0s1

/dev/disk1

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *1.0 TB     disk1

   1:                        EFI EFI                     209.7 MB   disk1s1

   2:                  Apple_HFS MacFiles                999.9 GB   disk1s2

/dev/disk2

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:     FDisk_partition_scheme                        *1.0 TB     disk2

   1:               Windows_NTFS Windows System          940.1 GB   disk2s1

➜  ~  

 

And here is the fdisk output:

 

Enter 'help' for information

fdisk: 1> p

Disk: /dev/disk0 geometry: 14593/255/63 [234441648 sectors]

Offset: 0 Signature: 0xAA55

         Starting       Ending

 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

------------------------------------------------------------------------

 1: AF 1023 254  63 - 1023 254  63 [         2 -  117469176] HFS+        

 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      

 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      

 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused    

 

Thanks again for all your help, it is much appreciated.

 

Also, I should add, this is on top of a 100% clean installation of Clover. I installed it over Chameleon around when Yosemite came out and I was so shocked and happy that it worked the first time it booted that I didn't even learn how to install new kexts. I am sure there's a lot of stuff that I could be doing to optimize this machine that I'm not doing, but I don't really remember how to safely take care of a hackintosh (my build was over three years ago) and so now I'm terrified of screwing it up.

Link to comment
Share on other sites

 

What constitutes installing an OS in UEFI mode? Does EFI require GPT to work properly?

 

OSX installs by default in (U)EFI mode and Clover in effect emulates a UEFI BIOS in our non UEFI (legacy) BIOS machines.  This requires the target drive to be partitioned with a GUID Partition Table (GPT) and an EFI partition.

 

Given the strange partition tables from cloning the SSD, maybe it will be easier with fresh installs on GUID partitioned drives (like disk1 with an EFI partition).

 

Have a look at the following guides:

 

What's a GPT?

[Guide] Install Windows 8 UEFI on Legacy BIOS with Clover (and Dual boot with Yosemite)

Post#29 to create a multiboot UEFI Windows/Linux/OSX installer :).

 

Edit

 I'm just terrified of losing my working installation, especially given how questionably reliable drive cloning is in my experience.

 

If you're worried about damaging your current Yosemite installation, I would recommend temporarily disconnecting disk0 and 2 and doing a test clean install of Yosemite on disk 1 (your GPT drive).  This will also serve as an insurance policy when you reformat disk0.

 

From the partition tab of DU,  shrink the "MacFiles" partition to free up 30GB or more of space on disk 1 and create a new HFS+ partition to install Yosemite.

 

Have a look at this guide by @Parvo for creating the Yosemite USB installer.

 

Afterwards, install legacy Clover into the EFI partition and boot the drive as described in the guides above.

Link to comment
Share on other sites

Hmm, that is odd, because I have never cloned the contents of the SSD. But I suppose i will if I have to. I'm just terrified of losing my working installation, especially given how questionably reliable drive cloning is in my experience. I remember jumping through some hoops when I first set up the dual booting - like installing Windows first and then putting OS X on the secondary partition. Possibly that's why I can't reclaim the space on that partition.

 

Well, I'm warming to the idea of wipe and refresh, but I figure I'll try the partition conversion before I go for broke, assuming that'll eventually help me reclaim the empty space. Does the first entry in post #359 of the thread you linked have the relevant instructions? Is there any chance of those instructions working given that they refer to starting with a hybrid drive rather than a pure MBR table?

 

I'm also absolutely mystified by the fact that I have an EFI partition on /disk1. I've never booted off that drive, ever. 

Link to comment
Share on other sites

OSX installs by default in (U)EFI mode and Clover in effect emulates a UEFI BIOS in our non UEFI (legacy) BIOS machines.  This requires the target drive to be partitioned with a GUID Partition Table (GPT) and an EFI partition.

 

Given the strange partition tables from cloning the SSD, maybe it will be easier with fresh installs on GUID partitioned drives (like disk1 with an EFI partition).

 

Have a look at the following guides:

 

What's a GPT?

[Guide] Install Windows 8 UEFI on Legacy BIOS with Clover (and Dual boot with Yosemite)

Post#29 to create a multiboot UEFI Windows/Linux/OSX installer :).

 

Edit

 

If you're worried about damaging your current Yosemite installation, I would recommend temporarily disconnecting disk0 and 2 and doing a test clean install of Yosemite on disk 1 (your GPT drive).  This will also serve as an insurance policy when you reformat disk0.

 

From the partition tab of DU,  shrink the "MacFiles" partition to free up 30GB or more of space on disk 1 and create a new HFS+ partition to install Yosemite.

 

Have a look at this guide by @Parvo for creating the Yosemite USB installer.

 

Afterwards, install legacy Clover into the EFI partition and boot the drive as described in the guides above.

Update!

 

So, I decided to go for broke, wipe my SSD and install Yosemite on it... I'm now more lost than before.

 

I wiped the SSD with a GPT scheme and installed Yosemite from the Clover drive, set up exactly as described in the guide - the only difference being that I copied my existing config.plist and a few kexts (sound, Ethernet) besides FakeSMC. I then booted into the install to make sure that it worked, went through the OSX setup procedure, gazed upon an empty desktop from a fresh install, then booted from my Time Machine drive and restored everything. So far, so good.

 

I booted into my desktop environment with only the solid-state plugged in; it seemed to have restored my partition, but since my user folder is on my Mac Files drive I couldn't actually log in. In any case, at this point it booted, so that means that the OS files on the solid-state drive were (at least mostly) shipshape. So I went to plug things back in.

 

Here's where things get hairy. I realized that all my SATA3-capable drives had been plugged into SATA2 ports for the last three years, so I re-plugged them into my SATA3 ports. While I was doing so, I must have accidentally bridged the restart pin on my motherboard, because the machine booted and said that my BIOS settings had been erased. (By the way, my motherboard is a GA-Z77M-D3H-MVP with an i5-3570k).

 

I changed the BIOS settings back according to an easily-googleable guide on a site whose name I won't mention and then tried to boot from the solid-state again, but booting halted and I got the big "circle with slash through it" sign in the middle of the boot sequence. I tried again with various boot options that I remembered having had an impact in the past (albeit on Chimera). Nothing. I went back to the SATA2 port. Same thing. Tried different cables and different SATA ports on the motherboard. Nothing. The system was booting from Clover (interestingly, only the Clover installed on the flash drive; it couldn't boot directly from the SSD) recognizing the drive, loading some files and then crashing.

 

Here's where things get really weird. I decided to just wipe and start again, so I booted up from the flash drive and opened DU. DU could not recognize the solid-state drive. It completely did not acknowledge that it was even there. The BIOS disagreed; according to its boot drive options, it was completely aware of the SSD's presence and all its partitions.

 

At this point you're probably thinking that I fried my solid-state drive with ESD. While I wouldn't rule it out at this point, I think it's unlikely. I have a SATA->USB interface adapter, and I used it to connect the solid-state to my roommate's laptop. It mounted just fine and I could access all my files. From the other laptop, I decided that my best bet was to wipe the disk again and plug it back into the desktop to try and reinstall the OS. I formatted and unmounted the drive without any problems and plugged it back into the desktop; Disk Utility still didn't see it, and as expected it had disappeared from the Clover boot screen as well.

 

At this point, my best guess would be that the issue is some errant setting in the BIOS or the Clover settings that I forgot to turn on in order to allow the Yosemite install USB to recognize the internal hard drive. It's that or ESD-induced HW failure of the motherboard and/or the solid state, so I'm hoping against hope that it's the former. If it is hardware failure, it's a very weird one, because Clover as loaded from the flash drive could still mount and read the solid-state drive, just not boot all the way from it.

 

I guess my next step now will be to check my other hard drives and see if they are okay/can be read by the Yosemite install. If need be I can wipe them since I'm fully backed up. But IIRC they had just been plugged in when I accidentally reset the motherboard so there's a chance they could have been damaged.

 

Any advice would be greatly appreciated.. thanks.

Link to comment
Share on other sites

@wormyrocks,

 

Some suggestions:

 

  • Take a deep breath and don't panic :)
  • Connect SSD to Intel only SATA ports
  • Set SATA mode in BIOS to AHCI

If after the above your SSD is still not recognised when booting with your Clover Yosemite Installer

  • Connect your "MacFiles" hard disk and see if is recognised ---> will show whether it is a problem with your motherboard SATA port or your SSD
  • "Clean" and reformat your SSD using Windows Diskpart.exe:

-Connect both your Windows drive and SSD to your computer's Intel SATA ports

-Boot into Windows and open a command prompt with elevated administrator privileges

-Type the following lines, followed by <Enter> after each line

diskpart
list disk (if your SSD is shown, then everything should be OK!)
select disk # (where # is the disk number of your SSD)
clean
convert gpt
create partition efi size=200
format quick fs=fat32 label="EFI"
exit
close the command prompt window

-Disconnect your Windows drive leaving only the SSD and Clover Yosemite Installer USB attached

-Reboot the computer with the Installer USB and hopefully Disk Utility will now see your SSD ---> add HFS+ partition to install Yosemite etc etc

 

Good Luck!

Link to comment
Share on other sites

 Share

×
×
  • Create New...