Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Recover data from a diskpart > clean command

25 Jun 2014   #81
jumanji

Windows 7 Home Premium 32 bit
 
 

Quote   Quote: Originally Posted by gregrocker View Post
Would you want to theorize why Clean command works to overcome about half or more of all installation failures? I assume it's because it wipes boot sector and the partition table, one or both of which interferes with attempts to install Win7.

Likewise on multiple occasions we've had drives which failed to boot that traced to a hard drive where the solution was to wipe the drive with Clean command.
If one suspects boot sector related problems or Windows booting related problems and diskpart clean is recommended, as Kaktussoft mentioned in the previous post it zeroes LBA 0 that contains both MBR Code and Partition Table - in an MBR disk.

However, if it is an already existing HDD with a single volume or multiple volumes, it shall be prudent to examine the start sector of the first volume ( this I would presume can be done in many ways. Even by running a partitioning utility from a boot device. The properties of the volume may show the start sector) and recommend diskpart clean only if the start sector is LBA 2048. If it is LBA 63 it is a no no as it will zero it and make the disk inaccessible. This may perhaps increase the success rate from the present estimate you had indicated by eliminating one cause of failure of recommended action.

In the case of start sector LBA 2048 drives - Many alien OS like Linux may write data in Sector 64 to 2047 and any dirty data left behind may be a potential source of Windows booting related problems. So wiping it with diskpart clean may be advantageous. (E & O.E. - Errors and Omissions Excepted. )


My System SpecsSystem Spec
.
25 Jun 2014   #82
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by jumanji View Post
In the case of start sector LBA 2048 drives - Many alien OS like Linux may write data in Sector 64 to 2047 and any dirty data left behind may be a potential source of Windows booting related problems. So wiping it with diskpart clean may be advantageous. (E & O.E. - Errors and Omissions Excepted. )
Boot process reads "MBR bootcode" in sector 0. When it runs it most likely instructs computer to read "volume boot sector" of active partition. etc etc. Partition table is in MBR (sector 0) as well.

