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




Similar help and support threads
Thread Forum
Recover partition after aborted diskpart clean all command
Hi, I've used diskpart clean all command on my 640GB hdd by mistake. But I aborted (Ctrl+C) it after about 15 minutes of beginning. There was 4 partitions on it: 1. Windows partition (about 90GB). 2. Unallocated space (about 25GB). 3. Another partition (about 50GB). 4. Data partition (The...
Backup and Restore
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
Recover data from diskpart > clean command
Hi everyone, with my luck I have accidentally executed diskpart > clean command on my 1tb external hard drive. I stopped right after though, realizing what i have done. Is it at all possible to recover the data from the hard drive? It had the personal data of my family - pictures, videos,...
Backup and Restore
CLEAN Diskpart´s victim ,how to recover data?
Hi everyone I wanted clear the 1st partition (of 3) of my notebook , and ..was the Disaster :cry: whole 250 Gb was gone in one click. All my documents and photos..my life, since i was a child is there .. and i havent backed up it .. so i really need your help guys. I´ve seen some...
Backup and Restore
Recover data from an accidental diskpart / clean command
Hey folks, What I did: Within CMD>diskpart>Select disk, i ran the clean (not clean all) command on a different drive than intended, (the goal was to recover a partition of a USB thumb drive), and ended up cleaning an external data drive (3TB), and would love to find out that my data is not lost....
Backup and Restore


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 20:24.
Twitter Facebook Google+