-   Linux - Software (
-   -   Cloning a dual boot (MacOSX, Linux) drive (

trentfox 06-18-2015 08:04 PM

Cloning a dual boot (MacOSX, Linux) drive
I have a 2009 Mac mini set up as a dual boot with Yosemite and Ubuntu 15.04; the boot loader is rEFind. The internal drive is a 500 gb HD, and I bought a 500 gb SSD that I want to use to replace the slow HD. I have an external enclosure for the SSD and I want to start by cloning the internal drive before replacing it. (I have an enclosure that I can put the SSD in and it can be attached to the mini through either Firewire 800 or USB 2.) The Mac partition is HFS+ and there is also a recovery partition. Ubuntu is on one ext4 partition and there is a swap partition as well. Is it possible to do a bit by bit copy of the whole drive with either Clonezilla or dd and if so, will the drive be bootable? Or do the Mac and Linux partitions have to be done separately and the boot loader reinstalled? Alternatively, I have a Mac utility called Carbon Copy Cloner - will it make a bootable bit by bit copy of the drive, and will it preserve the partition structure?

schneidz 06-18-2015 08:10 PM

theoretically, plugging in both drives and doing a dd from a live-usb should work since they are both the same exact size.

trentfox 06-19-2015 05:57 AM

Does it matter that the Mac side was formatted with a GPT partition table?

sundialsvcs 06-19-2015 07:16 AM

If it were me, I would be booting Linux from an external drive, not a dual-boot partition. I frankly hate dual-boot.

trentfox 06-19-2015 05:52 PM

OK, but I dislike slow drives; which is why I'm going to an SSD. Even if I put Linux on an external SSD, it would run slowly on this Mac - limited by having only usb2 and FireWire 800 ports.

trentfox 06-20-2015 02:32 PM

I managed to figure it out, and although this might not be the most efficient way, here is what worked:
(1) Put SSD in external case
(2) Use Clonezilla (or any other Unix formatting utility) to replicate the partition structure of the source disk (in this case, but source and target are same size).
(3) Use Carbon Copy Cloner (CCC) to clone the Mac partition. (This is a Mac utility.)
(4) Use Clonezilla to do a partition to partition clone for the Linux partition
(5) Use gparted from the source disk to format the swap drive of the SSD
(6) Install the SSD inside the computer

Note that one thing I hadn't tried was a disk to disk clone using 'dd', as suggested by schneidz. It may have worked, and it would have covered steps 2-5 if it did. I was worried that it wouldn't have 'blessed' the Mac partition of the target disk (SSD), whereas I knew that CCC would do that. (Note that the clone of a Mac partition has to be 'blessed' to be bootable.) Even if 'dd' alone didn't work, odds are that it would have succeeded in doing all the necessary formatting and cloning in one move except for the 'blessing', leaving me only to run CCC afterwards. I'll try that the next time.

All times are GMT -5. The time now is 03:12 AM.