LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Format NTFS to EXT3 (https://www.linuxquestions.org/questions/linux-software-2/format-ntfs-to-ext3-191754/)

Optimistic 06-09-2004 11:10 PM

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?

phase9 06-10-2004 03:25 AM

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

Optimistic 06-10-2004 08:56 AM

Excellent. Thank you.

Optimistic 06-10-2004 10:40 AM

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.

JJX 06-10-2004 10:46 AM

try this:
mkfs -t ext3 .....

If fails again try "whereis mkfs"

Optimistic 06-10-2004 10:54 AM

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.

JJX 06-10-2004 11:20 AM

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

... = hard disk drive ;)

r_jensen11 06-10-2004 11:27 AM

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.

Optimistic 06-10-2004 11:28 AM

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.

Optimistic 06-10-2004 11:51 AM

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.

bigrigdriver 06-10-2004 12:18 PM

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.

Optimistic 06-10-2004 12:40 PM

Thanks bigrigdriver. That worked perfectly.

michaelk 06-10-2004 12:48 PM

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.


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