Hard drive format for Linux?

Soldato
Joined
31 Dec 2006
Posts
7,224
Can Linux read any drive format? Or can it only read a certain type? FAT32, NTFS or something else? I have a Western Digital 250GB portable USB drive that I need to plug into a Linux system and put some files on it. Will it work or do i need to format the drive in a specific way?

:confused:
 
Can Linux read any drive format? Or can it only read a certain type? FAT32, NTFS or something else? I have a Western Digital 250GB portable USB drive that I need to plug into a Linux system and put some files on it. Will it work or do i need to format the drive in a specific way?

:confused:

It can read many formats. If the drive is going to be used exclusively under Linux, then go with EXT3. EXT3 is a journaling filesystem which is resistant to corruption.
 
Ext3 is EXCELLENT, you can even access it (albeit as EXt2 I think) from windows with a driver.
Linux can read almost any format you ever heard of, and many you have not (it'll read amiga floppies, and that IS weird, because Amigas formatted their discs with software downloaded from a crashed UFO or something LOL).

It's a bit fidgety with writing to NTFS, but apart from that absolutely ANYTHING goes.
 
So if i want to copy a whole bunch of files off the Linux system on to my drive, but with the option to access those files in Windows, then EXT3 would be best? How do i format the drive as EXT3 in the first place, and where can i get the driver that will let me access it in Windows?
 
Well if your main purpose is letting windows access it, and we're not talking about a linux system partiion, then just use FAT32.
Linux is quite happy to use fat32 for data drives, all my externals use it. But it cannot use it for it's system drives as they need proper unix filesystems with file permissions that work.

What exactly is your situation?
Making a new Linux install and wanting a shared drive that windows can see? Defo fat32.

Only limitation is 2GB (or is it 4GB) filesize limit.
 
What exactly is your situation?
Making a new Linux install and wanting a shared drive that windows can see? Defo fat32.

Only limitation is 2GB (or is it 4GB) filesize limit.
I basically need to get a whole load of files from my Uni computer (which is Linux) which i will be using on my my home one. I will be installing Linux on that anyway, and will likely just dump those files straight on to desktop drive for use in Linux on my home setup. But I want the ability to switch between Windows if necessary, as it's possible i'll need to jump between apps on both OS setups. I can't rule out the possiblity of VERY big files, as this is graphics/video related stuff.
 
http://www.fs-driver.org/

That's the windows driver for EXT2 (Ext3 is Ext2 with a journal added, you can access Ext3 as Ext2 no problems with that driver, accorind to my bro, he uses it extensively, he ports a lot of data around on externals which he formats with a tiny windows partition containing the driver installer, and the rest of it in Ext3).

You're doing this with an external drive or moving a drive from one box to the other?

To format then, work out what device the drive is (HD something for IDE, SD something for SATA/USB etc). And the partition number. Eg, let's say it's a portable USB drive and there are no other Serial drives attached, that makes it "sda" and you have one partion on it you want to format, so it would be "sda1".
Hence.
mke2fs -j /dev/sda1

(the -j makes it ext3)
Few other options in "man mke2fs" like telling it not to reserve gobs of drive space for the root user in emergencies, and messing around with anything you can imagine messing around with in a disc format, but the above will do the trick.

IDE drives, BTW are enumerated hda hdb hdc and hdd in the order pri-mast pri-slave sec-mast sec-slave (if there were no pri-slave, the sec-mast would be hdb)
 
Do it as fat32, there isnt really a partition size limit (windows likes to think its 40 gig or something but my mate here at uni has a 240gig partition on his removable drive...)

Anyway try something like mkdosfs -F 32 /dev/sda1 i think is the magic one just need dos tools installed onlinux and its all gravy)
 
Use NTFS. The NTFS-3g driver in linux is super stable and works a treat.
Having used the fs-driver under windows i would suggest against it when you use both OS's often. Any crash in Windows would make the drives unavailable in Linux until i restarted Windows first (among other problems).

I have a setup so that:
Windows - NTFS
Ubuntu - EXT3 for root and home (on seperate partitions) and the SWAP
Media - NTFS (on a 2nd and 3rd drive)
 
Ah missed the viedo work bit *feels a bit stupid*, i still vote against the ntfs drivers as one failed unmount kills the partition (which is no fun if you do it by accident or something). The windows ext3 method then would be the best, though remembering not to mount your root or boot partitions in windows ever! (killed a linux instal as windows didnt unmount it propperly which caused interesting amounts of data corruption)
 
