[SOLVED] Help retrieving files from HD of old dead Macbook

Ok, I’m a complete noob, <3 weeks in Linux so go easy on me.

I’ve got a working SATA SSD from old MacPro which is now dead. I want all the pictures and files off it.

Boot to windows it doesn’t see the Mac Partition. Disk has two partitions PCHD (NTFS) and MacbookPro (Mac formatted).

Boot to Elementry OS and I see the folders on both partitions, but on mac partition it won’t let me open the folders in the file manager. It says “This folder does not belong to you, you don’t have permission to view this folder”

I googled and found i’m supposed to do something like this somehow:

cd ~/Desktop
sudo chown tati.tati *

Where “tati” is user see link to forum here:
ubunto forum

BUT… I’m such a noob I don’t even know how to get to the partition on the MacPro HD.

google says I’m supposed to:

sudo mount /dev/sdc2 /media/pianopraze/MacbookPro

but it doesn’t work. It says:

mount: /dev/sdc2 is already mounted or /media/pianopraze/MacbookPro busy
       /dev/sdc2 is already mounted on /media/pianopraze/MacbookPro

Here is what I have:

pianopraze@ElementryOS:/$ ls
bin    dev   initrd.img      lib64       mnt   root  srv  usr      vmlinuz.old
boot   etc   initrd.img.old  lost+found  opt   run   sys  var
cdrom  home  lib             media       proc  sbin  tmp  vmlinuz
pianopraze@ElementryOS:/$ lsblk
NAME                     MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb                        8:16   0   2.7T  0 disk 
└─sdb1                     8:17   0     2T  0 part 
sr0                       11:0    1  1024M  0 rom  
sdc                        8:32   0 931.5G  0 disk 
├─sdc2                     8:34   0   875G  0 part /media/pianopraze/MacbookPro
├─sdc3                     8:35   0 619.9M  0 part 
├─sdc1                     8:33   0   200M  0 part 
└─sdc4                     8:36   0  55.8G  0 part /media/pianopraze/PCHD
sda                        8:0    0  18.7G  0 disk 
├─sda2                     8:2    0     1K  0 part 
├─sda5                     8:5    0  18.2G  0 part 
│ ├─elementary--vg-swap_1
│ │                      253:1    0   3.5G  0 lvm  [SWAP]
│ └─elementary--vg-root  253:0    0  14.7G  0 lvm  /
└─sda1                     8:1    0   487M  0 part /boot
pianopraze@ElementryOS:/$ sudo mount /dev/sdc2 /media/pianopraze/MacbookPro
[sudo] password for pianopraze:     
mount: /dev/sdc2 is already mounted or /media/pianopraze/MacbookPro busy
       /dev/sdc2 is already mounted on /media/pianopraze/MacbookPro

sdb is Windows SSD
sdc is the MacPro SSD I want to copy files from
sda is ide drive with Elementary installed on it.

So… I can’t get it working and put all this info together. I feel so stupid… Help?

I need to get to the MacbookPro hard drive and change the permissions.

You can’t mount it because it’s already mounted (That’s what the MOUNTPOINT column in the output of lsblk is indicating), so all you need to do is find a way to get to your files. You could (temporarily) login as root with ‘su’ (assuming you know the root password) to copy your files to some folder in your home directory.

mkdir ~/my_mac_stuff
cp /media/pianopraze/MacbookPro/path/to/your/files/ ~/my_mac_stuff/

then recursively change ownership of those files to your user

