Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've decided to go Linux only, finally!

This also means that I have a bunch of disks still under NTFS.

I don't have spare space anywhere to transfer the files to and then just re-format the drive so I need a tool, or tool chain, to make it on the disk itself.

I imagine I could do it with some patience like this:

  1. Defrag NTFS.
  2. Shrink NTFS partition some percent.
  3. Create ext[n] partition on left space.
  4. Copy some files until ext[n] is full.
  5. Shrink NTFS partition.
  6. Grow etx[n] partition.
  7. Copy files.

and repeat 5, 6 and 7 until it's all transferred.

It's a last resource path if I can't find any tool or tool-chain to do it automatically.

share|improve this question
    
I removed the swap tag since it has other meaning in Linux –  phunehehe Oct 20 '10 at 14:06
    
@phunehehe Quite right, and thanks. I must of used convert instead of swap. I'm still a bit under the radar in terms of rep :) –  Gustavo Carreno Oct 21 '10 at 16:15

6 Answers 6

You can do the described steps using gparted, however, I'd advice you to think twice about it. When fiddling with partitions one should be 100% sure to have a working and up-to-date backup ready because there is a low but significant chance that something goes wrong. When you have such a backup, it is probably easier to just reformat and copy the backup back to disk. If you don't have (which is risky in itself), I wouldn't take the risk.

share|improve this answer
    
last I checked you can't move the gparted partition's from the beginning and I'm not sure that it can resize ntfs. –  xenoterracide Oct 20 '10 at 12:04
    
It definitely can resize ntfs. I'm not sure what you mean with "you can't move the gparted partition's from the beginning"? –  fschmitt Oct 20 '10 at 12:47
    
I have been using gparted to resize my ntfs partitions for years, no problem yet. –  phunehehe Oct 20 '10 at 13:22

From what you say I think you have more than one hard drive, and each might have more than one partition. This doesn't directly answer your question, but do you really have to convert them all?

Linux handles NTFS quite well, so access to your old files will be no problem. You can also configure those partitions to be automounted easily.

Using Linux with a permission-unaware filesystem has its advantages (especially if you use it alone and/or intend to setup a multiple-boot system).

A typical Linux installation will need from 2GB to 5GB, and believe me a 5GB installation is rather full-featured. In your case it's easier to shrink a partition to make 10GB for Linux, and it doesn't even need to be at the beginning of your disk (shrinking the "right" of a partition is easier and faster and less risky than it's "left").

The Ubuntu installation CD provides an option to do this automatically, although I prefer to prepare the disk myself with gparted. Backups are always recommended, but if you can't afford it (and are willing to take the risk) then the risk is quite small.

share|improve this answer
    
I Have 2 HDDs with one NTFS partition each. I could find out the permission unaware solution but I really don't trust NTFS AT ALL :) So I really want to have a nice etx4 instead of the NTFS. –  Gustavo Carreno Oct 21 '10 at 16:10

I don't have spare space anywhere to transfer the files to and then just re-format the drive so I need a tool, or tool chain, to make it on the disk itself.

As others have said, fiddling with partitions has a small but significant risk of data loss/corruption. If you've copied half your data to ext3 and then either the shrink ntfs or enlarge ext3 has a problem, you lose half you data! The risk is small but the damage could be large.

If your data is valuable to you you should already have backups. But shrinking and growing partitions without a backup is just asking for trouble.

Hard drives are getting ever larger and cheaper. Go buy yourself a new one. (You're switching to Linux. You deserve it.) Unless you have a lot of data already you may be able to copy all your data onto the new drive. It might be wise to keep the old drives as a backup of your data.

If you have some really small partitions it may also be useful to burn the data to a DVD.

share|improve this answer

The problem is that you grow a file system from the end, not the beginning, so you can't really do what you're after.

Your best approach is to copy the contents of the partition to another device, verify it, and then destroy the NTFS partition before re-creating it as ext3. Then you can restore the data.

share|improve this answer
    
I think it's doable, tediously, given an additional step of shifting the Ext* partition after shrinking the NTFS partition and before extending the Ext* partition (if the Ext* partition is placed after the shrunken tail of the NTFS partition; the other way around works too, just a little different). This could be done with something as simple as dd. –  ephemient Oct 21 '10 at 13:37

In theory convertfs might work (in one shot). I'm not 100% sure though, this depends on the Linux NTFS driver being able to create a sparse file.

share|improve this answer
1  
I've had a look at convertfs and devel stopped on 2005. Sparse files are possible on NTFS, I only not sure that Linux has it included. –  Gustavo Carreno Oct 21 '10 at 16:12
    
@Gustavo: Ext[n] supports sparse files. –  Artelius Dec 9 '10 at 21:27
    
All Linux's native filesystems support sparse files; in general, sparse files are a feature found in all UNIX filesystems. –  ephemient Dec 9 '10 at 21:31

The best tool I found for resizing ntfs, ever, was partition magic, and unlike gparted it could move the partition on either side. Unfortunately it was discontinued when Symantec acquired PowerQuest, so it might be difficult to find a copy, and its ext supports sucks (only because it hasn't been updated in years). I then recommend making your ext partitions before the ntfs partition, and use gparted to grow the ext partition, and partition magic to shrink the ntfs partition, from windows.

share|improve this answer
2  
I don't think advising people to pirate software is acceptable. –  fschmitt Oct 20 '10 at 13:07
    
@fschmitt sorry that the product has been discontinued since the purchase of the company. It really was the best of the breed. parted has had 5+ years to catch up and hasn't gotten close. I don't think it's been produced since like '03 or before. It's not like paying for it is an option anymore. –  xenoterracide Oct 20 '10 at 21:10
    
Well, I really, REALLY, REALLY don't want to see a MS install anymore, so this would not be possible. And all the Live CD's with XP are no longer supported :( –  Gustavo Carreno Oct 21 '10 at 16:14
    
@Gustavo well if windows isn't installed anymore then resizing from the front of the partition isn't possible. I know of no other tool that could do it. –  xenoterracide Oct 21 '10 at 20:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.