Jump to content
twinair

Formatting an EXT3 disk in Windows

Recommended Posts

Yo,

 

I have a windows server that has a disk in in with a previously installed Ubuntu distro, disk is formatted EXT3.

I can't get windows to format it, or even delete the partitions.

It does see it in disk manager though.

Most of my Googling has returned answers along the lines of remove the disk and plug it into a Linux box then do it that way, or even to boot the current Windows machine using a Linux CD and delete the partition that way.

I'd rather not bring down the current Windows machine unless it is completely necessary, so looking for a way to do it while Windows is live.

 

Anyone have an idea?

Share this post


Link to post
Share on other sites

No matter what, you'll have to reboot win after formatting.

 

I can only find a reader(LinuxReader),

 

Your ubuntu cd or PartedMagic on a stick, would be my way.

 

GNU/Linux is fast at formatting.

 

And it would only take a few minutes to delete the partition. The reboot back to windows to do the creating and formatting of the raw partition.

 

I'm interested on how you get this job/task done with out rebooting.

 

Regards Glenn

Share this post


Link to post
Share on other sites

GlennsPref: Don't see why you'd have to reboot after formatting...

 

What happens when you try to delete the partition(s)? Any errors?

What about diskpart clean?

If it's a SATA disk, could you just hotplug it and put it in another machine to format?

Edited by lew~

Share this post


Link to post
Share on other sites

It won't let you format it? Odd. Never tried that in windows myself, but don't see why it can't even delete.

 

Anyway, grab a copy of Gparted, or if you have any linux discs/images laying around, boot from one of them and use the partitioning tool to delete it. Do you have anything at hand? Even UBCD would have what you need.

Share this post


Link to post
Share on other sites

What version of Windows Server is it running?

 

If it's 2003 or higher, you should be able to use DISKPART to "clean" the disk.

 

Drop to a command prompt, type DISKPART. In the DISKPART utility, type "LIST DISK" to show a list of hard disks attached to the machine, each with a number.

 

Type "SELECT DISK x", where x is the number of the disk you want to clean, then simply type "CLEAN".

Share this post


Link to post
Share on other sites

Now come on, I thought Windows was supposed to Just Work™.

 

I think you're confusing the terms disk and partition. Unless of course, you did the extra-unusual step of abandoning the idea of a partition table and went and formatted the entire disk EXT3, which would be why Windows is so confused. (It'll be expecting a MS-DOS disklabel there.)

 

The thread title made me wonder if you weren't trying to format a disk partition as EXT3.

 

The EXT3 partition, when residing in a MS-DOS disklabel (typical of most IBM clone installations) typically will be marked as partition type 0x83 (Linux FS), 0x8e (Linux LVM) or 0xfd (Linux software RAID). Windows will not recognise this by default, and therefore will not attempt to mount the volume on a drive letter. If I recall correctly, in order to format it, it needs to be mounted in some way. (This is in stark contrast to Linux, where you need the device to be unmounted.)

 

Windows only recognises FAT volumes (0x04, 0x06, 0x0b, 0x0c, 0x0e or 0x0f), extended partitions (0x05), or NTFS/HPFS (yes, they use the same partition type; 0x07). You will need to change the partition to be one of these recognised types (except extended) before it will recognise it. Catch is, I do not believe Windows gives you that ability — end users aren't supposed to know about this sort of thing.

 

Therefore your easiest course of action will be to blow away the partition first and create afresh. You should be able to do this in Disk Management. Right-click on "My Computer" and select Manage. From there, locate the disk manager applet, it should load up and display your drives, each with the partitions contained within. Right-click on offending partition and select "Remove".

 

It should hopefully comply, and you'll be left with space to place the new partition by a similar method. Once created, you should then be able to mount the empty volume on a drive letter and format it in the usual manner.

Share this post


Link to post
Share on other sites

Therefore your easiest course of action will be to blow away the partition first and create afresh. You should be able to do this in Disk Management. Right-click on "My Computer" and select Manage. From there, locate the disk manager applet, it should load up and display your drives, each with the partitions contained within. Right-click on offending partition and select "Remove".

 

It should hopefully comply, and you'll be left with space to place the new partition by a similar method. Once created, you should then be able to mount the empty volume on a drive letter and format it in the usual manner.

 

This is what I was visualising, and wondering why it wasn't working. Teach me to assume too much.

Share this post


Link to post
Share on other sites

Have you tried right clicking the disk itself (not the partion, but the area to the very left) and "Initialise Disk" or something to that affect?

 

If RedHatter is right, and the disk lacks partition table, this is the usual way of creating one. Bare in mind that it'll blow away everything on the disk.

 

Rob.

Share this post


Link to post
Share on other sites

Some good info here.

 

Okay, I can mount the drive. I can view its file system in Windows. (Server 2008 R2, btw.)

 

It is when I go to delete the EXT3 volume and reformat it as NTFS when things go tits up.

If I open disk manager, I can delete the partition, then it shows it as unallocated. When I go to create a new one, the moment it attempts to format an error is thrown up.Two caps below, before and after.

Posted Image

 

I did run DISKPART to clean the disk, this left the disk in an 'unallocated' state, then I was back to square one when it reverts back to an EXT3 partition, couldn't format it. As is depicted above.

 

I can use a *nix boot disk, or UBCD...but that detracts from my original statement whereby I would like a solution that doesn't involve me bringing down the Windows server. Which is a Hyper-V box hosting many other servers.

