LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-08-2007, 08:03 AM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Rep: Reputation: 46
Question Is it safe to creat files on ntfs yet?


Ladies and Gentlemen.

I am looking for advice, opinions, and insight about accessing my ntfs partition from within 64Etch. I am able to mount it and write to it, if the file already exists. Now that I have Etch installed and working correctly I will use vista less and less as I get the programs installed that I use. Both systems are on a 160g drive, and of coarse the windows restore partition is there too. I used the drive resizer gizzmo in vista to create the free space to install Etch on. As windows is a drive hog I am left with a lot of room on the ntfs partition that is not very usable if I can't create files on it from Etch.

So, what is the best way, short of deleting the partition and making an ext3 partition out of the free space, to gain file creation, and read/write of this space?

I have looked into ntfs-3g a little, but could only find a deb package in sid and I am not sure about installing that into my stable system. I don't have a problem installing from source, I may need a little help, but I am wondering about the whole 32bit / 64bit thing.

Is installing from source how I work around the 32/64 thing? I have seen other apps that didn't have a 64 bit package. I even tried to install Opera on my system, but it wouldn't take the 32 bit package.

Ntfs-3g needs fuse and that needs a kernel module. I was not able to determine in kpackage what if any of the packages I had listed were the right ones to support ntfs-3g.

I know that Knoppix 5.1 can create files on ntfs but I don't know how they are doing it. Is their method the best or is there something else more reliable? I did notice that there were some files that Knoppix couldn't create on ntfs because the file name was to long. At the time I had 32Etch installed but a bad install caused me to reinstall and to save my kmail set up I copied the files out of my home dir to the ntfs before the reinstall. I then pasted those files into my new home dir but kmail is complaining about permissions. Yes, I did reset the permissions, but that didn't correct the problem. If I never am able to access those it is not an issue as I had to manually configure anyway.

Trashing the ntfs is not a good thing because the vista installer gives you no option about where you want to install to. It just takes the whole hard drive. I lost the start of a LFS install that way when vista crashed and I had to reinstall. I can't abandon vista yet because linux doesn't have drivers for the camera in this laptop.

Short of the create/read/write solution is there a safe way to shrink the ntfs more? On my xp box I have full access to the ext partitions through a program called ext2ifs and it works quite well. In vista, however, it doesn't work so well. You have to run the install as root, in xp compatibility mode, and it will install, but you can't change the configuration after the fact. Besides that whole boot back and forth thing is a real headache. I know that windows places some files in specific places on the partition so that it knows where to find them. And I am afraid that any further resizing of that partition will disturb those static locations and possibly render the partition useless. Yes, I know that anytime you change a partition size you run that risk, still some things are more dangerous than others.

Advice and insight are appreciated

Thanks
 
Old 07-08-2007, 08:27 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
If this is primarily a desktop, you will find it simpler just to run 32 bit on the 64bit architecture.

The usual workaround is to install the 32 bit libraries to a non-standard location... environment variables are uset to help compilers et al locate them. Google is your friend.

The latest ntfs-3g has a good reputation. It is slower than the native windows ntfs but it's what we've got. Don't expect it to handle DRM or encryption. Keep it simple and you'll be fine.

Most users don't seem to have any trouble suggesting Debian Testing or Unstable for a home desktop. Don't be put off by the names. Remember... Linux considers alpha stage the time to release

If you are nervous... perhaps the (legacy "Captive" driver?) If paranoid... create a fat32 partition.

However, if your linux use is that frequent, you are better off removing the partition in favour of something else. Consider ditching windows entirely...

If resize is more your speed...
Vista Ultimate only needs around 40GiB, MS says... some folk create a 4GiB fat32 partition (use linux to do this) as well ... these will be Windows C: and D: drives. So you can get the size down quite a lot.

The latest Parted seems to manage Vista fine for resizing... The system rescue CD?

There is less risk with the boxed vista (as opposed to the oem "bundled" version: you get to reinstall...)

Have a look at LVM if you find yourself doing lots of resizing etc.

