Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ok, I'm a total newbie and an all around idiot for the most part so go easy on me.
I have a debian box into which I recently put a new hard drive. I took the hard drive out of my XP box so it's NTFS. It's mounted and in fstab and I can read it, but not write to it. The disk has 2 partitions. One useless really little fat, which I can write to and the big NTFS (no writey).
What commands/tools do I use to format the NTFS partition???
Also, I don't care about saving the data on the drive.
Thanks in advance for any help.
By the way, I'm doing this remotely so, taking the disk out and putting in windows machine is not an option.
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,151
Rep:
what do you want to format it as? you need to umount it to format. umount /dev/hd??.
mkdosfs -F32 /dev/hd??
mke2fs /dev/hd??
mkreiserfs /dev/hd??
whatever you wish.
Distribution: Mac OS X 10.6.4 "Snow Leopard", Win 7, Ubuntu 10.04
Posts: 322
Rep:
If you want to use the data from a windows machine as well as from Linux, then you would go with vfat, FAT32, the one that is
Code:
mkdosfs -F32 /dev/hdb2
If you don't need to access it from any windows machine, I guess it wouldn't really matter what you chose to format as.
As for the drive being busy, is it mounted when you boot into Debian automatically? You could try taking out the line in your fstab, you are going to have to change it anyway when you are done formatting, then reboot so it isn't mounted. If you already have a fat partition on the drive, you might want to delete both partitions on that drive, and make 1 big one that uses the entire drive, then do the format, unless of course you want to save the smaller partition.
Thanks a lot. I #ed out the line in fstab and rebooted and I was able to run the mkdosfs command and now I remounted and can write. One more question though.
This is my line in fstab
/dev/hdb2 /home/data ntfs defaults,rw 0 0
What does ntfs need to change to?? And can defaults,rw stay the same???
Writing to NTFS is very risky, so I suggest changing rw to ro. There is an exception when writing to an NTFS partition. If you compile captive-ntfs and copy a file from Windows 2000/XP disc, you can write and read NTFS with out any problems. Also captive-ntfs has a safety measure so something does not seem right while it is mounting it. It would not mount or will not be able to write to the NTFS.
If its a FAT32 partition that you made, use vfat in the fstab or mount command. You probably want to add umask=000 so that anybody can write to it because FAT32 and NTF does not have a feature to set permissions. FAT32 and NTFS sets only attributes which is different than permissions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.