Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the recommended way to copy my data from a windows disk to a linux disk?

2 views
Skip to first unread message

steveh44

unread,
Feb 6, 2012, 11:55:40 PM2/6/12
to
I have one hard drive which just has my data (no applications). I am
currently on windows 7, so the file system is ntfs.

I want to migrate to Linux on my second computer. The disk is USB
drive, so I can just move it and plugin it the second computer running
Linux. I understand that Linux can read NTFS disks.

But I want all my data to be on the linux file system, not NTFS. I
have a second blank disk I want to use to copy all my data from my
NTFS disk, to the blank linux disk and move everything to be under /
usr/home/me/

What is the safest way to do this? The data is about 1 GB. The new
blank disk is 3 GB, so space is not an issue.

I need ofcourse to mount my NTFS disk from linux as read only (to be
safe), and then do the copy to linux disk so that everything lands
under /usr/home/me/ on linux.

What would be the best way to do this? just cp -R or do I need to do
something better? Do I need to do this as root? but I want all the
data to belong to me the user and I do not want to mess up file
protections and all that on linux since things are different there. I
want to do this right first time and not have to go fix things later
as the data is very large.

thank you
Steve

William Colls

unread,
Feb 7, 2012, 12:35:00 AM2/7/12
to stev...@yahoo.com
cd /top/of/ntfs
cp --recursive --preserve * /usr/home/me &

should get you what you want. It will take a while so probably a good
idea to run it in the background. There are lots of other options (cpio
and tar will both do what is needed, but I doubt they would any faster)
so keep it simple.

HTH

William

steveh44

unread,
Feb 7, 2012, 12:52:17 AM2/7/12
to

> cd /top/of/ntfs
> cp --recursive --preserve * /usr/home/me &
>
> should get you what you want. It will take a while so probably a good
> idea to run it in the background. There are lots of other options (cpio
> and tar will both do what is needed, but I doubt they would any faster)
> so keep it simple.
>
> HTH
>
> William

Thanks. Do I need to be root?

Steve

William Colls

unread,
Feb 7, 2012, 1:55:04 AM2/7/12
to stev...@yahoo.com
On 02/07/2012 12:52 AM, steveh44 wrote:
> Thanks. Do I need to be root?

If you have write permission in me, then no; otherwise yes.

Aragorn

unread,
Feb 7, 2012, 3:51:20 AM2/7/12
to
On Tuesday 07 February 2012 05:55, steveh44 conveyed the following to
comp.os.linux.setup...

> I have one hard drive which just has my data (no applications). I am
> currently on windows 7, so the file system is ntfs.
>
> I want to migrate to Linux on my second computer. The disk is USB
> drive, so I can just move it and plugin it the second computer running
> Linux. I understand that Linux can read NTFS disks.

Yes, that is correct.

> But I want all my data to be on the linux file system, not NTFS. I
> have a second blank disk I want to use to copy all my data from my
> NTFS disk, to the blank linux disk and move everything to be under /
> usr/home/me/

I think you mean "/home/me", rather than "/usr/home/me". The latter is
a BSD'ism.

> What is the safest way to do this? The data is about 1 GB. The new
> blank disk is 3 GB, so space is not an issue.

Just mount the volume with the NTFS filesystem somewhere in the UNIX
tree - e.g. "/mnt/disk" or "/media/usbdisk" or something like that - and
then copy over the files.

> I need ofcourse to mount my NTFS disk from linux as read only (to be
> safe), [...

That's not required, but it's possible.

mount -t ntfs -ro /dev/sd[something] /mnt/disk

> ...] and then do the copy to linux disk so that everything lands
> under /usr/home/me/ on linux.
>
> What would be the best way to do this? just cp -R or do I need to do
> something better?

No, that would do well enough.

> Do I need to do this as root?

The mounting /may/ require being root - depending on the security
settings of your GNU/Linux system - but the copying is best done under
your own login. Don't forget to unmount the source filesystem again
before you unplug it.

> but I want all the data to belong to me the user and I do not want to
> mess up file protections and all that on linux since things are
> different there.

If you copy over the files under your own login, the target files will
all be owned by you.

> I want to do this right first time and not have to go fix things later
> as the data is very large.

Fixing ownerships is easy too. Just run...

chown -R you:you /home/you/*

... as root if you happened to have copied over the files while logged
in as root.

--
= Aragorn =
(registered GNU/Linux user #223157)
0 new messages