Last edited by Simon Bridge; 07-08-2007 at 08:37 AM.
 
Old 07-09-2007, 10:23 PM   #3
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks Simon

I have upgraded to testing. And ntfs-3g in available now. I ran testing (Etch) on the desktop for a long time before it went stable. And I know that debian's testing is as or more stable than a lot of other distros.

I plan on running linux most of the time. The only real reason I need windows is to record meetings via the on board camera. And after linux develops a driver for the camera I shouldn't need it at all.

This came with vista home premium, which should take less room. By “Parted” do you mean QT Parted? I have used it several times to resize ntfs with xp on it, but not vista. So when the time comes and I need the space hogged by vista I will go that route.

I have installed ntfs-3g out of testing, but I am still confused about the fuse kernel module. I have not been able to locate it. I did read one page that said something about it being moved into the kernel. Is that why I can't find it?

I have tried to detect it in my kernel without success. But I am probebly not using the right commands. I just tried
Code:
# modprobe -l fuse
/lib/modules/2.6.18-4-amd64/kernel/fs/fuse/fuse.ko
So I guess I have it.

I have this line in my fstab
Code:
/dev/sda1	/mnt/vista	ntfs	users,ro,umask=000	0	0
A ubuntu site said to set it this way
Code:
/dev/sda1 	/mnt/vista		ntfs-3g	defaults, locale=en_us.utf8	0	0
I understand everything except “locale=en_us.utf8” none of my other partitions use this parameter. It's some kind of language setting isn't it? Do I need it as I only use english on my machine?

When I mounted it, I got
Code:
WARNING: Deficient Linux kernel detected. Some driver features are
         not available (swap file on NTFS, boot from NTFS by LILO), and
         unmount is not safe unless it's made sure the ntfs-3g process
         naturally terminates after calling 'umount'. If you wish this
         message to disappear then you should upgrade to at least kernel
         version 2.6.20, or request help from your distribution to fix
         the kernel problem. The below web page has more information:
         http://ntfs-3g.org/support.html#fuse26
It seams that a kernel upgrade will fix this, but that brings up a several other things. I haven't sean the 2.6.20 source in testing. At one time I had a good howto for building a new kernel but I think I lost the link.

I tried to save my fstab to the ntfs but couldn't. I guess I didn't do something right. But that is enough for one day

Thanks
 
Old 07-09-2007, 11:18 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I use the 2.6.21 kernels which are seemingly flawless, the kernels below 2.6.20 have the "Deficient Linux kernel detected", actually it's the fuse module that's deficient. In this thread I show how to get the higher version kernel(s) and headers for compiling modules. I have been using ntfs-3g for many months with only one issue, saving web pages complete with flash ads, I could not delete it from either Windows or Linux, so now I only save web pages in HTML only. This issue may have been resolved since as it was a long time ago that I stopped saving web pages complete.
I also have my /etc/fstab line setup two different ways on various distributions, I originally set it up with the first example as I was following a tutorial for Debian that mentioned so, but now I just do it the way the ntfs-3g people's directions say in the second example.
Code:
/dev/sda3       /mnt/data       ntfs-3g umask=0,nls=utf8        0       0
/dev/sda3       /data		ntfs-3g	defaults	0       0
 
Old 07-11-2007, 01:12 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by rbees
Thanks Simon
No worries
Quote:
By “Parted” do you mean QT Parted? I have used it several times to resize ntfs with xp on it, but not vista. So when the time comes and I need the space hogged by vista I will go that route.
That's the ticket!
There is qparted (QT), gparted (gtk), and <insert prefix here>parted... "QT-parted" suggests you are using kde.
Quote:
I have this line in my fstab
Code:
/dev/sda1	/mnt/vista	ntfs	users,ro,umask=000	0	0
A ubuntu site said to set it this way
Code:
/dev/sda1 	/mnt/vista		ntfs-3g	defaults, locale=en_us.utf8	0	0
I understand everything except “locale=en_us.utf8” none of my other partitions use this parameter. It's some kind of language setting isn't it? Do I need it as I only use english on my machine?
Look up about "locale" and character encoding... Windows does fonts differently to linux... which is better at holding to international standards. The most obvious effect from the user is the way the "extended characters" are encoded. Specifying the locale here makes sure text is produced properly.
Quote:
When I mounted it, I got
WARNING: Deficient Linux kernel detected.
Covered by the Junior Hacker - <waves> Hi Jr.
Quote:
I tried to save my fstab to the ntfs but couldn't. I guess I didn't do something right. But that is enough for one day
Yeah... you don't want to keep linux system stuff in ntfs.