Whatever info is in sector 1 - 2047 is irrelevant (assuming first partition doesn't start in that range).
My System SpecsSystem Spec
25 Jun 2014   #83
Anshad Edavana

Windows 7 Ultimate x64
 
 

Quote:
Whatever info is in sector 1 - 2047 is irrelevant (assuming first partition doesn't start in that range).
Right but wrong. To Windows and Microsoft those sectors are "hidden". But there is no hard rule for not to use this sectors. For example, obsolete Linux loader "LiLO" is known to save some extended code which can't be fitted on the MBR on these sectors. GRUB may also use these sectors depending on the scenario.

Example : [SOLVED] Sector 32 FlexNet Problem -- Grub

Quote:

Grub has 440 bytes available to it in the MBR to store its bootable code, but it wants more space than that, so it uses the space between the MBR and the 1st partition. But Grub isn't the only program that wants to use that space, a thing called FlexNet does too. FlexNet is some sort of software license manager, and according to the warning issued by Grub, it likes to store data in Sector 32.

http://www.chiark.greenend.org.uk/uc...nbootable.html


Quote:
This is a bug in which some proprietary Windows-based software overwrites particular sectors in the gap between the master boot record and the first partition, sometimes called the "embedding area". GRUB Legacy and GRUB 2 both normally use this part of the disk to store one of their key components: GRUB Legacy calls this component Stage 1.5, while GRUB 2 calls it the core image (comparison). However, Stage 1.5 is less useful than the core image (for example, the latter provides a rescue shell which can be used to recover from some problems), and is therefore rather smaller: somewhere around 10KB vs. 24KB for the common case of ext[234] on plain block devices.
My System SpecsSystem Spec
.

25 Jun 2014   #84
lonewolfs

Windows 10 Pro (64-bit)
 
 

Hi,

I checked sector 2047 and 2048 and the former is 0'd but data starts at 2048. I am posting the screens below.

Recover data from a diskpart > clean command-2047.png

Recover data from a diskpart > clean command-2048.png


My System SpecsSystem Spec
25 Jun 2014   #85
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Read #7 . It looks like partition start sector was 63 by default(?) Now sectors 0-2047 are zeroed. Sector 63-2047 did belong to partition 1. Sector didn't start on sector 2028 for sure! It has no "readable strings" whatsoever. PW and testdisk couldn't recover the partition as well.

This is an example of a normal NTFS boot sector NTFS. Partition Boot Sector

What kind of files were on the disk? mp3, jpg, doc.... please explain
My System SpecsSystem Spec
25 Jun 2014   #86
lonewolfs

Windows 10 Pro (64-bit)
 
 

There were all type of files on the disk. mp3, jpg, txt, mkv, mp4, code files like, php, aspx, java, exe, rar, iso, nrg... basically it had everything.

I kept all my user data on that drive keeping the boot drive clean.
My System SpecsSystem Spec
25 Jun 2014   #87
Anshad Edavana

Windows 7 Ultimate x64
 
 

Yes, sector 2048 seems to be a data sector. So the first partition might be started at sector 63 as "kaktussoft" said. There is still a chance for backup boot sector to be alive. If DISKPART wiped out the last MB also, then backup boot sector might also damaged. However it may worth a try to locate it.
My System SpecsSystem Spec
25 Jun 2014   #88
Anshad Edavana

Windows 7 Ultimate x64
 
 

I will post the steps to inspect the presence of "backup boot sector" shortly.
My System SpecsSystem Spec
25 Jun 2014   #89
Anshad Edavana

Windows 7 Ultimate x64
 
 

Please follow the below steps.

1. Download DMDE from http://dmde.com/download/dmde-free-2...-win32-gui.zip

2. After accepting the licence, a disk selection window will appear. On the left pane, make sure Physical Devices is selected and then on the right pane choose your slave disk (model name will be showed ). Then press OK.



3. Now DMDE will scan for the presence of boot sectors or backup boot sectors and will present a partition info box like the one in the below example.



The time to complete the search will vary with disk size. When the partition selection screen is displayed, use "Windows snipping tool" to capture the window and upload the screenshot with next reply.
My System SpecsSystem Spec
25 Jun 2014   #90
Anshad Edavana

Windows 7 Ultimate x64
 
 

One more thing to remember - whether DMDE finds or not finds the partition, make sure to not press any other button/use any option than the one in my instruction. DMDE is a pretty powerful tool so care should be taken when using it.
My System SpecsSystem Spec
Reply

 Recover data from a diskpart > clean command




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Disk - Clean and Clean All with Diskpart Command
How to "Clean" or "Clean All" a Disk with the Diskpart Command This will show you how to use the clean or clean all command on a selected disk to delete all of it's MBR or GPT partitions, volumes, and any hidden sector information on MBR disks is overwritten. The data on the HDD is not...
Tutorials
Recover Partitions from diskpart -> clean command
Hi Guys, I was trying to install windows 7 on my windows 8 laptop (UEFI) and when it didnt allow me to install win7 on partitioned drive I followed YouTube video foolishly and fired diskpart - clean command. everything gone after that. Luckily I didnt do anything after that and referred one of...
Backup and Restore
DISKPART clean performed accidently. how to recover data?
Hello everyone, I had major partition problems and tried fixmbr,fixboot,etc and even rebuilding bcd was not working. I was misguided by one of the other Forums and entered: DISKPART Select Volume 1 DISKPART Clean Volume 1 The Volume has been cleaned where volume 1 was my C...
General Discussion
diskpart / clean, format by accident , need to recover data
Hello, I know it's stupid but i diskpart/clean and formatted while installing windows from cmd, it's a new laptop so i had no other data just (i don't remember exactly) 100GB not more. i installed windows on that formatted disk. I had all data on D Disk (500GB) and now i have only one disk which...
Backup and Restore
Should I clean my HDD with Parted Magic or Diskpart clean all command?
Hi everyone i have a question about HDD Clean and also question about Win 7 64 bit :) I want to wiped out my all HDD data inside i want to delete all information like a brand new HDD. I heard that there is a program called Parted Magic can do this and also Diskpart clean all command too. ...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 21:17.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App