PDA

View Full Version : n00b needs help moving files



AlanForrester
05-15-2004, 11:09 PM
Sorry my first post is one asking for help.

Here is the situation:

I have a neighbor's HP PC which the system restore files are on a 5GB hidden partition (HDA1, NTFS).

I want to reinstall his OS (Win XP home) on the already formatted C:\ (HDA2) after I can recover the files from the hidden partition.

I have temporarily placed a 2nd hard drive in the machine to copy the 4GB of system restore files from HDA1 to HDB5 (the 2nd hard drive, FAT32).

I am running Knoppix Live from the CD.

I opened the console and typed su to logon as root.

Typed the following command to copy all files and folders from HDA1 to HDB5:
cp -R/mnt/hda1/* /mnt/hdb5/

this is what was returned to me:

cp: cannot create regular file '/mnt/hdb5/insert filename here' : Read-only file system

How can I change the permissions so that I can copy all the files from the hidden partition to the 2nd hard drive, WITHOUT destroying the files on the hidden partiton?

and

Is there a simple way to restore the permissions to original after the copy (if the permissions are changed)?

thank you for any help you can provide.
---------
Alan

eco2geek
05-16-2004, 01:35 AM
Do you have the partitions mounted? Did you change hdb5 to read-write mode?

To mount hda1 (NTFS) - as root: mount -t ntfs -o ro /dev/hda1 /mnt/hda1
To mount hdb5 (FAT32) - as root: mount -t vfat -o rw /dev/hdb5 /mnt/hdb5

Or mount them and change hdb5 to read-write mode, using the desktop icons.

That's assuming Knoppix created a "/mnt/hdb5" folder when it detected your hardware - if not, you can use any of the unused folders in /mnt as a mountpoint (e.g. replace "/mnt/hdb5" with "/mnt/test").

Not sure what you mean about permissions.

AlanForrester
05-16-2004, 02:41 AM
Thank you, eco2geek

that worked!

-------
Alan

user unknown
05-16-2004, 09:09 AM
use
cp -p -R ... to preserver mode, ownership and timestamp!