partclone.ntfs: ntfsfixboot.c VS shell script
Brought to you by:
thomas_tsai
Sample shell script code attached (plain text file) which uses standart Linux apps (grep, awk, dd, fdisk) to adjust NT boot sector.
Please, look at this sample code and compare with ntfsfixboot.c patch: what better fits for use with partclone.ntfs.
I do not claim this shell code is better in any way that ntfsfixboot.c patch, but i consider it reliable and successfuly use it with ntfsclone to restore windowsXP booting ability.
p.s.:
This is not a feature request, just simple request to comment. Also did not find better place to attach txt file.
sample
Thanks for sharing that.
I believe you can use all regular commands on GNU/Linux to make it. Even a binary data, you can use xxd to convert to text file, edit it, then convert back to binary data. This is definitely working. However, sometimes you need more options than a few lines commands, in this case, ntfsfixboot provides an alternative way to do that. Since in this case, not only sector, but also cylinder, and head number might need to be fixed, too.
Besides, ntfsfixboot also copies the whole boot sector to the backup sector at the end of the volume, instead of altering only the geometry parameters.
BTW, the sector number got from fdisk sometimes does not match that get from EDD, for MS Windows, the one get from EDD is better.