Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] reformat linux partition

Status
Not open for further replies.

ninju

Full Member level 3
Joined
May 14, 2011
Messages
188
Helped
49
Reputation
98
Reaction score
48
Trophy points
1,308
Activity points
2,398
I have a fedora 14 with xp as the main os. I use both of them regularly. The problem is, the xp is in NTFS and linux is in ext4. I've searched and have been unable to find a credible software which can read ext4 from windows. So, is it possible to reformat the ext4 to ext2 without the loss of fedora or any data in it?

i can't move the existing data from the drive to any of the windows drives as they are all short of memory,nor do i want to reinstall fedora on a fresh ext2 partition.


thanks
 

Even if you find such a tool I would back up the data first. If such a tool exists ( which I doubt) it cannot possibly be prepared to deal with power loss unless it generates backups internally.

But if you have to back up anyway then the simple path (which I would definitely use)

1) back up
2) reformat
3) put back on

also works.

Alternatively, if there is not too much data. Shrink the partition, split it, install ext2 on the free part, copy data, erase ext4 and extend ext2.
 
Last edited:

there's far too much data to be handled by any back up medium. nearly 120 GB of data. So, thats ruled out. Can't buy a new external storage just for this.
 

there's far too much data to be handled by any back up medium. nearly 120 GB of data.
How about external USB hard drives? Even small external USB hard drives should be able to handle this.
So, thats ruled out. Can't buy a new external storage just for this.

You should buy external storage. Unless your data is more or less worthless. 25 DVDs would be a slightly more painful alternative.

Again, attempting altering a file system which contains data without backup should only be considered if losing all your data would not upset you.
 


@iyami. perhaps you can help me out by buying a new external harddrive for me. i told in my first post specifically that i wanted, if possible, a method to reformat without data movement besides, i have a large number of small files (1kb or 2 kb). I've observed that allocating an address to these small files takes a longer time than copying these files.

@yadavvlsi i've been through these links long ago and i came to this forum as a last resort. ext4 reader from windows are all in their nascent state. Existence of a ext2 reader is the only reason i want to shift to ext2 from ext4. are you aware of any ext4 reader from windows?
 

@iyami. perhaps you can help me out by buying a new external harddrive for me. i told in my first post specifically that i wanted, if possible, a method to reformat without data movement besides, i have a large number of small files (1kb or 2 kb). I've observed that allocating an address to these small files takes a longer time than copying these files.

You are weird. My point was that even if such a method exists it cannot be safe unless
there is enough space for backups anyway. Your 'buy me a hard drive' is quite funny. I let you decide what matters more to you your data or the money you would need for a hard drive.

@yadavvlsi i've been through these links long ago and i came to this forum as a last resort. ext4 reader from windows are all in their nascent state. Existence of a ext2 reader is the only reason i want to shift to ext2 from ext4. are you aware of any ext4 reader from windows?

People trying to help do not know what you have read already. Did you understand the part about Fedora 14 + Ext2 => problems?
 

Everybody is trying to explain to you that by using any partitioning utility you risk loosing your data, it is up to you if you care or not.
I have seen many utilities that can change a partition format of windows but I haven't seen any that can do the same for linux partitions.
The linux file system can be damaged even by trying to resize it (I've tried using Acronis, Paragon partition expert etc.)
Then only program I found that can copy, move, resize etc a linux partition is GParted , it is free , works with all partition types but I haven't seen any filesystem modify option.
I'm not even sure if your OS will continue working in a different file system.

Alex
 

what we use can be called fedora 14 only in name. The original had been extensively modified and it is running successfully on ext2.

@alexan_e: yeah, when the file system is changed, the os might not work. Forgot about this problem.
have you tried gparted?if so, plese tell your experience.
 

I have only worked with Gparted to create, resize EXT3 partition or copy an existing linux OS from a small HD to a larger one (swap file+EXT3), it worked fine for me.
I have used a bootable media, parted magic is a nice one and includes many other application.
The list of included applications in

Alex
 
Last edited:
  • Like
Reactions: ninju

    ninju

    Points: 2
    Helpful Answer Positive Rating
https://ext4.wiki.kernel.org/index....ifference_between_ext2.2C_ext3.2C_and_ext4.3F

*****
What is the difference between ext2, ext3, and ext4?

The ext2, ext3, and ext4 file systems are a family of file systems that have a strong amount of backwards and forward compatibility. In fact, they can be considered a single filesytem format with a number of feature extensions, and ext2, ext3, and ext4 are merely the names of the implementations found in the Linux kernel. This way of looking at things is supported by the fact that they share the same userspace utilities (e2fsprogs), and that many filesystems can be mounted on different filesystems. For example, a filesystem which is created for use with ext3 can be mounted using either ext2 or ext4. However, a filesystem with ext4-specific extensions can not be mounted using ext2 or ext3, and the ext3 file systems code in the kernel requires the presence of a journal, which is generally not present in partitions formatted for use by the ext2 file system. The ext4 code has the ability to mount and use a filesystem without a journal.
*****

and

*****
Can I mount existing Ext3 as Ext4? And vice versa? Similarly from Ext2 to Ext4 and its reverse?

With recent versions of ext4 (2.6.29 and later), you can mount any ext2 or ext3 filesystem as ext4 without any changes. You must use tune2fs to enable the new ext4 features:

# tune2fs -O extents,uninit_bg,huge_file /dev/DEV
# e2fsck -f /dev/DEV

If you want to create a journal on an ext2 filesystem that you have mounted as ext4, you must also issue the command:

# tune2fs -j /dev/DEV

Once you have enabled extents a former ext2 or ext3 filesystem, it is an ext4 filesystem and cannot be reverted to the old format.

If you have created a journal on a former ext2, it can be removed if it needs to be reverted to ext2:

# tune2fs -O ^has_journal /dev/DEV

Some ext4 features cannot be enabled on an existing ext3 filesystem.

See the Ext4 Howto for more details.
*****
 

AFAIK There is no tool to reformat EXT-4 to EXT-2 without any data loss. You have 100% data loss in this case.
Now If the OP (@ninju) doesn't want to buy a External storage then he can use a Network share or On-line storage if he likes so.

@iyami, You are very correct but remember Once you create a partition in EXT-4 it cant be degraded to 2 and 3.
Upgrade of 2 and 3 to 4 is possible though.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top