New
#21
You can change partition types back and forward - it doesn't affect the partition contents at all as you are updating the partition table not whatever is written to the disk in the partitions location. You could in fact delete the entire partition table and recreate it and you would not lose any data as long as when you recreate it you put in the same start and end positions.
Anyway, assuming you want to set partition 4 to recovery then you can do is as @Bree mentioned earlier - i.e.
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
Here I change mine to MS Basic data and back... You can see when type is set to MS Basic Data type (ebd0a0a2-b9e5-4433-87c0-68b6b72699c7) you get the "no volume associated with this partition" message as there is no letter assigned. You don't get this message when it is Recovery type as the OS doesn't expect the recovery partition to be mounted.
Code:PS C:\Windows\system32> diskpart Microsoft DiskPart version 10.0.15063.0 Copyright (C) Microsoft Corporation. On computer: MACBOOK DISKPART> sel disk 0 Disk 0 is now the selected disk. DISKPART> sel par 1 Partition 1 is now the selected partition. DISKPART> det par Partition 1 Type : de94bba4-06d1-4d40-a16a-bfd50179d6ac Hidden : Yes Required: Yes Attrib : 0X8000000000000001 Offset in Bytes: 1048576 Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- * Volume 1 Recovery NTFS Partition 450 MB Healthy Hidden DISKPART> set id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 DiskPart successfully set the partition ID. DISKPART> det par Partition 1 Type : ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 Hidden : No Required: Yes Attrib : 0X8000000000000001 Offset in Bytes: 1048576 There is no volume associated with this partition. DISKPART> set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac DiskPart successfully set the partition ID. DISKPART> det par Partition 1 Type : de94bba4-06d1-4d40-a16a-bfd50179d6ac Hidden : Yes Required: Yes Attrib : 0X8000000000000001 Offset in Bytes: 1048576 Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- * Volume 1 Recovery NTFS Partition 450 MB Healthy Hidden DISKPART>