LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Format a ntfs drive (https://www.linuxquestions.org/questions/linux-newbie-8/format-a-ntfs-drive-272330/)

bionicyeti 12-31-2004 10:41 AM

Format a ntfs drive
 
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.

whansard 12-31-2004 10:54 AM

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.

bionicyeti 12-31-2004 11:05 AM

First off, thanks for replying.

I don't care what I format it as. What do you suggest. It's just going to be a data drive.

Secondly, it's /dev/hdb2. When I do a umount /dev/hdb2 I get device is busy. I'm not on that drive in any way.. that I know of.

claudius753 12-31-2004 11:32 AM

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.

bionicyeti 12-31-2004 11:57 AM

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???

claudius753 12-31-2004 12:02 PM

This site gives some good information.

Electro 12-31-2004 04:40 PM

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.

Sticktendo 12-31-2004 05:03 PM

claud, can you get on AIM, i need some help *prays he is still here*


All times are GMT -5. The time now is 10:29 PM.