Be aware that you cannot expect to save linux permissions to ntfs, nor ntfs excuse for security in linux.
 
Old 07-11-2007, 01:33 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Originally Posted by rbees
I tried to save my fstab to the ntfs but couldn't. I guess I didn't do something right. But that is enough for one day
Just like to mention, I save a copy of important Linux files like my Debian sources.list and xorg.conf or whatever in the ntfs data partition. I usually just save it the way it is and it will not be readable in Windows, doesn't matter as they are only there for backup purposes. But for any Linux file I want to be able to read in Windows I put a .rtf extension to the name of the file, of course if I want to use it again in Linux I remove the .rtf extension. Saving files in .txt are not well converted/readable in Windows, but .rtf is not altered and can be viewed/modified in Wordpad or Office. The text file issue may have something to do with the locales Simon points out.
 
Old 07-11-2007, 06:14 AM   #7
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
some success

Thanks Junior Hacker

After changing my sources I get this error:
Code:
Reading package lists... Done
W: GPG error: http://www.backports.org etch-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C
W: GPG error: http://www.debian-multimedia.org testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: http://kernel-archive.buildserver.net trunk Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DCB0AE4729F335B3
W: You may want to run apt-get update to correct these problems
I remember reading somewhere about having to install the key for the repositories, but I don't remember how to do it. I guess I will have to search that out. Sometimes when I install a package I get a message that says something about not being able to confirm the package or something. Might this be related to that key thing?

When I tried to run Synaptic I got this error:
Code:
E: Invalid record in the preferences file, no Package header
E: _cache->open() failed, please report.
I didn't have a preferences file until I made it because this tutorial said to. http://forums.debian.net/viewtopic.php?t=4525
I did the copy/paste thing and changed this
Code:
Pin: release o=Debian,a=stable -
to  Pin: release o=Debian,a=testing
and this
Code:
  Pin: release a=sarge-backports
to: Pin: release a=etch-backports
I did put a # in front of the “Explanation” line thinking I needed to comment it out, but I get the error both ways.

In kpackage I only get the installed packages. No upgrades or new packages to install.

As for my fstab entry I changed it to
Code:
/dev/sda1	/mnt/vista	ntfs-3g	defaults	0	0
I can read from it but not write to it. I think that I umount-ed the partition and then mounted correctly.

Quote:
Simon said: you don't want to keep linux system stuff in ntfs.
I only tried to write the fstab because I had it open and it was an easy test. Yes I did save it to /etc/fstab before the umount/mount thing.


Quote:
Simon said: "QT-parted" suggests you are using kde.
Yes. Wish I could get some of the Gnome applets to work in the Kde task bar.

I suppose some system info may be in order

hp laptop dv 9317cl
turion 64 x2
1 g mem
160 g HD
broadcom wireless (not working yet) hoping kernel upgrade fixes
nvida graphics (working, (needs nvida legacy driver))
amd64 os /w KDE
sound (not working but not priority)

Quote:
Jr said: The text file issue may have something to do with the locales Simon points out.
It appears that a system reboot has resolved the issue of being able to write to ntfs. I have saved this Open Office file (I write my posts off line and save them for reference later) and the fstab. We will see the next time I boot to windows about opening them.

I still want to upgrade the kernel because it may fix a couple of issues like the ones above.

Thanks for listening. I don't know any people in my area that use linux to talk to. Most/part of the time just writing it out identifies the problem for me and I can solve.

Anyway thanks
 
