Convert a ntfs partition to ext4, without losing any data on it

Since I’ve been slowly moving from Windows to openSUSE, I will need to convert several ntfs partitions to ext4. I’m already getting there with some drives, so I’d like to know what the easiest way to do it is in openSUSE. I know how to format a ntfs partition to ext4, but how do I convert it without losing any data on there? I have large ntfs partitions with files I can’t move temporarily somewhere else, so I need to convert without the risk of breaking them (hopefully even if a system freeze or power failure happens while converting). Anyone know how to do this?

I do not think it is possible. The only way would be to shrink NTFS as far as possible, create ext4 on free space and copy data, possibly compressing it. Then you could grow ext4 filesystem using space from NTFS.

The way I did that, was to backup everything, format to ext4, then restore from the backup.

I doubt that there is any other reliable way to do it.

On 2012-12-25 19:56, nrickert wrote:
>
> MirceaKitsune;2513341 Wrote:
>> Since I’ve been slowly moving from Windows to openSUSE, I will need to
>> convert several ntfs partitions to ext4.
>
> The way I did that, was to backup everything, format to ext4, then
> restore from the backup.
>
> I doubt that there is any other reliable way to do it.

I concur.

It might be possible that there are proprietary software solutions
capable of doing this, but I don’t know.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

That i IMHO the only way to go.

But do not forget to check (and set when needed) all ownership by user/group and the access bits. Because these weren’t on the NTFS file system, and they are either created when making the backup, or on the restoring (depends on how you backup) and thus most likely the owner will ten be the one who did it (possibly root and that is most possibly not the one you want to own what are apparently user files).

Wow, there’s no way at all? You could convert from fat32 to ntfs, and since both ext and ntfs have been around for years it made sense for something like this to exist.

I’m not going to risk playing with partition resizing most likely, so I guess I’ll see if I can backup files across multiple drives and format to ext4 then.

As FAT32 and NTFS are from the same MicroSoft family that is not illogical.

But there is no connection at all between those and the ext series (or with other Unix/Linux file system types).

I would use tar with compression to make the backup. Saves space.

On 2012-12-25 20:46, MirceaKitsune wrote:
>
> Wow, there’s no way at all? You could convert from fat32 to ntfs, and
> since both ext and ntfs have been around for years it made sense for
> something like this to exist.

But there has to be an interest for this to appear. There are no Linux
tools to convert from, say, reiserfs to xfs or ext3, so why would be
from ntfs?

The only place where I have seen such converters is in the proprietary
side. Partition magic, I think. And no idea if ext4 is available as target.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2012-12-25 21:06, hcvv wrote:
> I would use tar with compression to make the backup. Saves space.

I do not trust the method, a single failure and the entire backup is lost.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

My other drives are all kinda full. There’s my external drive, but I already have a backup there of everything I’d be moving during the conversion. Why I want a second backup then? Because I never trust having important data on only ONE drive at any given moment :stuck_out_tongue: Can never know if something breaks that drive suddenly or anything. I’ll see how I can divide my files across other partitions while I format, then put them back together.

Tricky part is to be careful when copying in Dolphin. Frequently, it tends not to keep file properties like Date Modified, which would heavily and horrible break everything. But thankfully I’m aware and check that too.

Also, I currently have my partition mounted on /windows/D/ since it was NTFS. I’m not sure where it makes sense to mount it once it will be an ext4. I am going to make it my home partition too, but I have other data on it than just my user folder so I’m still confused. This isn’t an emergency though, so I can gather more info before getting to converting.

On 2012-12-26 01:16, MirceaKitsune wrote:

> Tricky part is to be careful when copying in Dolphin. Frequently, it
> tends not to keep file properties like Date Modified, which would
> heavily and horrible break everything. But thankfully I’m aware and
> check that too.

I use ‘mc’ for these operations, or sometimes, rsync with a long list of
options I never remember.

> Also, I currently have my partition mounted on /windows/D/ since it was
> NTFS. I’m not sure where it makes sense to mount it once it will be an
> ext4.

I use /data/storage_1, /data/storage_2, etc :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Sorry, but when we discuss these typicaly system management tasks, I never ever have end-uyser GUI programs like Dolphin in mind.

BTW when you copy frtom an NTFS file system to a Linux file ystem, you will never have manny of those properties (as I said in an earlier post), whatever tool/method you use. What is not there can not be created out of thin air.

On 2012-12-26 10:36, hcvv wrote:
> BTW when you copy frtom an NTFS file system to a Linux file ystem, you
> will never have manny of those properties (as I said in an earlier
> post), whatever tool/method you use. What is not there can not be
> created out of thin air

Actually, NTFS has properties like owner that could be translated to
Linux but are not. The driver does not support them, it is incomplete.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))