1 [[!meta title="Change partition type without reformatting"]]
2 [[!meta date="2011-01-02 17:29"]]
3 [[!meta author="rohieb"]]
4 [[!meta license="CC-BY-SA 3.0"]]
6 Note to myself: it is possible to change the partition type of a already
7 formatted (and used) partition. For example, if you have already
8 formatted the partition with NTFS, but accidentally had created it with
9 partition type `0x83` (Linux), so Windows can’t read it, since it expects
10 `0x07` (HPFS/NTFS). On Linux, you can use sfdisk for that purpose:
13 # dd if=/dev/sdb of=sdb-bootsector count=1 # backup boot sector
14 # sfdisk -d /dev/sdb | sed -e 's/Id=83/Id=07/' > /tmp/sdb.txt
15 # sfdisk /dev/sdb < /tmp/sdb.txt
17 (fill in the right values for your case)
19 Of course, good old fdisk works also, use the `t` command.
21 [(Source)](http://serverfault.com/questions/46758/can-you-change-the-partition-type-on-a-linux-server-without-starting-up-fdisk/46840#46840)
23 [[!tag hacking howto useless_bits_of_information fdisk Linux
24 Master_Boot_Record NTFS partition partition_table partition_type