Score:0

Partitioning an HFS+/MBR-formatted external drive without data loss

us flag

(Likely a duplicate, but Google is failing me)

I have a 2 TB external hard drive, formatted with a single HFS+ partition and an MBR partitioning scheme. It's currently holding a backup of my old Macbook.

Fast forward a few years, I'm upgrading from an old PC running Ubuntu 19.10 to a newer PC running Kubuntu 22.04, and I'd like to backup the old PC to a second partition on the external drive before retiring it for good, without losing the data on the existing HFS+ partition.

Between the outdated MBR scheme and the unsupported HFS+ filesystem, I'm having trouble figuring out the best way to achieve this.


Possibly relevant info:

  1. I'm not planning on restoring anything from either backup (the Macbook or the old PC), just store their contents in a convenient place while migrating the stuff I'd like to keep onto my new machine.

  2. I no longer have access to a Mac for working with the HFS+ partition.

  3. I originally backed up the Mac by formatting the backup drive with an empty HFS+ partition and just drag-and-drop copying the Mac's root directory (don't ask why, it was a long time ago).

  4. If I can't achieve this without wiping the backup drive, I don't mind temporarily backup an image of the HFS+ partition elsewhere; as is, it's too large to store on either PC, but could most likely fit on my new PC with compression.

I've included a summary of the current state of each drive (as reported by lsblk, formatted for readability). sda is the old PC, nvme0n1 is the new PC, and sdb is the backup drive. sda2 through sda5 are a (mostly unused) Windows 10 install; sda6 is the only partition I'm interested in backing up. All sizes are in GiB:

NAME        | PTTYPE | FSTYPE  | SIZE       | FSSIZE   | FSAVAIL  | FSUSED 
---------------------------------------------
sda         | gpt    |         |    931.513 |          |          |        
|-sda1      | gpt    | vfat    |      0.488 |    0.484 |    0.447 |   0.038
|-sda2      | gpt    |         |      0.125 |          |          |        
|-sda3      | gpt    | ntfs    |    458.026 |          |          |        
|-sda4      | gpt    | ntfs    |      0.831 |          |          |        
|-sda5      | gpt    | ntfs    |     15.204 |          |          |        
|-sda6      | gpt    | ext4    |    456.836 |  448.665 |  231.923 | 193.884
---------------------------------------------
nvme0n1     | gpt    |         |    476.940 |          |          |        
|-nvme0n1p1 | gpt    | vfat    |      0.500 |    0.499 |    0.494 |   0.005
|-nvme0n1p2 | gpt    | ext4    |    476.438 |  467.890 |  422.410 |  21.642
---------------------------------------------
sdb         | dos    |         |   1863.017 |          |          |        
|-sdb1      | dos    | hfsplus |   1863.017 | 1863.017 | 1390.504 | 472.513
David avatar
cn flag
Any time you work with partitions there is a danger of losing the data.
TheMac avatar
us flag
obviously; by "without data loss" I just mean without *intentionally* losing data (e.g. by wiping the existing partition and reformatting from scratch)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.