Hi,
Mac has stopped working on my Mac so I'm trying to copy the hard disk contents over to an external hard disk using the ubuntu live cd. I'm having a few problems though:
I type in
It says 'Cannot open /dev/sda2 for reading: permission denied'Code:cp /dev/sda2 /dev/sdb1
Any suggestions?
Many thanks!
Matt. I
-
mattireland It used to be the iLand..
-
Well, I'm not a Mac/OSX person, but I'm a long time Unix/Linux/BSD user, so I'll take a stab.
You don't copy directly between raw devices with cp. You copy between mounted filesystems. So you'll need to mount /dev/sda1 and /dev/sdb2 somewhere, and then copy between them.
For example, on Linux you might do something like:
mkdir /media/drive1
mount -t ext3 /dev/sda1 /media/drive1
mkdir /media/drive2
mount -t ext3 /dev/sdb1 /media/drive2
cp -a /media/drive1/* /media/drive2
Maybe that'll help point you in the right direction. I'm not sure how far away from that Apple might have gone from OSX's BSD roots, but I suspect it's pretty close. Probably a different filesystem than ext3 though. -
you will need root privileges in order to copy this. Not sure what the liveCD does about this. Maybe sudo everything?
Also, unless you use dd (which may be better) you will need to mount the drives (best to do the source readonly) before you can copy it.
e.g. (as root)
$ cd /
$ mkdir /tmp/mnta
$ mkdir /tmp/mntb
$ mount -o ro /dev/sda2 /tmp/mnta
$ mount /dev/sdb1 /tmp/mntb
$ cp -rf /tmp/mnta /tmp/mntb
This should work, though I didn't test it myself. Sorry if there are typos! -
Hi to the group, I'm new here, etc. I've been hanging around the Panasonic Toughbook forum here, but I haven't ventured very far otherwise. I've been using Linux on laptops for a couple of years, hope I can help. Ubuntu is like many modern distros, in that they no longer want to mount drive in good old /mnt like they used to, they want to put it in /media. Nothing wrong with that, it's just different. They also are using a Universal Unique Id for drives, instead of /dev/hdx. Again, nothing wrong with that. You have to sudo to change about everything in Ubuntu, but you can view how they are mounting the hard drives with:
Code:cat /etc/fstab
I use Ubuntu some, but not much as a liveCD. I would recommend getting regular Knoppix, and booting to that. I know that all your available drives and partitions (both internal and external) will show up on the desktop as icons. It's a simple matter to drag stuff over to an external HD. You may have to right-click on the icon and 'change read-write mode' because it used to bring the drives up read-only for safety.
Hope this helps -
mattireland It used to be the iLand..
Thanks everyone! I'll give this a try and let you know how I get on!
picoshark - are you the same as picoshark from Linux forums?
Thanks again very, very much!
Matt. I -
I'm on several forums, and I don't talk about much online besides Linux, so, possibly.
-
mattireland It used to be the iLand..
lol I just sudo'd everything and it seems to be working... Thanks again very much for the help guys!
Copying from hard disk to external
Discussion in 'Linux Compatibility and Software' started by mattireland, Jan 8, 2008.