Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to set boot disk flag with diskpart
My Windows Server 2008 R2 won't start and stops with Stop 7B, so I start the recovery console and use diskpart to check the disk. There are to partitions one of Type 17 and one of type 07, the detail disk command show me that the disk is not a boot disk. How can I set this boot flag with diskpart? Or is this flag only set true if the MBR works fine. I try following commands:
the last command show me the number of OS is 0, so how can I set this flag to true?
- you should detail how you fixed it, so that others can benefit. And if you can't remember then you should have detailed how you fixed it so that others could benefit – barlop Dec 20, 2015 at 1:37
- 2 As I mentioned in the Comments of your answer it was a issue with the driver signature. After deactivate the signature verification while startup I can start the system reinstall the driver and everything works well. So the solution was to recreate the MBR and start without driver verification. – kockiren Dec 20, 2015 at 5:26
- 1 To clarify: Bugcheck 0x7b (INACCESSIBLE_BOOT_DEVICE) means that Windows did indeed begin booting, but was unable to find a driver for accessing its partition after switching to direct storage access. – Daniel B Dec 30, 2015 at 11:55
- Note: As I understand it, "Boot disk" in diskpart only means that this is the disk from which the Windows has booted. Not that the disk is bootable from the BIOS. In addition, use "list volumes" to see which is the "System" volume, which contains the Windows OS currently running. (These might be in different disks.) – Shalom Craimer Oct 19, 2022 at 6:33
6 Answers 6
The diskpart in recovery console doesn't allow you to make a partition active(bootable).
Use Gparted Live.
http://en.wikipedia.org/wiki/Diskpart "On the Recovery Console, which is included in all Windows 2000, Windows XP and Windows Server 2003, there is a diskpart command which is significantly different from the one included in the actual operating system. It only provides functionality for adding and deleting partitions, but not for setting an active partition. The utility is also provided in the Windows Recovery Environment, the successor of the original Recovery Console"
- I boot from a live-Linux and start gparted. The Bootflag is set but the detail disk show me "boot disk" no – kockiren May 18, 2013 at 11:14
- 1 @kockiren there are some more commands you can try social.technet.microsoft.com/Forums/en-US/winserversetup/thread/… like sfc (with some parameters like sfc /SCANNOW /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows where d is your windows drive) and startrep.exe and if both those fail then you might have to reinstall windows. As windows server 2008 apparently has no repair installation w7 has no repair installation either! xp does. – barlop May 18, 2013 at 11:47
- 1 also if you just made it active/bootable when it those commands can't see windows, then you're not likely to be able to even start getting into windows. if you can reach a stage where those commands can see windows, particularly the rebuildbcd command which found 0 Oss, if running those other commands leads it to find the Os then great, if not, then maybe that's a basic problem that leads diskpart to not see that it's bootable when gparted set it to bootable. – barlop May 18, 2013 at 11:51
- I run sfc and startrep but it dosent help. No bootrec /rebuild find a Installation but the System won't start correctly. It stops with 7B and now Dumpfile was create :-( – kockiren May 18, 2013 at 12:00
- 1 I didnt need a fresh install, Windows won't start with Drivererrors, after I fix it windows start correctly and then the Boot Disk flag is set. – kockiren May 18, 2013 at 18:54
I have successfully restored an VHD GPT-disk from a Windows 8.1 PC combining information from this and other threads on another windows 8.1 Hyper-V-Server.
- Rip the disk using Disk2vhd from Microsoft Sysinternals .
- Mount the vhd in the file system of the Hyper-v-host. (i.e dubble click the vhd).
- Download and install AOMEI Partition Assistant .
- Start AOMEI Partition Assistant and select the VHD-disk which appear as an ordinary disk. Mark the disk av select to convert disk to MBR-disk from the Disk-menu.
- Remove all partitions that contains recovery disks and other non Windows partitions.
- Detach VHD from HOST (Restart may be necessary).
- Create a new Virtual Machine in Hyper-V Manager and use your modified VHD.
- Boot VM from Windows Installation disk an go to recovery console and select command prompt.
- DISKPART (to open the partition utility),
- LIST DISK (disk number(s) will be shown),
- SELECT DISK n (where n is the number of the disk - probably 0),
- LIST PARTITION (partition number(s) will be shown),
- SELECT PARTITION n (where n is the number of the Primary partition you wish to make Active),
- ACTIVE (the selected partition on the selected disk will be made Active),
- EXIT (to exit DiskPart),
- EXIT (to exit the Command Prompt),
- bootrec /fixboot ,
- bootrec /fixmbr ,
- bootrec /rebuildbcd .
- Exit command prompt.
- Use Recovery options to restore windows system files (Both partial recovery and advanced recovery options may me used).
- Repeat 13 until VM boots from your VHD.
- 1 Thank you for an answer, but please review "Mark the disk av" and try to provide better quality answer next time. – g2mk Dec 30, 2015 at 12:26
- 1 What does "13. Repeat 13 until VM boots from your VHD" mean? Evidently there is a problem with the step numbers, but I can't tell what step must actually be meant. – Reg Edit Feb 6, 2021 at 18:43
DISKPART (to open the partition utility)
LIST DISK (disk number(s) will be shown)
SELECT DISK n (where n is the number of the disk - probably 0)
LIST PARTITION (partition number(s) will be shown)
SELECT PARTITION n (where n is the number of the Primary partition you wish to make Active)
ACTIVE (the selected partition on the selected disk will be made Active)
EXIT (to exit DiskPart)
EXIT (to exit the Command Prompt)
- 7 The the Partition is marked as active but not as Boot Disk. There is a flag called "Boot Disk" and has value no but in well working systems this flag is always set to yes. – kockiren May 18, 2013 at 5:30
- add a screenshot for detail partition, that would say active or not. – barlop May 18, 2013 at 12:00
I realize that this is an old thread, however . . .
Steps 9 and 10 above by g2mk worked for me when I needed to slide a Win81 partition to the unallocated space at the front of the drive, because . . .
I originally had XP in partition0, then I installed Win81 (aka Dual Boot) and it installed Win81 to partition1. Btw, there's a procedure to remove the old Microsoft partition0 OS elsewhere on the web (says for Win7)(btw,you can use gparted to set Win81 as Boot, which equals Active via Diskpart). Then I used Gparted to slide the Win81 partition over the unallocated space. Then I needed to use Steps 9 and 10 above to get rid of 0xc000025 on winload.exe and be able to boot into Win81 on the HDD.
Btw, unless I'm missing something, everyone should note that as written, these procedures are for Windows installed on a MBR disk (ie. not for Windows installed onto a GPT disk on UEFI hardware).
Regards . . .
- Welcome to Super User! On this Q&A site we try to provide good answers to questions people post. Part of a good answer is including all the steps required to making your answer work. Referencing to someone else's answer by saying 'above' isn't enough because the order of answers on Stack Overflow is not fixed. Please include the steps you are referring to in your own post. Providing credit by linking to the answer you're referring to is never a problem, of course! – Cas Oct 10, 2016 at 13:43
- This bit of your answer is why I upvoted it: " everyone should note that as written, these procedures are for Windows installed on a MBR disk (ie. not for Windows installed onto a GPT disk on UEFI hardware). " Indeed, even the answer mentioning "VHD GPT-disk" first converts VHD to MBR as there is no way that DISKPART will let you make any partition "Active" on a GPT-disk. When you have a GPT disk, follow the steps in superuser.com/a/1444266/14061 by @Nathan2055 – Jeroen Wiert Pluimers Dec 29, 2022 at 18:09
While attempting to load Windows Server 2003 on a new drive of my Windows 7 machine, I somehow wiped out the boot on the Windows 7 drive.
Windows could not start because of a computer disk hardware configuration problem
After three days of poking around, I was able to use the following steps to correct the issue:
- Boot from Windows 7 Install Disk
- Select "Repair" Option
- Select "Startup Repair" (this will run but not find any issues)
- Select Advanced Options to get to "Command Prompt"
- bootsect /nt60 SYS
- Restart the computer normally
- This is an answer to a different question ... – DavidPostill ♦ Nov 19, 2016 at 11:05
The only solution for me was to write the Minitool Partition Wizard BootCD (or Gparted ) to USB using MultiBootUSB (or YUMI ) utility.
You must log in to answer this question.
Not the answer you're looking for browse other questions tagged windows boot windows-server-2008-r2 bootloader ..
- The Overflow Blog
- Fighting comment spam at Facebook scale (Ep. 602)
- What it’s like being a professional workplace bestie (Ep. 603)
- Featured on Meta
- Moderation strike: Results of negotiations
- Our Design Vision for Stack Overflow and the Stack Exchange network
Hot Network Questions
- What is this transparent round "plate" brick with wiring inside?
- Enthalpy change of a solution of of 1-pentanol in 1-butanol
- Censorship of African-American characters in "Tintin in America"
- Ask for a reduction in conference registration fees
- Which airline is liable for compensation in case of missed connection?
- What does my wife want?
- What are the balance implications of removing spell lists?
- Why do programming languages use delimiters (quotes) for strings?
- What RPG had space travel, star gates, and an organization maybe called "Brothers of Battle"?
- Sustainable eating habits as a pilot
- Compile TailwindCSS to CSS
- A fantasy about a man selling his shadow to the Devil
- how early can people build a giant clock?
- How to properly define volume for beginner calculus students?
- RAID configuration on new server
- Express a "not equal to A or B" criterion in Select
- If Weird Al Yankovic Wrote Riddles
- So, too, may be the fate of his seed
- Congruences for power-sum of divisors
- Are heat sinks necessary for a Triac even in low current circuit?
- Migrating Windows to a new internal drive, changing drive letters?
- Short story about an engineer coming back to an abandoned city where only the robots are working. I read it in an anthology in the 1970's
- What would happen if the Panama Isthmus was turned into an island chain?
- Is quadrature still considered part of numerical analysis?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
- 9 contributors
Applies to: Windows Server 2022, Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, and Windows Server 2008 R2, Windows Server 2008
The diskpart command interpreter helps you manage your computer's drives (disks, partitions, volumes, or virtual hard disks).
Before you can use diskpart commands, you must first list, and then select an object to give it focus. After an object has focus, any diskpart commands that you type will act on that object.
When you select an object, the focus remains on that object until you select a different object. For example, if the focus is set on disk 0 and you select volume 8 on disk 2, the focus shifts from disk 0 to disk 2, volume 8.
Some commands automatically change the focus. For example, when you create a new partition, the focus automatically switches to the new partition.
You can only give focus to a partition on the selected disk. After a partition has focus, the related volume (if any) also has focus. After a volume has focus, the related disk and partition also have focus if the volume maps to a single specific partition. If this isn't the case, focus on the disk and partition are lost.
To start the diskpart command interpreter, at the command prompt type:
You must be in your local Administrators group, or a group with similar permissions, to run diskpart.
You can run the following commands from the Diskpart command interpreter:
Listing available objects
You can view a list of options associated to each command by running the main command followed by what is available to that specific command. Running list by itself will display the four parameters below:
After you run the list command, an asterisk ( * ) appears next to the object of focus.
To see available disk(s), run list disk :
To select a disk, run select disk followed by the disk number. For example:
Before disk 1 can be utilized, a partition will need to be created by running create partition primary :
Lastly, we can perform a quick format of disk 1 to NTFS with the label "Backup" by running format fs=ntfs label=Backup quick as seen below:
Command-Line Syntax Key
Disk management overview
Storage Cmdlets in Windows PowerShell
Submit and view feedback for
How to Make a Partition Bootable With DiskPart
Even if a partition contains bootable data, your computer might sometimes fail to detect it as a suitable bootable partition. This is usually due to the fact that, to be recognized by your computer as a bootable partition, a partition does not only need to contain a bootable environment, it also needs to be specifically marked as an active system partition. You can add that active marker to a hard drive partition by using Diskpart, a command-line disk management application that is built into Windows.
Open the Windows Start screen and type "cmd." Right-click on the "Command-Line Prompt" shortcut and select "Run as administrator."
Video of the Day
Type "diskpart" and press the "Return" key. Diskpart will now launch. While Diskpart is active, the traditional command-line prompt will be replaced by a Diskpart prompt, indicating that any command you enter will be processed by that application.
Enter "list disk" and press the "Return" key. Note the number assigned to the drive which contains the partition you wish to make bootable. You can find that number in the first column.
Type "select disk X", replacing "X" with the number assigned to the relevant drive. Press the "Enter" key.
Enter "list partition" and press the "Return" key. Note the number assigned to the partition you want to make bootable.
Type "select partition X", replacing "X" with the number of the partition you want to select. Press the "Enter" key.
Enter "active" and press the "Return" key to instruct Diskpart to mark that partition as an active, bootable partition.
Type "exit," followed by the "Return" key, to exit Diskpart. Close the Command-Line Prompt window.
- Microsoft Support: A Description of the Diskpart Command-Line Utility
- TweakHomePC: Make, Mark, or Set a Partition or Drive Active or Boot in Windows or Linux
Report an Issue