-   Linux - Newbie (
-   -   Moving files from one harddrive to another - Simple question (

Jmcatch742 12-20-2005 02:08 PM

Moving files from one harddrive to another - Simple question
Ok so I am a little stuck guys, here is what I am trying to do:
I have my harddrive and a freinds harddrive in my computer. His harddrive has windows on it and so does mine. His harddrive however has a corrupted windows file and will not start so I put it in my computer and booted up my MEPIS live cd so I could view the files.

He pretty much wanted me to get some of his pictures, his movies, and music, save it to MY harddrive, then wipe his harddrive clean. After I wipe it clean I want to reinstall windows and place his files back in his harddrive.

Here's where I have a problem. I successfully opened his harddrive and can view it through MEPIS however when I try to copy the files over to my harddrive I get this:


root@1[My Documents]# cp -a My\ Music /mnt/hda1/My\ Downloads
cp: cannot create directory `/mnt/hda1/My Downloads/My Music': Read-only file system

So apparently my harddrive is 'read-only'? How can I set it up so that I can copy the files? I am under root btw too.

GrueMaster 12-20-2005 02:19 PM

You are probably using an NTFS partition, which is currently not write supported (there is a driver in development, but it is listed as unstable). You could always boot your system into Windows and copy the files over that way. It's slower, and more tedious, but it can be done. The other option is if you can create a fat32 partition on either drive, then you could copy the files to the fat32 partition without any problem.

The other posibility is that the drive is fat32, but the live-cd is only mounting it read-only. To check, type mount. It will list all the mounted file systems, the partition type (ext2, fat32, ntfs, etc), and their mount status. If it is fat32, and mounted read only, unmount it and remount it rw as follows:

umount /mnt/hda1
mount /dev/hda1 /mnt/hda1 -t vfat -o rw

This will mount it read-write. If this works, then you can use an uber copy command line to copy the data:
root@1[My Documents]# tar -cf - "My Music" |(cd "/mnt/hda1/My Downloads";tar -xvf -)

Note the above command is based on your previous command, using tar instead of cp. You can use double quotes to include spaces in directory and file names without using "\" before the spaces. If you add a " to the begining of your path as you type, tab completion with work as well.

Good luck!

All times are GMT -5. The time now is 02:00 AM.