Solved How to mount a MAC GPT drive onto a working FreeBSD system?

I have a friend who is over 90 years old, who owns at least 3 Macs of various kinds. Recently, he handed me a HD from his Mac-mini, which, apparently, got corrupted somehow and asked me to recover any files recoverable from it.

Some time ago, I did something similar for a nephew who had a similar problem. I do remember using dd successfully. He was extremely grateful and surprised I managed this.

However, since that was several years ago, I have forgotten exactly which commands I used.

So, today I did gpart show with the old man's laptop drive connected and the following came up with (among other stuff):
Code:
>       34  976773101  ada1  GPT  (466G)
         34          6        - free -  (3.0K)
         40     409600     1  efi  (200M)
     409640  974831808     2  apple-core-storage  (465G)
  975241448    1531680     3  apple-boot  (748M)
  976773128          7        - free -  (3.5K)

=>       34  976773101  diskid/DISK-33IRCOENT  GPT  (466G)
         34          6                         - free -  (3.0K)
         40     409600                      1  efi  (200M)
     409640  974831808                      2  apple-core-storage  (465G)
  975241448    1531680                      3  apple-boot  (748M)
  976773128          7                         - free -  (3.5K)
One thing that has me surprised is that there are two entries for that drive. I have not seen the second one before and am not sure how to interpret it. But I'll leave that issue for later.

When I do mount /dev/ada1p2 /mnt/MAC

I get: mount: /dev/ada1p2: Invalid fstype: Invalid argument

Obviously, I need, at least, to include in the above command -t fstype, but what IS the file type?

After reading a bit about Apple Core Storage, I think he is out of luck. It looks as though I need not only the HDD I have here, but also an SSD his MACmini also had. As far as I am concerned, leave it to Apple to make things almost impossible to work with.

Might anyone have any suggestions, other than "toss the drive"?

Ken
 
One thing that has me surprised is that there are two entries for that drive. I have not seen the second one before and am not sure how to interpret it. But I'll leave that issue for later.
FreeBSD does that - one is the old-style and one the new-style with a diskid - that way if the drive moves around you can refer to it using the diskid (whereas the ada1 might become ada0 or ada2 or whatever depending on what other drives might in the computer.)

I think you'll be out of luck in regards to the file system type - even if FreeBSD supports it, the data may be encrypted (certainly the newer Macs have a lot of obstacles e.g. the T2 chip.)

Looks like it might used to have been HFS, but that's ancient: https://wiki.freebsd.org/HFS
 
If he had 2 macs why not do it on one of his machines? OSX has dd
For a couple of reasons: 1) he already removed and replaced the drive and uses his MACs daily. 2) I am completely unfamiliar with MACs and have always regarded anything to do with Apple as nothing I want to have anything to do with. 3) he would not like to be unable to use either of his MACs for an extended period of time. 4) Etc.

Ken
 
OK. I have learned a few things over the past few days. Apparently, the reason the HDD was replaced in the computer from which this drive was taken was simply because he had never maintained the drive and it was too full to work correctly.

I have installed the drive in my desktop and have looked at it with a piece of software I used very successfully when I was working to recover files from damaged HDDs at work. It is named GetDataBack Pro. It will read almost anything readable.

From what I have discovered when examining his drive is that the drive, apparently, is working correctly and there is no damage of any kind, neither hardware nor software. It is simply almost entirely full.

I was able to recover many, many megabytes of data, photos, etc. However, there are many other files he would like to have which I cannot get to with this Windoze-based software. It really needs some UNIX-based operating system to read them. BTW, it looks as though the software views that drive as an HFS based drive. At least that is what it is reading.

Also, the three MACs he owns are all laptops and thus, other than mounting the drive into some sort of external USB based drive-box, he cannot connect the drive to any of his laptops. I may try that, but for now, I would like to do something else.

I want to be able to attach the drive to my FreeBSD box and mount it somehow in order to "off-load" his files and burn them to a CD or put them on some USB sticks.

I have made another directory in /mnt named MAC to use as a possible mount point. As seen above in my early post, gpart show shows the drive as this


Code:

> 34 976773101 ada1 GPT (466G)
34 6 - free - (3.0K)
40 409600 1 efi (200M)
409640 974831808 2 apple-core-storage (465G)
975241448 1531680 3 apple-boot (748M)
976773128 7 - free - (3.5K)