Old 07-11-2007, 02:58 PM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Yes, forgot to post those keys, below is the kernel archiver key, you have to issue the two commands separately as root to install them:
Code:
gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 29F335B3
gpg --armor --export 29F335B3 | apt-key add -
And here are the multimedia keys:
Code:
gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 1F41B907
gpg --armor --export 1F41B907 | apt-key add -
Now, I don't have the backports entry in my sources.list which is where I keep a copy of these keys with their lines commented out, but it's easy to find the key and import it. You'll notice the format of those import commands above are the same except for the 8 digit number, you'll also notice the 8 digit number is the same as the last 8 digits of the key ID apt supplied in the errors. So it's easy to find a key if you don't have one as apt gives you the ID and you have a copy of the import commands, so just change those 8 digit entries in the two commands, by rights, this is the import commands for the backports:
Code:
gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 16BA136C
gpg --armor --export 16BA136C | apt-key add -
So, if you ever add another repo. and you don't know where the key is, just do an "apt-get update" and apt will produce the missing key error along with the key ID, then you can import it.
I can't help with the preferance error in Synaptic as I don't know.
Code:
/dev/sda1	/mnt/vista	ntfs-3g	defaults	0	0
Whenever you add or edit an entry in /etc/fstab in Debian, you should "Tab" from one section to the next rather than use the space bar. For example, you type in your first section '/dev/sda1', then hit the Tab key on the key board (twice for my Debian after the first section), then when the cursor is in line with mount points of other entries you type 'mnt/vista', then hit the Tab key again till the cursor is in line with file system types of other entries and type 'ntfs-3g', then hit Tab again and the cursor should only move a little to line up with other option entries, now type 'defaults', then hit Tab, type '0', then hit Tab, then type the last '0', now save it.
To mount manually without restarting you would need to make sure is not mounted by un-mounting and re-mounting with these commands:
Code:
umount /mnt/vista
mount -t ntfs-3g /dev/sda1 /mnt/vista
I'm in my vista right now, it's a good thing I keep a backup of my sources.list in the shared ntfs data partition, all I did was add the .rtf extension to it to copy and paste the import key commands.
 
Old 07-13-2007, 12:05 PM   #9
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks JR