chown -R username:groupname ~/my_mac_stuff/*

Don’t forget to log out of root with a Ctrl-D at the command line. If you don’t know the root password just put ‘sudo’ in front of the ‘cp’ and ‘chown’ commands.

1 Like

Ok, remember, noob here.

so I googled… to get root i type:

sudo -s

Ok there i see I’m root now.
Ok, I see it made my_mac_stuff in home folder.

But the copy doesn’t work. It says:

root@ElementryOS:/# cp /media/pianopraze/MacbookPro/Users/richard/Sites/ ~/my_mac_stuff/
cp: omitting directory '/media/pianopraze/MacbookPro/Users/richard/Sites/'
root@ElementryOS:/# 

So it seems I made a few mistakes. The first is that the tilde ( ~ ) refers to the home directory of the currently logged in user. While you’re logged in as root ~/ will interpreted as /root/ instead of /home/pianopraze/, so the ‘mkdir’ command should be done before you log in to root. Another reason why you should do this logged in to your own account is that any files made by root are owned by root and you wouldn’t be able to access them.

My next mistake was that you need to use the -r flag (for recursive) to cp a directory

cp -r /media/pianopraze/MacbookPro/Users/richard/Sites/ /home/pianopraze/my_mac_stuff/

Many Linux commands use -r for when you’re acting upon a directory. It basically means “do the thing on this directory and everything inside it, all the way down the file tree”

Let me know if you have any more questions

3 Likes

Yay! OK I’m 2/3 the way there!

I got “Sites” folder moved over and changed so i can see it. Yay!!! TY!

Had to make a couple changes, but I figured it out thanks to your help!

I’m posting them here for my future reference (and others who need it)

pianopraze@ElementryOS:/$ mkdir ~/my_mac_stuff
pianopraze@ElementryOS:/$ cd ~
pianopraze@ElementryOS:~$ ls
Documents  Music         Pictures                      Public  Templates
Downloads  my_mac_stuff  PlayOnLinux's virtual drives  Steam   Videos
pianopraze@ElementryOS:~$ sudo -s
[sudo] password for pianopraze:     
root@ElementryOS:~# cp -r /media/pianopraze/MacbookPro/Users/richard/Sites/ ~/home/pianopraze/my_mac_stuff/
cp: cannot create directory '/home/pianopraze/home/pianopraze/my_mac_stuff/': No such file or directory
root@ElementryOS:~# cp -r /media/pianopraze/MacbookPro/Users/richard/Sites/ ~/my_mac_stuff
root@ElementryOS:~# chown -R username:groupname ~/my_mac_stuff/*
chown: invalid user: ‘username:groupname’
root@ElementryOS:~# chown -R pianopraze:pianopraze ~/my_mac_stuff/*

I need to get other folders on that HD also that are bigger, bigger than the hard drive Elementary is installed on. If i could just copy the whole “richard” folder that would be perfect! but it is 102GB (my Elemntary OS HD is 20GB). That is the " /media/pianopraze/MacbookPro/Users/richard" folder for exact reference.

How do I copy it from sdc2 to not ~/my_mac_stuff/ on my Elementry HD, but rather to a folder I make on the sdb1 2TB windows HD???

1 Like

So first off, to address the errors you got, the first is because when logged in as user pianopraze the tilde ( ~ ) expands to mean /home/pianopraze. When you typed ~/home/pianopraze/my_mac_stuff it expanded to /home/pianopraze/home/pianopraze/my_mac_stuff (highlighted in red). You should’ve typed

cp -r /media/pianopraze/MacbookPro/Users/richard/Sites/ /home/pianopraze/my_mac_stuff/

or

cp -r /media/pianopraze/MacbookPro/Users/richard/Sites/ ~/my_mac_stuff

Both mean the same thing. And my bad for not specifying to replace ‘username’ and ‘groupname’ with the chown command

Back to the issue at hand, if you want to copy things to the windows drive you’ll need to mount it somewhere. Looking at your first post you said that sdb is your windows drive, and looking at your lsblk output there’s only one partition on that drive, sdb1. These names are referencing what are called ‘block devices’ which are represented as files in the /dev/ folder (dev for devices). So to mount the partition sdb1 (as root)

mkdir /media/pianopraze/windows
mount /dev/sdb1 /media/pianopraze/windows

from there, I think you should be able to copy files over with cp. Windows and Linux have different means of doing things, so there may be some issues, and if you do have issues I may or may not be able to help. I don’t have much experience with that sort of thing

1 Like

Thank you :slight_smile:
Hey, I was pursuing a different angle that might make this all much easier.

Can I just reassign the permissions of the MacbookPro HD?

I ran:

root@ElementryOS:~# chown -R pianopraze:pianopraze /media/pianopraze/MacbookPro/

And it went through every file on the MacbookPro HD and did something. Now when I run as administrator in the file manager I can see the files (where before it gave an empty folder and wouldn’t let me see them), and some of them I can copy over directly while others I can’t. All the folders and files have a closed Lock on them still.

Is there a way to give it a global unlock command in terminal? So then I could just copy them via the file manager to the windows disk, which the file manager has no trouble seeing and to which it has no trouble writing.

I’m not sure what you mean by the files being Locked. What errors are you getting?

1 Like

It shows a little lock picture on every single folder and icon.

Hmmm it says it’s a “read only file system”

root@ElementryOS:~# chmod 777 -R /media/pianopraze/MacbookPro/Users/richard/Books/*
chmod: changing permissions of '/media/pianopraze/MacbookPro/Users/richard/Books/Gaming': Read-only file system

If it’s read only you should be able to copy things. Have you tried copying rather than moving?

If that doesn’t work you could try this

mount -o remount,rw /dev/sdc2 /media/pianopraze/MacbookPro

1 Like

Copying is working, we did that above.

Problem is Elementary is on too small a hard drive to copy it all.

To KISS, I think I’m going to run out and get a larger Hard drive, put Elementary on it, and then do the process above that you helped me get working.

1 Like

Well I meant copying over to the windows drive, but getting a larger drive is definitely a better solution. Glad we could get things figured out :slight_smile:

btw, if you’re interested in resources for learning more about using Linux I recommend “The Linux Command Line” from No Starch Press. It’s really comprehensive and functions well as a reference. You can find pdf’s online pretty easily

1 Like

Try reading through man mount (you can Google that term and get a man page or type it in a terminal which should just open the manual page with less, you can exit less by pressing q, and search by pressing /.

In there, look for remount, umask, uid, gid

To learn your uid and gid, try id, id -u, id -g , and also man id.

Also, lookup man rsync as it might be useful for you to run something like rsync -avPr /media/MacbookPro/my/path/to/photos /media/new drive/photos

also Archlinux wiki and Gentoo wiki tend to be useful all the time, and irrespective of a particular distro.

Good luck!

1 Like

I will look it up, thank you.

I’ve got Elementary installed on the 3TB main hard drive. I couldn’t get it to install alongside Win7 so I just reformatted the whole drive. Who needs Windoz anyway???

I’m going to go try copying over all the files now.

Elementary makes this Core2 feel like an i5. Amazing how much faster computer runs.

Solus makes it even faster to boot and shutdown but it’s got some crazy weird bugs with this system at times.

@risk I’ve tried reading through the man but I’m such a noob it might as well be written in Greek.

It’s fun, and humbling learning Linux. Sometimes I feel like my IQ has been cut in half.

Yay! It worked!

I have all my files from the old dead Macbook Pro!

TY TY TY!!!

1 Like

Awesome sauce!!!

Great job everyone!

:love_you_gesture:

Added ‘solved’ text into title

2 Likes