=> 34 976773101 diskid/DISK-33IRCOENT GPT (466G)
34 6 - free - (3.0K)
40 409600 1 efi (200M)
409640 974831808 2 apple-core-storage (465G)
975241448 1531680 3 apple-boot (748M)
976773128 7 - free - (3.5K)
 
However, I have not yet figured out how to mount this drive. If I do mount -t HFS /dev/ada1p2 /mnt/MAC , I get mount: /dev/ada1p2: Invalid fstype: Invalid argument

When I do mount /dev/ada1p2 /mnt/MAC, I get the exact same response.

I took a look at the command dd but won't I have to mount the drive before I can use that command? And what syntax might I use to take all data that is on that drive and put it on one of the other drives I have attached?

Might anyone have a clue as to what I am doing wrong? Any help would be appreciated.

Ken
 
The link I posted said

”this lack of support for HFS in FreeBSD”

so just whacking -t HFS was not likely to work.

If there’s nothing wrong with the drive then a Mac is still the best way to go.

Or maybe one of those external USB drive bays connected to a Mac.

Something like this:


So plug the drive into the dock, plug into a Mac and maybe you will be able to access the contents in their native environment.

NOT saying it will work but probably a lot easier.

There are probably Mac-specific external drive bays that are more likely to work.

Or something like this - this is for 2.5” drive so might be wrong size:

 
FreeBSD isn't the right tool for the job here.

Whack something like Fedora Workstation or any decent Linux LiveISO on a USB. Install Mac disk into some kind of computer. Boot the USB. It should auto-mount the HFS drive. "Disks" GNOME GUI (gparted) or fdisk -l is gonna be your friend.
 
OK. using file -sL /dev/ada1p2 it returns:

/dev/ada1p2: Macintosh HFS Extended version 4 data (mounted) last mounted by: 'fsck', created: Fri Jun 7 03:08:46 2013, last modified: Wed Jan 4 05:08:58 2017, last checked: Fri Jun 7 17:08:46 2013, block size: 4096, number of blocks: 121763328, free blocks: 86510414

So, why doesn't mount -t HFS /dev/ada1p2 /mnt/MAC work? And what does it mean above when it says "(mounted)" ? If it is mounted, where do I find this?

I am confused.

Ken
 
The link I posted said

”this lack of support for HFS in FreeBSD”

so just whacking -t HFS was not likely to work.

If there’s nothing wrong with the drive then a Mac is still the best way to go.

Or maybe one of those external USB drive bays connected to a Mac.

Something like this:


So plug the drive into the dock, plug into a Mac and maybe you will be able to access the contents in their native environment.

NOT saying it will work but probably a lot easier.

There are probably Mac-specific external drive bays that are more likely to work.

Or something like this - this is for 2.5” drive so might be wrong size:

No. That is the correct size, and I have ordered one from Amazon here in the U.S. Thanks for the advice. In fact, I had suggested this to my 90 year old friend this morning, but had been working to see if I could get FreeBSD to mount it some how.

Again, thanks.

Ken
 
Ha! So, I added /dev/ada1p2 /mnt/MAC ntfs mountprog=/usr/local/bin/hfsfuse,late,failok,rw 0 0 to my /etc/fstab after installing sysutils/fusefs-hfsfuse, then rebooted, and lo and behold, it worked. Amazing !!

Now, let's see what I can find.

Thanks, again, folks. :)

Ken
 
Why did you specify filesystem type as ntfs? Also, you could do mount -a instead of reboot to mount it.

Why did you specify filesystem type as ntfs? Also, you could do mount -a instead of reboot to mount it.
Actually, thank you for seeing that. I fouled it up. That should have been "hfs" instead of "ntfs". I fixed it, although, I am not sure it really makes any difference.

And, yes, mount -a would do the trick, but I wanted to see what happens at boot. What I really like to watch is how much faster FreeBSD boots than Windoze. :)

Ken
 
Well, it is working very well now. I am amazed at how many PDFs my friend has kept!!! Several thousand of them, in fact. I am copying all the files I find over to another larger HDD and it is taking quite a long time.

Again, thank you all for the help. I really appreciate it.

Ken
 
Back
Top