Last edited:
Ah missed the viedo work bit *feels a bit stupid*, i still vote against the ntfs drivers as one failed unmount kills the partition (which is no fun if you do it by accident or something). The windows ext3 method then would be the best, though remembering not to mount your root or boot partitions in windows ever! (killed a linux instal as windows didnt unmount it propperly which caused interesting amounts of data corruption)
When you say it kills the partition, i'm thinking that's not an issue in my case as I have a totally separate drive dedicated to Linux. It's not on a partition. And the portable drive I have is not partitioned either. So is the best method is NTFS-3G as Kamakazie suggests, or EXT3 as Pingwing suggests?? I really don't know!
 
Ah missed the viedo work bit *feels a bit stupid*, i still vote against the ntfs drivers as one failed unmount kills the partition (which is no fun if you do it by accident or something). The windows ext3 method then would be the best, though remembering not to mount your root or boot partitions in windows ever! (killed a linux instal as windows didnt unmount it propperly which caused interesting amounts of data corruption)

I've had plenty of improper unmounts on NTFS drives under linux as well as many failed unmounts of ext3 drives in Windows and i have never had any data corruption or partition issues.
The only issue i had (as mentioned earlier) is that when Windows fails to unmount, it was necessary to restart in to windows so it could correct the issue before going back in to Linux. If i didn't reboot in to windows and shutdown/restart properly from tehre then the drive was unreadable in Linux.
 
Ah your so lucky! (laptop just didnt agree with me and i lost a linux install)

I forgot you mentioned an external drive so its probably not as much an issue but i still vote EXT3 as the windows drivers are pretty good and stable.

It does all depend on what distro your using too, im stuck using gentoo (no thanks to an old friend shwoing me the "right way" to do linux) and they never worked for me, but i have read prase for the ntfs-3g on ubuntu (and similar ones whihc are pre setup)
 
I will be using Ubuntu, so EXT3 seems like it could be the way to go.

This may be a stupid question, but seeing as I'm pretty new to Linux, I'm just wondering how exactly I go about formatting this external drive as EXT3? I know how Linux can sometimes be a bit perplexing for people like me so used to Windows, so just wondering if there's anything I need to know? Presumably I format within Linux, or can it be done from Windows? I have Vista x64 by the way.
 
Take a look back up at one of my earlier posts, it pretty much explains it step by step.

The "format" command in this case is
mke2fs (a nice simple shorthand for make extended2 filesystem (ext3 is just ext2 with journalling for safety).

Any time you need more info on something, just type "man" and the program name.

It takes a little while to get used to the layout of man pages, and to see how you actually use what they tell you, but the beauty of it is, once you DO get your head around them,, you're sorted because they are completely standard, and all work the same.
 
Linux partition manager?
It'll just be a frontend for cfdisk and mkfs anyway.

but generally, yes in both DOS and Linux, externals are treated as ordinary drives.

never did understand people wanting to fidget about with a mouse for ages when you can just tell the machine what you want it to do, it's probably what I like about linux really.

mke2fs -j /dev/sdd1

As long as you know what drive and partition you're using.

A good way to tell is to type......
ls /dev/sd
and press tab a couple of times
That will show all the serial discs and their partitions. Then plug the external in and do it again, instantly you can see what the actualy device is called.

One thing that annoys people new to Linux us being told to RTFM, mainly because, from a windows background most people consider manuals to be a waste of bytes, which many windows manuals are. The man pages on the other hand (once, as I said, you figure out the general way they look and work) really do tell you everything you need to use the program, from the most basic function to jedi level.

Example.........
In Windows, go to WMP's menus and bring up it's help pages.

Now in Linux, type "man mplayer" or "man xine" or man whatever media player is installed.


The reason I mention the manuals again is that there is at least one other option that needs to be investigated. When formatting in ext2/3, the format will leave a certain percentage of space unusable by anyone but root (or system level processes runnning as root),this is in case it's your / drive....not being able to write to / = seriously annoyed penguin. You don't need to reserve anything really on an external data drive, but leaving a tiny bit wont hurt, certainly not the massive amounts it wants to reserve by default.
something like 0.1% is enough.
I shall leave it as a challenge for the OP to run "man mke2fs" and ascertain how to specify the reserved space.
 
Back
Top Bottom