During the process of installing the nvidia driver (couldn't get the debian one to work) on my system to get the gui working I read that I would need to reinstall every time I installed a new kernel. I have install the ...21 kernel and of course the gui doesn't work when I boot that kernel. If I reinstall the nvidia driver for the new kernel is that going to render the ..18 gui unusable? I can use the command line but it is like a blind person trying to climb a mountain. With out the gui I am pretty helpless without the commands written out before hand.

Thanks to all who read this too. I hope it helps you solve you issues.
 
Old 07-13-2007, 02:02 PM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
No, as long as you keep the 2.6.18 kernel installed, graphics will be available if you boot that kernel. Once you make friends with the "Tab" key on the keyboard, command line is not so bad. If the Nvidia.run script from Nvidia is in your /home directory, you navigate there from the command line and type: sh N and hit the "Tab" key and bash will complete the command to look like this: sh NVIDIA-Linux-x86-100.14.11-pkg1.run, and if that's the package you want to run, hit enter. So by using the "Tab" key, you get away with only having to type 3 letters instead of the entire package name.
 
Old 07-13-2007, 07:59 PM   #11
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Unhappy

Thanks for the tab key tip JR.

I knew about the arrow key thing but not the tab key. Thanks.

I did break my gui. I can't load it from either kernel now. The nvidia installer didn't want to let there be two of them on the system. But I may not have set the sym-lnk's up right. One of those "blind" things, I probebly fell off a cliff somewhere and didn't know it.

When the nvidia installer finished I got this warning
Code:
/usr/lib/xorg/modules/extensions/libg1x.so  not a sym-lnk
In the log I have
Code:
/lib/modules/2.6.21-2-amd64/kernel/drivers/video/nvidia.ko  unknown symbol or unknown perameter (see dmesg)
I am in windows and can't get to those places to see what I may find. After Shabbat (Sabbath)I will boot up Knoppix and see what I may be able to fix.
 
Old 07-13-2007, 08:13 PM   #12
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Sorry, forgot where my head was, need more suds, it's hot here lately. Before installing an new Nvidia driver, you must remove the old one. Boot up to your new kernel in command line, and navigate to where the nvidia script (pkg1.run file) is and issue this command to remove the old one:
Code:
sh NVIDIA-Linux-x86-100.14.11-pkg1.run --uninstall
Then when it's done, try installing it.
 
Old 07-15-2007, 02:04 PM   #13
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Cool

Thanks JR

I had already done the install before I read your post. The whole “worse that can happen is I break it” thing. And so I broke it . Your post was a little late for you to be able to claim any credit for breaking my system. I have that distinct honor all to myself this time, thank you very much. I will share if you really want some though.

Now however I am at a complete loss to know how to proceed.

I have tried to uninstall via:
Code:
sh NVIDIA-Linux-x86_64-1.0-9639-pkg2.run -- uninstall
but I get an error about the md5sum's not matching in /var/log/nvidia-installer.log? Not sure of name or location as I am in windows and can't check it. So the installer wont remove the module.

Manually deleting the module and a then reinstalling via the nvidia installer results in a non loading gui and attempting to uninstall via the nvidia installer results in the same md5sum error. I have tried this whole procedure several times with the same results.

Trying to install the module the debian way results in an not being able to find the nvidia-kernel-source. I have enabled the contrib, and non-free section to my testing section in my sources.list file.

I did run the debian way one time with my unstable sources enabled, but aborted the install because in was trying to use the x86-100.14.11series driver which does not support my hardware. According to the nvidia site I need to use the legacy driver for my hardware (NVIDIA GeForce Go 6150). Untill I broke the gui I was using the legacy driver and it worked fine.

As far as the md5sum error there must be a file somewhere containing that info. Would deleting it solve that issue? I don't know where it is, or its name so I would need to be pointed to it.

Do I remember reading somewhere that if I use the debian way i can have the module installed for different kernels. Seams kind of stupid to me that I can only boot the gui from one kernel, almost like a windows thing.

Could I have some sym-lnk's somewhere I need to delete?

Oh yea. I have also tryed the nvidia installer things listed above in the ..18 kernel with the same results.

When I try to look at the /media/sda*/var/log folder from knoppix it dosen't show up. Curious thing.

Thanks
 
Old 07-15-2007, 02:45 PM   #14
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
When I go to nvidia's download site there are three sections, one is to select what you're after, I select "graphics drivers", the next section I select "GeForce 6 series", which is where I would think the 6150 belongs, then in the third box I select "Linux x86" and hit 'Go'. The driver recommended which shows up on the next page is the "NVIDIA-Linux-x86-100.14.11-pkg1.run". Below the driver's download link is a link called "README", in this extensive document is allot of info, including a section showing all installed components if you want to look at removing manually.
 
Old 08-05-2007, 05:00 PM   #15
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks to all.

I finally got my system back up. I ended up doing a reinstall.

Junior Hacker, you are correct, the standard nvidia driver works my hardware correctly.

I did still get the md5sum error when I did the kernel upgrade. This time I however I followed the instructions correctly and every thing worked fine.

There were several steps involved in resolving my issue. At the moment I can't recall them all. I have been gone out of town for a couple of weaks with no internet service and very little time to work on it.

It seams that I have a working system now. And I have sucussfully saved this file as a new file on my ntfs.

Thanks to all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is writing to NTFS safe yet? Kujila Linux - Software 1 12-29-2006 07:57 PM
Creat files C++ necrolin Programming 4 05-09-2006 07:06 PM
safe way to backup files? hank43 Linux - Software 2 04-10-2006 06:30 AM
safe resizing of NTFS netcrusher88 Linux - General 3 08-04-2005 03:09 PM
Confused about ntfs safe(?) read-write zonkers Linux - Newbie 7 05-16-2004 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration