Whats written in an unformatted new hard disk

Status
Not open for further replies.

hansraj

In the zone
Guys I was just wondering what is actually written in a brand new HDD. We know that 0 and 1 written in all the sectors across the HDD makes our data worthwhile and random 0 and 1 is written by varios security agencies to wipe out the old data but what happens in case of a brand new hd.

This doubt actually arose coz of the fact that in a full format or chkdsk the PC writes 0s to the bad sectors, then how does the OS know hereafter that this particular sector with 0 is the corrupt sector and not the 0 written because of some useful existing data.
 

Cool Buddy

Wise Old Owl
A new formatted hard disk has all zeroes on it. The OS doesn't identify the file by reading the zeroes & ones individually, it has a list of files on the hard drive & knows where each is located. Just removing the entry from this list is enough to make a file appear deleted (i.e. it will not show up in windows explorer). That's why a deleted file is often recoverable, because the area is not actually rewritten with zeroes but only the entry pertaining to that file from the file system's table is deleted.
 
OP
hansraj

hansraj

In the zone
@ cool buddy
lets assume that in a hard disk which was brand new, a file 1.doc has been written. Lets say, it occupied first 100 sectors in the hard disk. Then I copied another mp3 file which started from 101st sector till 345th sector. Now after 2 days i edited the 1.doc and its size came down from the orig size. This resulted in making 71st to 100th sector free in the hard disk. Now the question is

1. what will happen in 71st to 100th sectors data. Will they all become zeros or will they remain as they were earlier?

2. Will only the relevant entry in the table of contents in FAT get updated as regards to edited 1.doc is concerned(with 1 to 70th sector occupied) or 1.doc shall occupy a new place in hd, i.e 346th sector onwards?
 

Cool Buddy

Wise Old Owl
The file will remain in it's original position. The file system (NTFS) will be updated that 1.doc occupies sectors 1-70. 71 to 100 may remain the way it was. it will be rewritten only when you put in some other data. Now suppose when sector 71-100 are empty, you put in a file which needs 60 sectors. first half will be written in sector 71-100 and the remaining half in sector 346-375. the file system will have info about this fragmentation. this is what file fragmentation is. this fragmentation can be removed by running a disk defrag utility.
FAT was the older file system which is used today mostly in pen drives because FAT can be read with windows, mac, linux, every OS whereas NTFS can be read only by windows. NTFS has a master file table. This file table can be used to search for files without indexing the drives with the help of everything search.
 
Status
Not open for further replies.
Top Bottom