LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-10-2004, 12:10 AM   #1
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
Format NTFS to EXT3


Here is my situation:

/dev/hda: Windows XP stuff.

/dev/hdb/
hdb1 = ntfs @ 90GB
hdb2-5 = Linux Partition stuff (swap, /, etc.).

As of right now Windows XP can read/write the hdb1 ntfs partition and the Linux partition can only read the ntfs partition on hdb. But, I don't use XP and I want that 90GB partition to be a Linux only partition. So, how can I format that partition to ext3? The big question: will reformatting that partition mess up the other partitions on that drive, i.e., will Linux still boot? Will I lose data on the other Linux partitions? I don't care if I lose everything on the ntfs partition, but I don't want to lose anything on the Linux ones.

A little info: I'm running Fedora Core 2. Hda is 40GB. Hdb is 160GB total.

Any ideas?
 
Old 06-10-2004, 04:25 AM   #2
phase9
Member
 
Registered: Mar 2004
Location: austria, vienna
Distribution: slackware-10.2
Posts: 89

Rep: Reputation: 15
Hi!

For making an ext3 filesystem on /dev/hdb1 type:

Code:
mkfs.ext3 /dev/hdb1
After making the appropriate entry in /etc/fstab, /dev/hdb1 should be ready to use.

You should loose no data (execept of course /dev/hdb1) and your other partitions shouldn't be messed up.

If you have your bootmanager installed in the mbr of /dev/hda, then there should be no changes with booting your OS's.
If your bootmanager is installed in the mbr of /dev/hdb, I believe there should be no changes too.

But having an up-to-date backup of your data ready by hand, is never a bad idea....
 
Old 06-10-2004, 09:56 AM   #3
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Original Poster
Rep: Reputation: 33
Excellent. Thank you.
 
Old 06-10-2004, 11:40 AM   #4
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Original Poster
Rep: Reputation: 33
Stupid question: Where do I enter the code mkfs.ext3 /dev/hdb1 ? I tried it in the terminal with su but it didn't do anything.
 
Old 06-10-2004, 11:46 AM   #5
JJX
Member
 
Registered: Mar 2004
Location: Greece
Distribution: Debian
Posts: 351

Rep: Reputation: 31
try this:
mkfs -t ext3 .....

If fails again try "whereis mkfs"
 
Old 06-10-2004, 11:54 AM   #6
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Original Poster
Rep: Reputation: 33
Here is what I got from whereis mkfs:

whereis mkfs
mkfs: /sbin/mkfs.ext2 /sbin/mkfs /sbin/mkfs.vfat /sbin/mkfs.msdos /sbin/mkfs.ext3 /sbin/mkfs.cramfs /usr/share/man/man8/mkfs.8.gz

I tried to cd to the sbin dir and running mkfs.ext3 /dev/hdb1 --didn't work.
I tried running mkfs -t ext3 /dev/hdb1 --didn't work either.

I keep getting bash: mkfs: command not found.
 
Old 06-10-2004, 12:20 PM   #7
JJX
Member
 
Registered: Mar 2004
Location: Greece
Distribution: Debian
Posts: 351

Rep: Reputation: 31
this will work:
/sbin/mkfs -t ext3 ......
or
/sbin/mkfs.ext3 ......

... = hard disk drive
 
Old 06-10-2004, 12:27 PM   #8
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
Before you format:

I would recommend uninstalling any programs that are on that partition. This will help out a little bit with the regestry for XP, and it'll let you install those programs again. If you don't, XP will say that it can't find the uninstall file, but it still won't let you install the program, and cleaning up the regestry isn't fun. I ended up removing some old, broken programs from it, and it takes a LONG time to have it search through the whole regestry for some elusive keys, and then you have to make sure those are the proper keys you want to remove.
 
Old 06-10-2004, 12:28 PM   #9
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Original Poster
Rep: Reputation: 33
Thank you. It looks like it is going to work, I just need to unmount the drive first.

Oh, r_jensen11, there are no programs installed on the drive--just some documents which have already been backed up.

Last edited by Optimistic; 06-10-2004 at 12:31 PM.
 
Old 06-10-2004, 12:51 PM   #10
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Original Poster
Rep: Reputation: 33
Everything worked beautifully. Thanks to all for their help.


Last question (I promise):
How to I get the drive to mount automatically when I start the computer? I imagine I must add an entry to the /etc/fstab file. I added a directory for the dirve to mount to, so that is okay. Also, I was able to mount the drive with root. But, I would like it to mount automatically even if I sign in as a normal user.

Thanks for all the help.
 
Old 06-10-2004, 01:18 PM   #11
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Add a line to /etc/fstab, something like:
/dev/hdb1 /mnt/<dirname> ext3 defaults 1 1
where:
<dirname> is the name of the mount point you've created.
1 1 is the mount order of the partition. Make it read the same as the other partitions, or give it a sequential number to mount in sequence, like 1 2. Note that there must be at least one space between the numbers.
That should mount it on boot. To make it accessible by users, you will need to set permissions on that directory such that users have access.
 
Old 06-10-2004, 01:40 PM   #12
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Original Poster
Rep: Reputation: 33
Thanks bigrigdriver. That worked perfectly.
 
Old 06-10-2004, 01:48 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,995

Rep: Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682Reputation: 5682
FYI:
The 1 1 is the fifth and sixth fields of an fstab line. The fifth field is for the dump command. The sixth field is the order of how fsck checks the filesystems at boot. See man pages of fstab, dump and fsck for additional info. Since this filesystem is not the root it should be 1 2.
 
  


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
how to format ntfs to ext3 in fc3 pranith Linux - Software 2 01-24-2005 03:10 PM
initrd to ext3 format alaios Debian 1 01-19-2005 08:57 AM
how to convert ext3 to ntfs? cannot even see ext3 partition parv Linux - Hardware 1 12-31-2004 03:56 PM
How to Format ext3 in Redhat??? Darrell22 Linux - Hardware 2 06-26-2004 08:18 PM
Format ext3 file system? mikeshn Linux - General 5 11-03-2002 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:31 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