Tuesday, April 26, 2016

P-list and G-list .. where you can find your bad sectors

Hi all back with new article hope it useful for you.  Nowadays I install our data recovery lab in EG-CERT. You know you should learn more about tools you install especially if it likes from ACE Lab. During my study in DR in Scott Moulton course specifically some words stopped me I feel I must know more and more so if I learn I will share so let’s begin:
In HDD there are SA which is responsible for all info stored in it from manufacture what is G,P lists in it . We all know that SA has two lists called P-list and G-list. System area has many, modules as I described there. But what about these lists let’s know:
firstly we must know that the two lists contain bad sectors so what is bad sector? Why bad sector in G not in P? . Bad sector is a sector which is either unwriteable or inaccessible because of physical damage or any other failure so if we had a HDD has 100 sectors it will be :
0,1,2,3,4,5,6,7,8,9,10 ==> SA (system area) .
11,12,13,14,15,16,17,18,19,20,………………………90 ==> user data .
91,92,93,94,95,96,97,98,99. ==> reserved area or spare sector pool .
If sector from 11 to 90 is bad by any reason it will remapped by HDD translator to another sector from reserved area from 91 to 99. So say 51 is a bad sector it will remapped to 91. so user data in this area will 48,49,50,91,52,53 and so on user won’t know about this this is remapped by translator of HDD and you will see everything is normal but wait why two lists ?
P-list:
It is primary defect list which contains bad sector created after testing HDD at the factory when hdd is made it was tested by factory in this testing process bad sectors created so it will be in this list (P) but user never know anything about these bad sectors as it was remapped by translator to sector from reserved area and HDD is working good. testing must be made by factory but when you buy a hard disk 3 TB it will be 6 billion sectors if 1000 sectors are bad in P-list this is only small proportion of the total capacity . Remapping these sectors is done by translator as the above example :
11,12,13,14,15,16,17,18,19,20,………………………90 ==> user data .
91,92,93,94,95,96,97,98,99. ==> reserved area or spare sector pool .
 if sector number 13 is bad it will be marked in p list and  remapped to 92 so it will be :
11,12,92,13,14,15,16,17,18,19,20,…………………..90 .
so p list contains bad sectors which result from testing process at factory .
G-list:
It is grown defect list which contains bad sectors generated from life of your hard disk we all install, remove, read and write and so on. Bad sectors generally appear all the time but it can be fixed if not it will remapped to new sectors from reserved area and marked in G-list. but reserved sectors are limited so at some time some sectors will be marked as bad and there are no new sectors to be replaced and G-list will grow and grow, SMART will set a flag indicating check your disk, hdd will be slow so you need to recover these sectors or backup your data or keep hdd till you lose it and your data :P . Remapping these sectors like this as the above example:
11,12,13,14,15,16,17,18,19,20,………………………90 ==> user data .
91,92,93,94,95,96,97,98,99. ==> reserved area or spare sector pool .
during life of your hdd assume that sector number 19 is bad so it will be replaced by 98 like :
11,12,13,14,15,16,17,18,98,20,………………………90 .

You will notice that in p-list sector is shifted but in G-list sector is replaced for that reason there are two lists. you can recover data from sectors in G-list directly but in some cases can’t be recovered as recovery process has more values must be considered to recover data J  .
You can access these lists by special hardware like PC-3000.
Disk drive addressing LBA map and sectors here .

References :
1-                  https://www.mjm.co.uk/articles/bad-sector-remapping.html
2-                  https://en.wikipedia.org/wiki/Bad_sector
4-                  http://hdrconline.com/online_course_content.php







No comments:

Post a Comment