spinjector Posted January 22, 2010 Share Posted January 22, 2010 Hi,I have the Vista version of WinPE from the free/downloadable Windows AIK... I think it's version 2.1..?I need a 32-bit command-line utility that I can use to back & restore both the MBR and the boot sector of a partition.But here's the catch - its has to have command-line options so I can script it with batch files.Ideally, I'd like a single EXE that can do everything that DISKPART does, plus the backup/restore of the MBR and partition boot sectors. BUT if I have to use separate programs, I'll make it happen...Thanks. Link to comment Share on other sites More sharing options...
cdob Posted January 22, 2010 Share Posted January 22, 2010 Use dd or dsfok.http://unxutils.sourceforge.net/http://www.chrysocome.net/ddhttp://members.ozemail.com.au/~nulifetv/freezip/freeware/ Link to comment Share on other sites More sharing options...
jaclaz Posted January 22, 2010 Share Posted January 22, 2010 Additionally, if you use dsfo/dsfi (DSFOK package) you can use my batches:http://www.boot-land.net/forums/?showtopic=3191http://www.boot-land.net/forums/index.php?showtopic=5000http://www.boot-land.net/forums/?showtopic=2362for inspiration about the batches you need to write.Another set of maybe useful utilities for more "advanced" chores is of course the findpart set of utilities: http://www.partitionsupport.com/utilities.htmjaclaz Link to comment Share on other sites More sharing options...
jimmiller96 Posted January 23, 2010 Share Posted January 23, 2010 What problems did you experience with diskpart and mbrwizard? I ask because both of these utilities have been invaluable in protecting and restoring my mbr. Link to comment Share on other sites More sharing options...
spinjector Posted January 26, 2010 Author Share Posted January 26, 2010 (edited) What problems did you experience with diskpart and mbrwizard? I ask because both of these utilities have been invaluable in protecting and restoring my mbr.They appear to be 16-bit programs. They won't run on WinPE 2.0 (which is based on Vista); it only supports 32-bit programs.>EDIT...Sorry I read that too fast. Actually I've been quite successful working with DISKPART. However, I'm working with both a custom MBR and custom boot sector/os, in addition to an NTFS partition that I would also like to be able to save/write since I'll already be doing the other two anyways. Edited January 26, 2010 by spinjector Link to comment Share on other sites More sharing options...
spinjector Posted January 26, 2010 Author Share Posted January 26, 2010 Use dd or dsfok.http://unxutils.sourceforge.net/http://www.chrysocome.net/ddhttp://members.ozemail.com.au/~nulifetv/freezip/freeware/Additionally, if you use dsfo/dsfi (DSFOK package) you can use my batches:http://www.boot-land.net/forums/?showtopic=3191http://www.boot-land.net/forums/index.php?showtopic=5000http://www.boot-land.net/forums/?showtopic=2362Thanks, guys. dd.exe seems to be exactly what I need - if only I could get it to work. I'm trying to track the problem down now.There seems to be something missing from my build of WinPE 2.0 that's needed by dd.exe. When I run 'dd --list' nothing happens. I've confirmed this is a problem by trying on another machine. If I try my WinPE it doesn't work, however if I try Hiren's Boot CD 10, it works fine. Hopefully this is simply something I left out of my build, because if it's a shortcoming of WinPE 2.0 and/or an incompatibility with dd.exe for Windows, I'm about ready to toss this system out the window and laugh evilly as it smashes on the street... =-)I'll start a new post for this latest woe.Thanks for pointing me to dd.exe.If that doesn't work, I'll try dsfok. It looked way above my head when I first checked it out, but now that I have my head wrapped around dd.exe, maybe it'll make more sense now. Link to comment Share on other sites More sharing options...
jaclaz Posted January 26, 2010 Share Posted January 26, 2010 If that doesn't work, I'll try dsfok. It looked way above my head when I first checked it out, but now that I have my head wrapped around dd.exe, maybe it'll make more sense now.Actually it has a simplified sintax, look:dd [bs=SIZE] [count=BLOCKS] [if=FILE] [of=FILE] [seek=BLOCKS] [skip=BLOCKS] [--size] [--list] [--progress]semplified to:dd [if=FILE] [skip=BLOCKS] [count=BLOCKS] [of=FILE]TO copy the MBR of hard disk 1 (Second hard disk) to file C:\mymbr1.bin:dd [bs=512] if=\\.\PhysicalDrive1 skip=0 count=1 of=C:\mymbr1.binExample of output:C:\VSS>dd /?rawwrite dd for windows version 0.5.Written by John Newbigin <jn@it.swin.edu.au>This program is covered by the GPL. See copying.txt for detailsUnknown command /?dd [bs=SIZE] [count=BLOCKS] [if=FILE] [of=FILE] [seek=BLOCKS] [skip=BLOCKS] [--size] [--list] [--progress]SIZE and BLOCKS may have one of the following suffix: k = 1024 M = 1048576 G = 1073741824default block size (bs) is 512 bytesskip specifies the starting offset of the input file (if)seek specifies the starting offset of the output file (of)C:\VSS>dd if=\\.\PhysicalDrive1 skip=0 count=1 of=C:\mymbr1.binrawwrite dd for windows version 0.5.Written by John Newbigin <jn@it.swin.edu.au>This program is covered by the GPL. See copying.txt for details1+0 records in1+0 records outThe same using dsfo:dsfo \\.\PhysicalDrive1 0 512 C:\mymbr1.binExample of output:C:\VSS>dsfodsfo v1.03-CLI, Freeware - use at your own risk(c)2005 Dariusz Stanislawek, http://freezip.cjb.net/freewareUsage: dsfo source offset size destinationNote: null size is interpreted as max possible output negative size is calculated on current file size negative offset is calculated from end of file use "$" as destination to check MD5 signature onlyExample: dsfo c:\tmp\my.avi -50000 0 test.bin dsfo \\.\d: 0 512 c:\0\partition-sectors.dat dsfo \\.\PHYSICALDRIVE0 0 0 \\srv\shr\tmp\first.dsk dsfo \\.\a: 0 0 "c:\tmp\floppy disk image.img" dsfo \\.\e: 0 0 d:\CDROM_or_DVD_image.isoC:\VSS>dsfo \\.\PhysicalDrive1 0 512 C:\mymbr1.binC:\mymbr1.bin - Existing file.(dsfo, UNLIKE dd will NOT overwrite an existing file)C:\VSS>del c:\mymbr1.binC:\VSS>dsfo \\.\PhysicalDrive1 0 512 C:\mymbr1.binOK, 512 bytes, 0.000s, MD5 = fc5ffca90519daa9c9c8d5dfeb7911a4jaclaz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now