Latest Articles

Unhide the Recovery Partition on a Basic Disk with DiskPart.

This quick step guide describes how to unhide the OEM/Recovery partition on your hard drive. It was tested on a Windows Vista machine with a Basic disk.

DiskPart command line systax and parameters can be found here.

Unhide Recovery Partition

  1. Start Disk Management (diskmgmt.msc) on your computer and take a closer look at your hard disk. Note the disk number and the partitions.
  2. Start DiskPart and select your disk: DISKPART> select disk 0
  3. List all partitions: DISKPART> list partition
  4. Now, select the hidden partition (see step 1) DISKPART> select partition 1
  5. Type DISKPART> detail partition and verify that it is hidden. Remember the Type value, this will be handy if something goes wrong.
  6. Set the type of the hidden partition to 07. Type DISKPART> set id = 07 override
  7. If everything goes ok, you will receive the following message “Diskpart successfully set the partition ID.
  8. All done. Type Exit to close DiskPart.
  9. Check the Disk Management to see witch drive letter has been assigned to the recovery partition.

List of partition types:

07 = Windows NT NTFS, 17 = Hidden, 27 = OEM Recovery


– Marek.Z

About Marek (280 Articles)
Marek is an IT professional with 14+ years of experience in the IT industry and is currently working as PSO Senior Consultant SDDC at VMware for the NEMEA region.

