作業は Linux に接続して行った。
GPT では先頭の 34 セクタと末尾の 33 セクタにパーティションテーブルが記録されている。
ひょっとすると後で元に戻すかもしれないのでとりあえずバックアップを取っておいた。
dd if=/dev/sdc of=HGST_0S03539_GPT1.bin bs=512 count=34
dd if=/dev/sdc of=HGST_0S03539_GPT2.bin bs=512 skip=3907028955
次に、GPT を MBR に変更して、(最近のドライブは最適なアライメントに癖がある場合もあるので)念のため出荷時と同じ位置に NTFS のパーティションを作成しておいた。
Microsoft reserved partition については放置。
fdisk の場合 32bit 環境だとセクタ指定が 2^31 で溢れてしまうため、パーティション割り当ては parted を用い、id の振り直しのみ fdisk で行っている。
# parted /dev/sdc
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s
(parted) p
Model: HitachiG ST (scsi)
Disk /dev/sdc: 3907028988s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 34s 262177s 262144s Microsoft reserved partition msftres
2 264192s 3907026943s 3906762752s ntfs Basic data partition
(parted) mklabel msdos
Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be
lost. Do you want to continue?
Yes/No? yes
(parted) mkpart p 264192s 3907026943s
(parted) p
Model: HitachiG ST (scsi)
Disk /dev/sdc: 3907028988s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 264192s 3907026943s 3906762752s primary ntfs
(parted) q
# fdisk /dev/sdc
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS/exFAT)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.