Sunday, December 21, 2014

Setting NTFS volume serial number

Source: some site on the net.

Using dd to set or get serial number of a NTFS volume:

assuming taget volume is "sda1" and serial number is stored at file named "serial"

set serial: dd if=serial of=/dev/sda1 bs=1 count=8 seek=72
get serial: dd if=/dev/sda1 bs=1 count=8 skip=72 | hexdump -C

There were a warning also which mentioned
(1st) this method doesn't update the NTFS backup boot sector (which should be last sector of the volume)
(2nd) this may affect the parent/child relationships of the objects in the NTFS volume, so it may not be safe to use on volumes that contain data (not newly formatted).

Speaking of backup partition boot sectors (PBR) unlike NTFS, FAT32 backup PBR is located at 6th sector.

No comments:

Post a Comment