The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Copying from hard disk to external

    Discussion in 'Linux Compatibility and Software' started by mattireland, Jan 8, 2008.

  1. mattireland

    mattireland It used to be the iLand..

    Reputations:
    261
    Messages:
    1,162
    Likes Received:
    0
    Trophy Points:
    55
    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

    Code:
    cp /dev/sda2 /dev/sdb1
    
    It says 'Cannot open /dev/sda2 for reading: permission denied'

    Any suggestions?

    Many thanks!

    Matt. I
     
  2. dmorris68

    dmorris68 Notebook Consultant

    Reputations:
    24
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  3. jeffsmythe

    jeffsmythe Notebook Geek

    Reputations:
    97
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    15
    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!
     
  4. picoshark

    picoshark Notebook Consultant

    Reputations:
    19
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    30
    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
    It will probably show the /dev/sdx equivalent commented out, along with the UUID.

    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
     
  5. mattireland

    mattireland It used to be the iLand..

    Reputations:
    261
    Messages:
    1,162
    Likes Received:
    0
    Trophy Points:
    55
    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
     
  6. picoshark

    picoshark Notebook Consultant

    Reputations:
    19
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    30
    I'm on several forums, and I don't talk about much online besides Linux, so, possibly.
     
  7. mattireland

    mattireland It used to be the iLand..

    Reputations:
    261
    Messages:
    1,162
    Likes Received:
    0
    Trophy Points:
    55
    lol I just sudo'd everything and it seems to be working... Thanks again very much for the help guys!