LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 12-31-2004, 10:41 AM   #1
bionicyeti
LQ Newbie
 
Registered: Jul 2004
Location: Ann Arbor area
Distribution: debian
Posts: 11

Rep: Reputation: 0
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.
 
Old 12-31-2004, 10:54 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
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.
 
Old 12-31-2004, 11:05 AM   #3
bionicyeti
LQ Newbie
 
Registered: Jul 2004
Location: Ann Arbor area
Distribution: debian
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 12-31-2004, 11:32 AM   #4
claudius753
Member
 
Registered: Jan 2004
Distribution: Mac OS X 10.6.4 "Snow Leopard", Win 7, Ubuntu 10.04
Posts: 322

Rep: Reputation: 31
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.
 
Old 12-31-2004, 11:57 AM   #5
bionicyeti
LQ Newbie
 
Registered: Jul 2004
Location: Ann Arbor area
Distribution: debian
Posts: 11

Original Poster
Rep: Reputation: 0
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???
 
Old 12-31-2004, 12:02 PM   #6
claudius753
Member
 
Registered: Jan 2004
Distribution: Mac OS X 10.6.4 "Snow Leopard", Win 7, Ubuntu 10.04
Posts: 322

Rep: Reputation: 31
This site gives some good information.
 
Old 12-31-2004, 04:40 PM   #7
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 12-31-2004, 05:03 PM   #8
Sticktendo
Member
 
Registered: Dec 2004
Distribution: attempting mandrake 10.1
Posts: 112

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 06:30 AM
Format NTFS partition from Linux? EgosZ Fedora 3 10-21-2004 07:59 AM
how do i format drive as ntfs from linux fedora unixmad Linux - Newbie 1 08-20-2004 07:54 AM
Can't format drive as fat32 in Linux - stays NTFS insectile Linux - General 1 07-20-2004 05:38 PM
Format NTFS to EXT3 Optimistic Linux - Software 12 06-10-2004 12:48 PM


All times are GMT -5. The time now is 09:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration