| Author |
Message |
Mike Dile
Guest
|
Posted:
Wed Feb 25, 2004 5:05 am Post subject:
FIXMBR under WinPE |
|
|
Is there a way to write the master boot record to a disk when booted under
WinPE? I'm looking for something similar to what FIXMBR does in the
recovery console. It seems that functionality is not available in diskpart
which is the only disk manipulating tool I can find under WinPE.
Regards,
Mike |
|
| Back to top |
|
 |
Johnathan Seal [MSFT]
Guest
|
Posted:
Wed Feb 25, 2004 10:56 pm Post subject:
Re: FIXMBR under WinPE |
|
|
Hello Mike,
If you are trying to wipe out the MBR, you can use the clean command in diskpart.
Caution! Using the clean command will loose all partitions on that disk and the data in them.
To initialize - write a MBR on a RAW or 'cleaned' disk, you can create a partition on the disk or convert it to dynamic (with diskpart).
Are you trying to wipe out the MBR or recover a corrupted MBR?
- Johnathan [MSFT]
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mike Dile" <mikedile@eyebm.com> wrote in message news:#g7DQNz#DHA.3668@TK2MSFTNGP09.phx.gbl...
| Is there a way to write the master boot record to a disk when booted under
| WinPE? I'm looking for something similar to what FIXMBR does in the
| recovery console. It seems that functionality is not available in diskpart
| which is the only disk manipulating tool I can find under WinPE.
|
| Regards,
|
| Mike
|
| |
|
| Back to top |
|
 |
Mike Dile
Guest
|
Posted:
Wed Feb 25, 2004 11:48 pm Post subject:
Re: FIXMBR under WinPE |
|
|
Hi Johnathan and thanks for posting.
Basically I'm trying to take a disk, partition it, lay down the files I want
to put on it and boot it when I'm done.
Here's what I've tried with diskpart:
Diskpart
Select disk 0
clean
Create partition [primary size=xxx]
Select partition
Active
Assign c
Exit
Here's a summary of what I've tried:
1. Used disk, partitions deleteted and recreated without clean from winpe
diskpart ----> System boots ok
2. New disk, partitions created without clean ---> System cannot boot unless
repaired with fixmbr from win2003 recovery console
3. Used disk, run clean, create partitions ---> System boots ok (the fact
that this is successful leads me to believe that clean does not actually
wipe the entire mbr. I speculate that only the master partition tables
within the mbr are wiped, but that the basic boot mechanism is left intact.
Of course I am only guessing on much of this.)
Any suggestions?
-MIke |
|
| Back to top |
|
 |
Johnathan Seal [MSFT]
Guest
|
Posted:
Thu Feb 26, 2004 1:15 am Post subject:
Re: FIXMBR under WinPE |
|
|
To be clear, #1 and #3 are OK with you but #2 is the problem at hand, correct?
If so, can you tell me what diskpart is reporting for detail disk on the new disk (before you create any partititions on it)?
Also, how are you creating the partitions on this disk?
What version of diskpart are you running?
Thanks, Johnathan [MSFT]
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mike Dile" <mikedile@eyebm.com> wrote in message news:elAW1A9#DHA.3772@TK2MSFTNGP11.phx.gbl...
| Hi Johnathan and thanks for posting.
| Basically I'm trying to take a disk, partition it, lay down the files I want
| to put on it and boot it when I'm done.
|
| Here's what I've tried with diskpart:
|
| Diskpart
|
| Select disk 0
|
| clean
|
| Create partition [primary size=xxx]
|
| Select partition
|
| Active
|
| Assign c
|
| Exit
|
| Here's a summary of what I've tried:
|
|
|
| 1. Used disk, partitions deleteted and recreated without clean from winpe
| diskpart ----> System boots ok
|
| 2. New disk, partitions created without clean ---> System cannot boot unless
| repaired with fixmbr from win2003 recovery console
|
| 3. Used disk, run clean, create partitions ---> System boots ok (the fact
| that this is successful leads me to believe that clean does not actually
| wipe the entire mbr. I speculate that only the master partition tables
| within the mbr are wiped, but that the basic boot mechanism is left intact.
| Of course I am only guessing on much of this.)
|
| Any suggestions?
|
| -MIke
|
| |
|
| Back to top |
|
 |
Mike Dile
Guest
|
Posted:
Fri Feb 27, 2004 2:59 am Post subject:
Re: FIXMBR under WinPE |
|
|
Correct, #2 is the problem.
Basically, what the is showing is two scenarios. In the first, I am using a
disk that has already had Windows installed. In the second, I have
partitioned and restored over a new hard disk. The first case works fine.
For the second case, the boot hangs without making it to the boot manager.
You can see that the output from "detail disk" does not show any significant
differences for the two cases. The disk is partitioned properly, the file
system is actually restored properly (I can change into it and access files
after the restore completes), and diskpart allows me to run the "active"
command against it.
"detail disk" before restore attempt
====================================
IBM-ESXS ST336753LC FN SCSI Disk Device
Disk ID: 948327DA
Type : SCSI
Bus : 0
Target : 0
LUN ID : 0
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- -----
---
Volume 0 C NTFS Simple 6997 MB Healthy
"detail disk" after issuing clean
=================================
Disk ID: 00000000
Type : SCSI
Bus : 0
Target : 0
LUN ID : 0
DISKPART> create partition primary size=6997
DiskPart succeeded in creating the specified partition.
DISKPART> select partition 1
Partition 1 is now the selected partition.
DISKPART> active
DiskPart marked the current partition as active.
DISKPART> assign letter=c
DiskPart successfully assigned the drive letter or mount point.
DISKPART> detail disk
Disk ID: 8B03E173
Type : SCSI
Bus : 0
Target : 0
LUN ID : 0
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- -----
---
* Volume 0 C RAW Partition 6997 MB Healthy
"detail disk" after same procedure above, except using a new hard disk
======================================================================
DISKPART> select disk 0
Disk 0 is now the selected disk.
DISKPART> detail disk
Disk ID: F641F641
Type : SCSI
Bus : 0
Target : 0
LUN ID : 0
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- -----
---
Volume 1 C NTFS Partition 6997 MB Healthy
There are no volumes.
We're using diskpart version 5.2.3790. |
|
| Back to top |
|
 |
Mike Dile
Guest
|
Posted:
Fri Feb 27, 2004 4:40 am Post subject:
Re: FIXMBR under WinPE |
|
|
We have used MBRutil.exe (free download from Powerquest
ftp://ftp.powerquest.com/pub/utilities/head.zip) to extract the MBR from a
working system, as well as the MBR on a freshly partitioned harddisk using
the WinPE diskpart.exe.
According to doc we've found on the web
The MBR program code starts at offset 0000.
The MBR messages start at offset 008b.
The partition table starts at offset 01be.
The signature is at offset 01fe.
Using a sector editor editor we compared the two 512 byte files. The
working copy matches the description above. The non-functioning MBR is
filled with NULL bytes until offset 01B8, which is close to the described
start of the partition table. So it appears, that the MBR created by
diskpart is missing both the MBR program code and MBR messages.
What are we missing here? Bug?
-Mike |
|
| Back to top |
|
 |
Mike Dile
Guest
|
Posted:
Sat Feb 28, 2004 5:44 am Post subject:
Re: FIXMBR under WinPE |
|
|
Mea cupla, pilot error. We forgot to run DISKPART CLEAN first on the *new*
drives prior to repartitioning them. That was the difference in the tests
previously described.
-Mike |
|
| Back to top |
|
 |
|
|
|
|