It is not that critical, but rather than just say "Fuck it, you win, I will shut you down and insert you into a Linux environment so as I can delete your bastard of a partition" I would like to find a way...it is the Atomic way, not to give in.

 

 

Oh and don't get me started on shouldn't Windows just work.

It was Linux that got me into this mess in the first place.

The reason it is now in a Windows box is because I got sick and tired of having to execute a mountain of code just to execute basic tasks...you know, like installing drivers and or applications :p

Edited by twinair

Share this post


Link to post
Share on other sites

I did run DISKPART to clean the disk, this left the disk in an 'unallocated' state, then I was back to square one when it reverts back to an EXT3 partition, couldn't format it. As is depicted above.

This bit is confusing, I wonder how the disk keeps "reverting" to having an ext3 partition?

 

The CLEAN command should leave the disk, as you say, unallocated. You then use Disk Manager to create a partition (or Simple Volume) and format it.

 

Are your new, unformatted partitions coming in as being identified as ext3?

Share this post


Link to post
Share on other sites

Are your new, unformatted partitions coming in as being identified as ext3?

Only on that particular disk.

Yes, it is weird, isn't it?

Share this post


Link to post
Share on other sites

Okay, a left-field solution. Hook the physical disk up to a virtual machine running on the Windows 2008 host, and boot a Linux CD in that to do the partitioning.

 

It seems Microsoft once again fails at doing something it ought to be able to do trivially.

Share this post


Link to post
Share on other sites

I will try that actually.

 

Yeah, see, I would have thought the hard bit would be Windows recognising the partition in the first place. But no, I can browse the Linux file system and even copy/paste files to and from it within Windows.

Deleting the partition I thought would be the easy bit...but no.

Share this post


Link to post
Share on other sites

Are you able to reinitialise the disk from Disk Management in Windows? You may need to take the disk Offline first.

Share this post


Link to post
Share on other sites

Yep, tried that.

As it turns out, the disk is borked.

created an Ubuntu VM, mounted the disk within that VM, no dice.

I eventually caved, brought everything down. Put in an Ubuntu CD. Deleted the volume, created a new one, tried to format it as FAT32, just so as Windows would see it. Didn't want to format. Tried, EXT2, EXT4, no go.

I opened the lid of the box after I shut it all down....the disk was cold as ice, not even warm. Very weird, considering Windows and Ubuntu could see the physical disk, but just couldn't format it.

I've tried everything....it seems the disk is fooked. Which it wasn't when I originally shifted it. Bad timing and strange happenings.

 

So it is now in the bin :)

Share this post


Link to post
Share on other sites

lew~ said...

GlennsPref: Don't see why you'd have to reboot after formatting...

I thought you had to to rewrite the changed specs to the disk record (partition table).

 

Most disk/partition managers I use(, not M$) require rebooting after changes to the partition table.

 

;-) Glenn

Share this post


Link to post
Share on other sites

I am having this exact same problem. A disk was initially set up with two EXT3 partitions and a linux swap space partition and works fine as such. I can delete the partitions in windows 7 disk management (yielding unallocated space) but as soon as I reformat to NTFS it will chug away for about 20mins, then fail. The disk then reverts back to EXT3 even if it was recognised as unallocated space before the format was attempted! I am sure there is more to this problem than the disk simply being f*cked.

 

At this stage I suspect the ext2fs driver I have installed in win7 is causing the problem (even if the drive is not mounted by the ext2fs explorer software).

 

-zoldrin

Share this post


Link to post
Share on other sites

I am having this exact same problem. A disk was initially set up with two EXT3 partitions and a linux swap space partition and works fine as such. I can delete the partitions in windows 7 disk management (yielding unallocated space) but as soon as I reformat to NTFS it will chug away for about 20mins, then fail. The disk then reverts back to EXT3 even if it was recognised as unallocated space before the format was attempted! I am sure there is more to this problem than the disk simply being f*cked.

 

At this stage I suspect the ext2fs driver I have installed in win7 is causing the problem (even if the drive is not mounted by the ext2fs explorer software).

 

-zoldrin

Uninstall driver, reboot, format now successful. Cannot say for sure if it was the driver or simply reboot. To original poster - did you have such a driver installed also?

Share this post


Link to post
Share on other sites

I am having this exact same problem. A disk was initially set up with two EXT3 partitions and a linux swap space partition and works fine as such. I can delete the partitions in windows 7 disk management (yielding unallocated space) but as soon as I reformat to NTFS it will chug away for about 20mins, then fail. The disk then reverts back to EXT3 even if it was recognised as unallocated space before the format was attempted! I am sure there is more to this problem than the disk simply being f*cked.

 

At this stage I suspect the ext2fs driver I have installed in win7 is causing the problem (even if the drive is not mounted by the ext2fs explorer software).

 

-zoldrin

Uninstall driver, reboot, format now successful. Cannot say for sure if it was the driver or simply reboot. To original poster - did you have such a driver installed also?

 

I know it's a long time since anyone wrote anything on this thread, but I can confirm this. I had the same problem as the postee of this thread. I also had the ext2fsd-drivers installed. I uninstalled it and then tried formatting it again. Successfull!

 

My initial problem was that my Linux distro(OpenSuSE 12.3), did not want to partition/delete one of two discs containing an older SuSE distro(SuSE 11.3). I was logged in as $USER, opened YAST as usual by giving root-password. I could delete and repartition on one disc, but not the other. But I have a feeling that one has to be logged in as root to do some jobs in SuSE, and not just do a sudo or su.

Edited by oopsypoo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×