69 Comments on Unhide the Recovery Partition on a Basic Disk with DiskPart.

  1. Thankyou for great tips.

  2. hi..
    i was unhiding oem recovery partition so i entered id 07 instead if id 27 in dispart.
    so now the window wont start it says press ctrl+alt+delete to restart always.
    what shou i do?

    • Hi,

      First, I’m sorry for late response and quite unfortunate you made that typo when unhiding the OEM partition. You can solve this issue with Bootrec.exe tool located on the Windows DVD. For detailed instructions please read the Microsoft KB927392 article.



  3. Very nice post, bro! May be next time you will discover topic deeper?

  4. NICE! You should train those IDIOTIC Sony support reps. They know nothing. They told me there is no way to do this without wiping my entire hard drive clean. They are morons.

  5. unfortunatly i deleted my recovery hdd how to recover this partion i don’t know what ar4 the things inside it??

  6. GREAT THANKS!!! Very helpful for dummies like me…

  7. Sourabh // 6 May, 2013 at 14:38 // Reply

    Hey i am following all these steps you told, but it is showing a message in the end ” The specified type is not in correct format”

    Plz help me out.

    thank u in advance

  8. “List of partition types:

    07 = Windows NT NTFS, 17 = Hidden, 27 = OEM Recovery”

    can you please tell me the GPT equivalents.

  9. My OEMBP partition isn’t showing up in “My PC” still. I’m trying to unhide it so I can delete it. I formatted my drive to get everything off it but the partition still remains, and it still hidden even after changing it to “07”.

    What should I do?

  10. i have resized my d drive and after that the recovery partition is not accessible and now i can’t re instal windows from it .
    is there is any tool can help my to get it work again.

  11. thanks. my dad gave me a 160GB hard drive which I use for torrent files, and there was a 20GB lenovo partition that had a whole whackload of exe files with random names, i’m currently in the process of formatting the partition to expand my torrent partition or my data partition. the files were from 2007!

  12. Dear Marek
    I Lost My 2 Partition,s From Diskpart Using clean command Plz Tell How To Recover These Partition,s With My Important Data……..PLz Help

  13. Will this work for asus laptop with windows 8?

    • Yes, I think so. Windows 8 comes with DISKPART so you should be able to do it. Just remember to run DISKPART as an administrator.


  14. Just what I was looking for to the point step by step instructions. Was able to recover my recovery partition and move to new drive. Not sure why I was not able to clone the drive but your article worked for me and now I have what I had before the problems started thanks.

  15. Hi Marek,

    after cloning from a 256GB SSD to the next bigger SSD and some partitioning to make it adopt the new size windows won’t boot.

    From a PE I can see that my drive C is marked “hidden”. I tried to run ‘set id=07 override’ but the console just throws me: “The specified type is not in the correct format. For more information on the command type: ‘HELP SET'”

    The SSD has GPT/GUID Layout and the Machine boot’s Linux&[M|H]ac(k)OS just fine in UEFI mode. It’s only Windows that refuses to boot!

    Can you give an hint?

  16. Fixed it using linux from USB, changed the type rebooted and after windows applied some fixes it works like a charm…

  17. Hey marek. I’m trying to upgrade a DELL laptop by replacing the 500GB HDD with a 120GB SSD. I’ve cloned over partitions from a PBD recovery image in EaseUs Todo created from the HDD; though in DISKPART the partitions are listed as Extended, Logical and Primary whereas the HDD had OEM, Recovery, etc; one of the partitions itself being a recovery image (~12GB large).

    My plan was to clone the OEM and recovery partitions to the SSD, use the remaining space on the SSD as the primary… reboot then execute recovery from the SSD… however when I attempt to boot into the Windows Boot Manager.

    I’m trying to figure out what the best way to proceed is.

    Do I…
    A) delete all the partitions on the SSD, launch diskpart in WinPE and create the partitions before attempting to restore to them? I don’t think this will work because the hidden partitions on the HDD would be flagged read-only?
    B) is there a way to set the ID’s using DISKPART and information from technet:

    EFI system partition: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
    Microsoft Reserved partition: e3c9e316-0b5c-4db8-817d-f92df00215ae
    Recovery partition: de94bba4-06d1-4d40-a16a-bfd50179d6ac

  18. Hi,

    Basically, do you need the data on the old partition? If not, I would clear the SSD and install Windows on it. The setup will create the partitions automatically.

    Hope this helps.

  19. Jose Orozco // 30 January, 2015 at 23:19 // Reply

    Marek, I’m using Diskpart version 5.1.3565 on Windows XP 32-bit w/ SP3. This version of the tool doesn’t have a set command. It details my partition as “Type: 17, Hidden: Yes” but “There is no volume associated with this partition.” – Do you know what options I might have to unhide this partition? Open-source? Or an updated diskpart that can work on WinXP?

  20. Joshua Conde // 22 April, 2015 at 01:33 // Reply

    I am trying to unhide my reserve partition in Windows 8. I am going to move it to my C: because updates are not able to install because of lack of space (so im told). I was informed if i was not going to use Bitlocker i would not need a reserve and could thus move the files to my C:, Boot files and all. I am having trouble unhiding it as i have said. I get this information:

    Partition 3
    Type: e3c9e316-0b5c-4db8-817d-f92df00215ae
    Hidden: Yes
    Required: No
    Attrib: 0X8000000000000000
    Offset in Bytes: 420478976


    The specified type is not in the correct format.

    I would either like to resize the partition or just move the files and delete it so my updates can install, As now they are saying “Cannot make changes, Undoing changes” When updating. I have tried SEVERAL third party partitioning tools and NONE have allowed me the option to resize the partition in question. Any and all help would be GREATLY appreciated.

  21. naseer marwat // 6 May, 2015 at 21:06 // Reply

    dear sir i am making recovery partiton but its not make and i try too much but i dont know why u can help me sir plzzz

    • Hi,

      Are you trying to create a recovery partition? This blog post is about removing one…

  22. // 7 May, 2015 at 20:25 // Reply

    dear sir i am forward the cmd line which is i am traying to making the partiton but its not create by mee i dnt know why u can help me sir plz
    select disk 0:
    create partiton primary size=16000
    format fs-ntfs quick label=recovery
    set id-27
    assign letter-r
    create partition primary size-300
    format fs-ntfs quick label-system
    assign letter-s
    create partition primary
    format fs-ntfs quick label-windows
    assign letter-c

    • Hi,

      What windows version are you using? Is the DiskPart syntax correct? There may be some changes in other Windows versions. This blog was written for the Windows Vista OS. Unfortunately I am not able to test it on other system at the moment so I suggest you try the Microsoft community forum (

      Hope this helps.

  23. How to convert type e3c9e316-0b5c-4db8-817d-f92df00215ae to de94bba4-06d1-4d40-a1a6-bfd50179d6ac

    while doing command set id=de94bba4-06d1-4d40-a1a6-bfd50179d6ac

    i am getting error

    “Virtual Disk Service error:
    This operation is not supported on MSR partitions.”

    Please help i accidently done it , i want to revert back

  24. Hi i badly needed your help…
    I was going to format and part my flashdrive but accidentaly chosen drive d.. what should i do?
    Can i still recover my files from drive d?
    Help me please

    • Hi Ron,

      Did you already committed the changes? If so, you’ll need a data recovery software to get your data back.

      Hope this help.

  25. Hi Ron,
    Can you help me? i try to reinstall windows 8 but there is no partition on windows setup.
    and when I’m using diskpart then list disk, it said “There are no fixed disks to show”

    I have no idea how to fix it T-T


  26. This worked, I now have a much needed free 25gig fat32 partition that I can now use for Acronis Image files.

    One stupid question though, how can i get it hidden again and have it work with the boot key? I saved all the files on a thumb drive just in case i ever give away the computer, the person can restore it again with the OEM’s F9 key.

  27. Thanks Marek, you been a great help;

    So I would repeat the process with…
    set id = 17 override

    I googled (re-hide OEM partition) and someone said set it to 12.

    but anyway, I will give 17 a try. Thanks again

    • Yes, that’s what I assumed. But check the Windows ID’s depending on your OS version. They may changed it.

      Good luck!


  28. Yes 17 works on windows 10…

    set id = 7 override un-hides it

    set id = 17 override hides it again

    Thanks Marek!

  29. Hello, I have a question: Is there anyway to recreate an OEM partition? I have 8.01GB of unallocated space because I accidently deleted the OEM partition using diskpart. That partition was dedicated to Intel Rapid Start techonology an I would like to have it back so I can configure it again and make it work. I’m on GPT format

    • Hi,

      If you haven’t commit any changes, you should set the flag 27 back on the partition. Otherwise reinstall I think…


  30. i am having a windows 8.1 single language x64 os on my lenovo notebook. I have 1 TB of harddisk and having 426GB for c and 458 for F (where i have all my data ). Now a Month ago i installed ubuntu on my laptop but i didn’t create a new partition so new drive is created over there on my disk 0 . Now my f drive is not getting opened in windows whereas over linux its running . On windows it is asking me to format disk. It is a OEM partition . Now what should i do.

    • If you want to keep the Unbuntu on your laptop, you should leave the partitions as is. If you want to savely remove Ubuntu from your system, I suggest you do a google search on how to do it.

      Good luck!

  31. Hi Marek,

    I have an external drive that is showing a 200MB EFI Hidden Partition and a 300GB FAT32 Partiton in Disk Manager in Windows. I cannot assign drive letters to either of these partitions, the options are greyed out.

    If I go into DISKPART it only shows me the 200MB EFI Partition, but I need to be able to see the second partition of 300GB again as it has a lot of important files on it. Is there any way to make this second partition visible again to be able to assign a drive letter to it and access the information on it?

  32. Thank you for all this info. I had long been looking for a way to unhide the recovery partition on a VAIO laptop.

  33. I degraded my windows 10 to windows7 and came to know that my healthy recovery partition,oem,efi were gone after installing windows 10 in preinstalled windows 7,though i lost them i can see their sizes available free in disk management naming,basic disk(oem,efi,healthy recovery)of sizes 260mb,260mb,15.53gb,so how to restore them with data given default by manfacturer it can help me in restoring orginal factory settings if my os crashed without need of carrying recovery media dvds with me.

    Reply mee soon as possible

    • I think that the only way to restore the original disk layout as you describe is by using the original Windows 7 DVD that was shipped with your machine. Reinstall Windows 7 from the original media and it should recreate the partitions.

      Good luck!


  34. Hi, I accidentally merged my external hard drive partition with recovery partition now all my drive is showing as recovery… It’s showing only in disk management my hard drive does not appear in THIS PC… I tried the above method but set Id did not work… It’s says the specific format is not right… I’m using windows 10… Pls help …also the duke system is displayed as RAW when running detailed partition…

  35. Vinh Quang // 10 March, 2016 at 11:27 // Reply

    Too pool!
    Lets do:
    type: diskpart
    type: list disk
    type: select disk 0 (or your number disk)
    type: list partition
    type: select partition [n] – with [n] is your partition which you want assign
    type: assign

    OK. Lets see you disk on your computer!
    if you want to hide that disk you have assign. type:remove letter=[n]

    have fun!

  36. Hi Marek,
    I unhid my recovery partition and the drive path changed(hidden E: to D:). Now im having issues starting my system because it keeps showing the blue recovery screen and error 0xc00000f. I had to enable legacy support to boot my system but i fear other issues may arise again as regards recovery/booting. I would like to return the drive back to its original state, hidden as it was to avoid this error. Any assistance would be greatly appreciated, please note that the drive is still there, its is now showing under my Computer, not deleted.

    • Hi,

      If you can still access your drive, you should reverse the drive to OEM by setting the 027 flag as described in the procedure. If you still can not boot your machine, I suggest the repair option when you boot from Windows DVD.

      Hope this helps.


  37. I have a question, in my pc SONY there is a partition OEM, its to reset to factory settings, but lately my hard disk is breaking down (650Gb), so I bought a new hard disk (1Tb), I tried to copy this partition to other disk, but seems imposible, I tried to clone disk, but the OEM partition get into NTFS, so I cant figure out how to solve this. there is a way to transform OEM to NTFS in order to copy these files, and later to the new disk transform NTFS to OEM, Or there is another way to my issue. Hope this helps. Greetings.

  38. I have tried all those step, but at the last step after I type: set id =07 override, it then shows me “the specified type is not in the correct format ”
    Pls help me

  39. Laura Rushforth // 7 June, 2016 at 14:46 // Reply


    I have a 32GB SanDisk Ultra Micro SD Card. It suddenly stopped working in my phone (Motorola Moto G). It told me to reinsert the micro SD card, I dod so and it just says that the card isn’t inserted. I’ve reinserted it several times and turned my phone on/off on multiple occasions in hope that it will register the micro SD card. When I first got the micro SD card it was formatted to my phone so I could put more apps on the micro SD card.

    I’ve been looking for 4 hours straight on hour to fix it.

    Tried to format it just be right-clicking it. No luck.
    I also tried to use cmd and disk management to create a new primary partition (as instructed to do so by various websites online. However I just get the error message;

    “Virtual Disk Service error: The operation is not supported on a non-empty removable disk”

    I then looked at details for each partition. As I have two partitions for my micro SD card which are listed as follows;

    Partition ### Type Size Offset
    ———————- —————– ———— ———–
    Partition 1 Unknown 16 MB 1024 KB
    Partition 0 Unknown 28 GB 17 MB

    Details of each partition;

    Partition 1
    Type: 19a710a2-b3ca-11e4-b026-10604b889dcf
    Hidden: Yes
    Required: No
    Attrib: 0000000000000000
    Offset in Bytes: 1048576
    There is no volume associated with this partition

    Partition 0
    Type: 193d1ea4-b3ca-11e4-b075-10604b889dcf
    Hidden: Yes
    Required: No
    Attrib 0000000000000000
    Offset in Bytes: 17825792
    There is no volume associated with this partition

    Ive tried deleting both partitions, it says they’re delete on cmd but do not delete (attempted this on disk manager too). It also says my disk is unusable.

    I also tried chkdsc and it says the format is RAW which is why I’m trying to format it

    It wouldn’t let me set id=07, but would set id=D3BFE2DE-3DAF-11DF-BA40-E3A556D89593 (from the link you posted previously) however it seems there’s no change at all

    I’m not a computer expert, but it’s now looking like my micro SD card is corrupted and I cant do anything about it, I’ve already accepted that I’ve lost everything on the SD card, however I have my photos/videos automatically backed up so I’m not bothered about restoring the micro SD card, I just want it to work in my phone again

    Please help me ASAP, I don’t really want to buy another SD card if I’m honest


    • Hi,

      Sorry but this blog is not mentioned for partitioning/formatting SD cards. I suggest you contact your phone manufacturer.


  40. terrance // 20 June, 2016 at 10:58 // Reply

    The hdd is still there but i did the process that u told me and the partition still being hidden every time i start the windows. Is my hard disk broken?

Leave a reply...