Winnie_The_Pooh

Junior Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору Мне часто приходится копировать NTFS-разделы с диска на диск. В том числе и с дисков с плохими секторами на новые диски. При копировании NTFS-раздела программами типа Partition Manager с диска с плохими секторами на новый диск, на новом диске также появляются плохие сектора. Так как при клонировании копируется и служебный файл $BadClus, хранящий информацию о плохих кластерах. Это не есть гуд. А как их убрать из скопированного раздела непонятно. Вот что я нашёл в гугле. - Svensson, Anders, Computer Forensics Applied to Windows NTFS Computers April 2005
см. п.3.2.11.3 в 2005-x-268 Computer Forensics Applied to Windows NTFS Computers.pdf, Hiding information in bad clusters Цитата: One of the reasons why this is not a well discussed topic might be the difficulties of marking and unmarking bad clusters. There is little information on the subject and Ive been unsuccessful in finding any tool doing this in an automated fashion. Well, how are clusters (un)marked in NTFS? The only information I have found about this is in the FAQ section on a website of a company developing computer forensic tools [Inet05]. A question about how clusters are unmarked in NTFS was asked in the FAQ and the CEO of the company gave the following answer to the question: “You could open the NTFS drive in WinHex and use the directory browser to list the clusters allocated to the system file $BadClus. These are the bad clusters. Individual sectors are not accounted for. Usually $BadClus has a size of zero, of course (=no faulty clusters). To unmark bad clusters, you would have to edit the FILE record describing $BadClus, i.e. at least the data runs and the file size, and you would have to mark the clusters as free (unallocated) in the system file $Bitmap.” Winhex is a hexadecimal editor developed by their Company. The answer make sense because the $BadClus is the NTFS specific metadata file that includes all bad clusters on the disk and the $Bitmap file is another NTFS metadata file and, as explained in 3.1.1.3, it contains a bitmap view of allocated clusters on the disk. | т.е. тут об отсутствии софта и о трудности (un)mark clusters in NTFS - X-Ways Support Forum: How do I mark sectors as BAD using winhex?
тут о трудности (un)mark clusters in NTFS - forum.linux-ntfs.org View topic - ntfsresize reports bad sectors (hardware failure)
тут уже теплее и с примерами о Reseting the bad sectors list after cloning - ntfsclone wiki.linux-ntfs.org
тут теория, как Reset the bad sectors list after cloning В результате вот что получилось. Предлагаются следующие шаги для обнуления/восстановления списка плохих секторов в NTFS. - нужен загрузочный диск с Unix на борту. его я взял методом тыка, случайно отсюда
- тут есть нужные нам команды ntfsinfo и ntfstruncate из пакета ntfsprogs.
- грузимся с этого диска, запускаем
ntfsinfo -i 8 <partition> где -i 8 указывает на служебный файл $BadClus, хранящий информацию о плохих кластерах <partition> = /dev/hda1, если диск ide, либо /dev/sda1, если диск sata как определить точно, с каким диском работать, я не знаю. я в юниксе не силён совсем. проще отключить на время все лишние винты. либо скажите команду, кто знает. - записываем на бумажку строчку после Dumping attribute $Data (0x80)... в самом конце Allocated size: ... 10-значное число должно быть
- ntfstruncate <partition> 8 0x80 '$Bad' 0
обнуляем атрибут 'Bad' - ntfstruncate <partition> 8 0x80 '$Bad' <ntfs_size>, <ntfs_size> из п.4
восстанавливаем атрибут 'Bad' - грузимся в windows и запускаем проверку диска, т.к. ntfstruncate оставляет после себя ошибки.
В результате имеем свою прежнюю винду и без плохих секторов. Что я и проделал успешно. Хочется загрузочный диск юникса размером поменьше, лучше образ дискеты. Чтобы был минимум команд. сам не сделаю - нет знаний. Тут пока молчат. Ну и конечно, было бы совсем здорово какую-нибудь софтину под винду, которая бы умела клонировать разделы NTFS с обнулением списка плохих кластеров. |