Saturday, July 4, 2015

What are File Systems and How to Open Linux Partitions in Windows


What are file systems?

As simply it is the system of Writing or Retrieving our data on/from a disk or flash drive or any other storage media in systematic way. If there is no file system, a hard drive will be only a disk with ones and zeros that can not be read by a computer because there is no way to find the data position.

Let's assume a Library with thousands of books. Normally in a library it has sections. like Science, History, Fictions, Novels etc. And in a particular section also there may be categorized sub section like Bio science, Electronic Science, Computer Science in Science section. In a particular sub section there may have a Rack or Racks with Rows and columns numbered which a particular cell get a unique combination. In a particular cell there may have 5 books. The librarian has a table of every book of the library describes in which section's in which sub section's in which rack's and in which cell is the book placed.

So if we go to this library and ask from the librarian about a book of "Beginning for Electronic circuits" she/he may look at the table and go through Science section and in Electronic sub section and find the book and locating where is the cell. So librarian will say to you "son, go to science section and then in electronic sub section.Then go to 3rd rack's AZ cell. The book you are finding is there.". So you can find the cell and get the book easily.



Let's assume a library that there is no sections, sub sections, racks or cells. And also there are no covers on the books. In any book. There are lots of books on a table without covers , without titles. You are going to find "Beginning for Electronic Circuits". A hard drive without a file system is also like that.

In a hard disk there are Sectors. It's a sub division of a track. What is a "track "? your hard disk is round shape. Draw a round hard disk on your mind and draw a circle inside that hard disk which is the focus is the same focus of the hard disk. So this circle is like a track in a hard disk. A sub  division of this track is called "Sector". In each storage media there is a predefined sector size. In hard drive the sector size may 512 bytes. But in newer hard disks use 4kB sectors. This sector size is fixed to a particular storage media. There are 2048 bytes for CD-Rom and DVD-Rom. Actually these sectors are like packets in networking. Small chunks of data. Sector is the smallest Physical data allocation unit.

And also there are Clusters in a hard disk. Here is the file system coming. Cluster is not like sector. It's size vary with each file system. But a cluster may have  one or multiple sectors inside it. Actually a Cluster made of multiple sectors (may be one sector). Let's get FAT 32 file system for 64MB volume drive..Then the cluster size is 512 bytes. That means on that cluster it contains only one sector. Cluster size for 32 GB volume FAT32 hard drive is 16 kilo bytes. That means there are 32 sectors inside the cluster. Like that cluster size will vary with the file system and the volume space that file system supports. Cluster is the smallest logical data allocation unit.

When data is writing to the hard disk it writes on to these clusters. Let's assume it will write a file on three clusters and half of the fourth cluster..The next file will not start to write on the fourth cluster's remained space. It will start to write from the fifth cluster. The space that not used in fourth cluster is called "Slack Space". These slack spaces will remain if a file size was not a factor of cluster size. To reduce this slack space cluster size should be small. But when cluster size is small the fragmentation and overheads will increase. Large cluster size reduce the fragmentation and overheads which cause for speed the read and writing.

 The important part of file system is File Allocation Table (FAT). It contains the attribute of the files, Sectors used for the file, starting Cluster position, number of cluster for the file, name of the file (directory entry), Offset and such fields. The hard disk find the location of a particular file is using this table. It's like the table used by librarian in that library example.

So i gave you the primary image of the relationship of hard disk and file system. So you may understand the role of the file system. There are different types of file systems. Windows supports like FAT, NTFS, ExFAT, HPFS. Linux supports ext (2,3,4), JFS, NTFS, NFS, minix. Linux supports windows file systems. So using Linux OS we can read and write windows partitions. But Linux EXT partitions cannot be read on windows OS. Windows not support to that file system.

We would mostly have to face to situations that need to read write and execute the files on linux partitions in Windows. If you are dual booting from Windows and Linux you may need to access Linux partition while you have booted from windows. In that case we need to have the softwares of following listed.

NOTE : Following software discription taken from Howtogeek.com

Ext2Fsd

Ext2Fsd is a Windows file system driver for the Ext2, Ext3, and Ext4 file systems. It allows Windows to read Linux file systems natively, providing access to the file system via a drive letter that any program can access.
You can have Ext2Fsd launch at every boot or only open it when you need it. While you can theoretically enable support for writing to Linux partitions, I haven’t tested this. I’d be worried about this option, myself – a lot can go wrong. Read-only support is fine, though, and doesn’t have a risk of messing anything up.
image
The Ext2 Volume Manager application allows you to define mount points for your Linux partitions and change Ext2Fsd’s settings.
image
If you didn’t set Ext2Fsd to autostart at boot, you’ll have to go into Tools –> Service Management and start the Ext2Fsd service before you can access your Linux files. By default, the driver automatically mounts and assigns drive letters to your Linux partitions, so you don’t have to do anything extra.
image
You’ll find your Linux partitions mounted at their own drive letters in Windows Explorer. You can access the files on them from any application, without the hassle of copying files to your Windows partition before accessing them.
image
This partition’s file system as actually EXT4, but Ext2Fsd can read it fine, anyway. If you’re looking for your personal files, you’ll find them in your /home/NAME directory.
image

DiskInternals Linux Reader

Linux Reader is a freeware application from DiskInternals, developers of data recovery software. In addition to the Ext file systems, Linux Reader also supports ReiserFS and Apple’s HFS and HFS+ file systems. It’s read-only, so it can’t damage your Linux file system.
Linux Reader doesn’t provide access via a drive letter – it’s a separate application you launch to browse your Linux partitions.
image
Linux Reader shows previews of your files, making it easy to find the right one.
image
If you want to work with a file in Windows, you’ll have to save the file from your Linux partition to your Windows file system with the Save option. You can also save entire directories of files.
image

Ext2explore

It’s an open-source application that works similarly to DiskInternals Linux Reader — but only for Ext4, Ext3, and Ext2 partitions. It also lacks file previews, but it has one advantage: it doesn’t have to be installed; you can just download the .exe and run it.
The Ext2explore.exe program must be run as administrator or you’ll get an error – you can do this from the right-click menu.
image
To save some time in the future, go into the file’s properties window and enable the “Run this program as an administrator” option on the Compatibility tab.
image
As with Linux Reader, you’ll have to save a file or directory to your Windows system before you can open it in other programs.
image


 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


So those are the Softwares you can use to read,write and execute the files on Linux partitions. I got use of Ext2fsd to open cctv footages on a DVR to delete some footages..hah hah ;D Some tools are like came from heaven when we got troubles. ;-) 






















No comments:

Post a Comment