Using compressed NTFS filesystems

Asked by fraterchaos

I was wondering if its possible for Ubuntu to read compressed NTFS filesystems? And more specifically, will it have a problem reading an NTFS system that has been compressed since the installation of Ubuntu?

The reason I ask: I'm running Ubuntu 6.06 (Dapper/Drake) AND Windows 2000 Pro on a dual boot system, with Grub as the bootloader. I recently changed the FAT32 drives on the system to NTFS, and at the time, I was running Freespire Linux, not Ubuntu. After converting the FAT drives to NTFS, the Freespire system could no longer recognize ANY Windows drives, and I could not even boot Win2k. I had to use the win CD and run recovery, and then poke around there to figure out just what I needed to do to restore access to my Win Drives. And after all that, I still could not read the NTFS drives from Freespire.

As an aside, I changed over to freespire because somebody on these forums recommended it for its "out of the box" support for various media codecs, but I soon found out that it didn't support quicktime movies any better than Ubuntu does for me. And I also had major troubles getting it to read and write to my Win drives even BEFORE I converted them to NTFS. So once I got my Win installation back the way it was supposed to be, I reformatted the Linux drives and reinstalled Ubuntu. And I will not be returning to Freespire.

So you can see, I don't want to try compressing my NTFS filesystem only to find it can no longer be recognized by Ubuntu. But I desperately need to do something as all my drives are getting crowded, and I can't really delete much of anything (at least without giving up alot of stuff I want, or risking damaging my OS's) So I need to gain more space. And I can't purchase any new drives at this time (I wish I could...)

SO, if anyone knows whether Ubuntu is going to be able to handle reading an NTFS filesystem after compression, like it did before, please let me know. And thanks in advance.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
jz (jz+) said :
#1

If you are using the ntfs-3g driver to access your NTFS partition I would be very careful about compression as you will loose the ability to modify compressed/encrypted files from within Ubuntu as support for these actions have not yet been implemented within the driver...

See: http://www.ntfs-3g.org/support.html#compressed

Revision history for this message
fraterchaos (fraterchaos) said :
#2

do you know how I can determine whether or not I'm using the ntfs-3g driver?

Revision history for this message
jz (jz+) said :
#3

If your NTFS filesystem is automatically mounted it should have an entry in your "/etc/fstab" file which will look something like this...

/dev/hda1 /mnt/windows ntfs-3g defaults 0 0

A more simple way to see if the driver is installed might be to see if the man pages are present by executing the following command in the terminal...

man ntfs-3g

If you see information pertaining to the program it's installed... Otherwise you'll get "No manual entry for ntfs-3g".

The driver would be something that you would have had to install and configure yourself initially as Ubuntu does not support reading/writing to NTFS out of the box.

Revision history for this message
fraterchaos (fraterchaos) said :
#4

At the moment, I'm using Windows, so I'll need to restart to check my etc/fstab file, or to run the man pages test.

As for installing drivers, I do not know how it happened, but I installed Ubuntu from the image file I downloaded. I didn't burn it to a CD because I used the Alcohol 120% program to create a virtual CD rom drive and copied the image (ISO) file for Ubuntu onto that virtual drive, and installed from there. I can only guess that because I was technically installing from an NTFS file system, somehow Ubuntu must have loaded or installed the drivers for it on its own, because I am certain I NEVER installed them. When I first ran Ubuntu after the install (rebooting the computer and loading Ubuntu from a reiser fs format drive) it already had access to my NTFS drives.

I'll check on the drivers shortly and respond with the results.

Revision history for this message
fraterchaos (fraterchaos) said :
#5

Here is a copy of my etc/fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hdb1 / reiserfs notail 0 1
/dev/hda1 /media/hda1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
/dev/hda5 /media/hda5 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
/dev/hda7 /media/hda7 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
/dev/hdd1 /usr reiserfs defaults 0 2
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0

as you can see, it makes no mention of ntfs-3g. Just ntfs...

Don't know if that means I can compress or not though

Revision history for this message
jz (jz+) said :
#6

Can you write to any of these NTFS partitions at the moment, or is it just able to read files?

Ubuntu can read NTFS but it does not support writing, if you want this you will have to use ntfs-3g, which in turn does not support the compression you wish to use.

For more information on how to set up ntfs-3g there's a great tutorial here for Ubuntu Edgy

http://www.howtoforge.com/ubuntu_edgy_eft_ntfs_ntfs_3g

Revision history for this message
fraterchaos (fraterchaos) said :
#7

Well, apparently you are correct, as I cannot copy files from my Linux drives to my windows NTFS drives. Or, at least I cannot do so while using my standard user login, I did not try to do so using 'su', but I assume it would be the same.

I guess my question now is, would Ubuntu still be able to read the NTFS drives if they were compressed (if I don't use the ntfs-3g driver on them)? Also, would it be possible to use the ntfs-3g driver on only certain partitions? I currently have 3 windows partitions on my first hard drive, all formatted to ntfs. If I could compress the largest one, and only use the ntfs-3g driver on one of the smaller drives, it would give me more space under windows, AND allow me to copy files to and from a partition that windows could read.

I will check out the tutorial you linked above, and see what info it provides. I do hope I can find some method for both compressing (at least one) windows partition, and also allowing read/write operations from Ubuntu.

Revision history for this message
fraterchaos (fraterchaos) said :
#8

One more small item. All the tutorial info is for Edgy/Eft, will the same process work under Dapper/Drake?

Thanks

Revision history for this message
jz (jz+) said :
#9

Not 100% sure however if all the dependencies are satisfied and ntfs-3g installs I don't see why not.

Revision history for this message
fraterchaos (fraterchaos) said :
#10

Alright, I'm assuming your last response was in reference to the question of whether the ntfs-3g driver will work under Dapper/Drake.

It does not actuallly answer my question about being able to read the ntfs using the original ntfs drivers if the ntfs partiton is compressed, but I can find out on my own. I have a small (i gig) partition that I use as a Windows dedicated swap drrive, I can compress that drive and see if Ubuntu can still read it, which will tell me if I can compress the larger (main) partition; if I loose access to the winswap partition under Ubuntu, its no great loss.

I am still not entirely certain about using both the standard ntfs driver and the ntfs-3g driver at the same time, on different partitions. I would assume I could do something like this:

/dev/hda1 /media/hda1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1

/dev/hda5 /media/hda5 ntfs defaults,nls=utf8,umask=007,gid=46 0 1

/dev/hda7 /media/hda7 ntfs-3g defaults,nls=utf8,umask=007,gid=46 0 1

Notice that I left the first two drives ntfs and only set the third to ntfs-3g.

I am only guessing if that would work, but it seems likely to me, providing the ntfs-3g driver does not somehow invalidate the original ntfs driver, or make it unusable.

If you have any input on this, I would welcome it, as I really don't know for sure if that would be right or proper under Ubuntu.

As stated above, I can test whether Ubuntu can read a compressed ntfs system using the original ntfs driver, so no need to answer that part of the question (unless you already KNOW the answer, don't go to any trouble finding out...), but I would appreciate input as to whether my proposed modifications to etc/fstab would work.

Thanks for all your time.

Revision history for this message
fraterchaos (fraterchaos) said :
#11

UPDATE!

Well, it turns out, Ubuntu Dapper/Drake CAN read compressed NTFS drives or partitions using the standard NTFS driver.

I decided to test it by compressing my 1 gig Windows Swap partition. After compression, I returned to Ubuntu and opened hda5 (the linux designation of the specified partition) and it looked the same as it always had. Still can't write to the drive of course, but it reads and executes as always.

Now, if I can use both the standard ntfs driver and the ntfs-3g driver at the same time, on different partitions, I will be able to set things up as I wished. I can compress win drives C: and D: and leave E: uncompressed and use ntrfs-3g to read and write to it. Then if I need to transfer files from Ubuntu to Windows, I can save them to E: (or hda7) and windows will be able to copy them from there to C: or D: (hda1 and 5 respectively)

The only question left to answer, can I use ntfs and ntfs-3g at the same time?

Revision history for this message
fraterchaos (fraterchaos) said :
#12

Well well.

I got impatient and decided to try installing ntfs-3g without answers to my questions. I followed CAREFULLY the instructions in the tutorial linked above, and here is what happened...

I added the repository to my sources.lst file. I attempted to install the ntfs-3g and got a message saying I had unmet dependencies. Specifically: fuse-utils, libc6 and libntfs-30, so I tried to use sudo apt-get install to install each of those seperately, fuse-utils installed without problems, libc6 reported it was already the newest version. libntfs-3o refused to install, saying it had unmet dependencies, specifically the fuse-utils and libc6...

Sionce it says libc6 is the newest, and it said that fuse-utils had installed correctly, I cannot understand why libntfs-30 will not install. But since it won't install, it looks as if there is nothing I can do.

Does anyone know how to install the ntfs-3g package and its depndencies on Dapper/Drake????

Revision history for this message
jz (jz+) said :
#13

I don't recommend forced upgrading of specific packages to newer versions in order satisfy the dependencies for ntfs-3g. This may cause problems for your other applications that rely on the older versions.

If you absolutely need the ability to read and write to NTFS and are comfortable with the risks you may want to try this for Dapper...

http://ubuntuforums.org/showthread.php?t=217009

A common FAT32 partition that the 2 OS's could share would be much more favorable and have less risk.

Revision history for this message
fraterchaos (fraterchaos) said :
#14

Well, I can't force it to update using the Edgy instructions and repositories anyway.

I will need to consider whether I would rather try to update it using the link above (which I have not even looked at yet) or do as you suggest and re-convert one of my partitions to FAT32. In some ways it seems a bit counterproductive to switch the E: partition BACK to FAT, but as you say, it might be the safest route. I will admit, that was one of the options I considered when I found that I could not upgrade to the ntfs-3g drive using the Edgy code.

I will have to look over whatever info is available on the link you just gave, and weight my options.

Thanks for all your help, and I guess for now we can consider this question answered.

I hope my experience might help others who find themselves in the same situation.

Revision history for this message
fraterchaos (fraterchaos) said :
#15

Ok, everything seems to be working fine except for one small issue.

I decided to change my hda7 partition back to fat32, and now I don'tknow the right way to edit the etc/fstab to reflect the change.

I tried following the instructions in the help documents, changed ntfs to vfat, changed umask=007 to umask=0000, and removed the gid =46 0 1, but it still isn't mounting.

Do you happen to know the correct line I'd need in fstab? If you could reply with a clear example that would be a great help.

Thanks

Revision history for this message
Brian Murray (brian-murray) said :
#16

The only thing you need to modify in this line "/dev/hda7 /media/hda7 ntfs defaults,nls=utf8,umask=007,gid=46 0 1" is the file system type from "ntfs" to "vfat". The "gid=46" indicates what group will own the mounted file system. While the "0" and "1" are for dump and fsck. Both of those items need to be there for it to successfully mount.

Can you help with this problem?

Provide an answer of your own, or ask fraterchaos for more information if necessary.

To post a message you must log in.