Bitcoin Forum
November 20, 2018, 01:12:46 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Wallet.dat corrupt  (Read 1740 times)
AleksTo
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 10, 2017, 02:43:00 PM
 #1

Hey guys, so I kinda formated my drive and lost my wallet.dat. I was kinda able to get it back via recuva. But when i launch the wallet program it was corrupt. Im new to bitcoin and honestly i have no clue what to do, could someone help me. Wink
1542676366
Hero Member
*
Offline Offline

Posts: 1542676366

View Profile Personal Message (Offline)

Ignore
1542676366
Reply with quote  #2

1542676366
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542676366
Hero Member
*
Offline Offline

Posts: 1542676366

View Profile Personal Message (Offline)

Ignore
1542676366
Reply with quote  #2

1542676366
Report to moderator
1542676366
Hero Member
*
Offline Offline

Posts: 1542676366

View Profile Personal Message (Offline)

Ignore
1542676366
Reply with quote  #2

1542676366
Report to moderator
hexafraction
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
July 10, 2017, 03:08:09 PM
 #2

You may be able to salvage at least some keys using pywallet's recovery tool: https://bitcointalk.org/index.php?topic=38004.0

It normally scans a block device, but it may be possible to scan the partially recovered file directly.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
AleksTo
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 10, 2017, 03:56:48 PM
 #3

I'm trying to use it by the command

pywallet.py --recover --recov_size 30.1Gio --recov_device /dev/sda3 --recov_outputdir /home/jackjack/recovered_wallets

but all I'm getting is

Starting recovery.
Can't open /dev/sda3, check the path or try as root
  Error: (2, 'No such file or directory')

I'm a dunce xd
hexafraction
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
July 10, 2017, 04:54:23 PM
 #4

You have to change the command line parameters to match those of your system and situation. /dev/sda3 should be the block device where the wallet was, recov_size should be the size of that block device, and output directory should be your actual home directory.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
HI-TEC99
Legendary
*
Offline Offline

Activity: 1372
Merit: 1042



View Profile
July 10, 2017, 05:37:26 PM
 #5

You could try making a backup of your wallet.dat, then starting Bitcoin core with the -salvagewallet option.

To do that right click bitcoin-qt.exe and select "create shortcut" from the menu that appears. Afterwards right click the shortcut and select properties from the menu that appears. A new window should open. Add a space, then the text in the line below to the end of whatever is already in the textbox named target

 -salvagewallet

This is an example of what the textbox should look like afterwards.



Click the apply button, then the OK button to close the window.

Double click the new shortcut to start Bitcoin core with the -salvagewallet option enabled.
cellard
Legendary
*
Offline Offline

Activity: 1190
Merit: 1167


View Profile
July 10, 2017, 06:19:11 PM
 #6

Hey guys, so I kinda formated my drive and lost my wallet.dat. I was kinda able to get it back via recuva. But when i launch the wallet program it was corrupt. Im new to bitcoin and honestly i have no clue what to do, could someone help me. Wink

I have used recuva in the past too to get a wallet file that i mistakingly deleted, but the deletion was very recent so recuva shown a green light for the deleted wallet.dat file.

Was your wallet.dat file shown as green or orange?

If it's not was green... then maybe it's too damaged.

AleksTo
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 10, 2017, 06:34:36 PM
 #7

I still can't figure out how to use pywallet
how do i find out what device i want to read from, I have a raid0 drive (As C:) and the drive i want to recover from (As D:).

With the -salvagewallet line im getting this:

2017-07-10 15:21:19 Bitcoin version v0.14.2
2017-07-10 15:21:19 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2017-07-10 15:21:19 Assuming ancestors of block 00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90 have valid signatures.
2017-07-10 15:21:19 ParameterInteraction: parameter interaction: -salvagewallet=1 -> setting -rescan=1
2017-07-10 15:21:19 GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely..."
2017-07-10 15:21:19 Default data directory C:\Users\Aleks\AppData\Roaming\Bitcoin
2017-07-10 15:21:19 Using data directory C:\Users\Aleks\AppData\Roaming\Bitcoin
2017-07-10 15:21:19 Using config file C:\Users\Aleks\AppData\Roaming\Bitcoin\bitcoin.conf
2017-07-10 15:21:19 Using at most 125 automatic connections (2048 file descriptors available)
2017-07-10 15:21:19 Using 32 MiB out of 32 requested for signature cache, able to store 1048576 elements
2017-07-10 15:21:19 Using 4 threads for script verification
2017-07-10 15:21:19 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2017-07-10 15:21:19 Using wallet wallet.dat
2017-07-10 15:21:19 scheduler thread start
2017-07-10 15:21:19 init message: Verifying wallet...
2017-07-10 15:21:19 CDBEnv::Open: LogDir=C:\Users\Aleks\AppData\Roaming\Bitcoin\database ErrorFile=C:\Users\Aleks\AppData\Roaming\Bitcoin\db.log
2017-07-10 15:21:19 Failed to rename wallet.dat to wallet.1499700079.bak
2017-07-10 15:21:19 scheduler thread interrupt
2017-07-10 15:21:19 Shutdown: In progress...
2017-07-10 15:21:19 Shutdown: done

And it was green in recuva Wink
As I said I'm new to this XD
HI-TEC99
Legendary
*
Offline Offline

Activity: 1372
Merit: 1042



View Profile
July 10, 2017, 06:52:51 PM
 #8

Did you try right clicking the shortcut and selecting "run as administrator"? It seems Bitcoin core can't rename the wallet.dat. Maybe it's a permissions error.

Quote
Failed to rename wallet.dat to wallet.1499700079.bak
AleksTo
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 10, 2017, 06:57:20 PM
 #9

I tried to run it as admin but the same thing happened, it started up for a second and then closed itself.
morbius55
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
July 10, 2017, 07:04:33 PM
 #10

I'm getting a similar result when trying my wallet dat, but using the latest Bitcoin core. I get Failed to rename wallet.dat to wallet.1499712863.bak.
HI-TEC99
Legendary
*
Offline Offline

Activity: 1372
Merit: 1042



View Profile
July 10, 2017, 07:31:45 PM
 #11

Did your wallet.dat have a password? If it didn't try opening the wallet.dat in a hex editor and searching for this string of bytes 0201010420. The next the thirty-two bytes after that string might be a private key.

This is a hex editor I use but any other should work.

https://sourceforge.net/projects/wxhexeditor/

In the hex editor's menu click file, then open, then navigate to the folder containing your wallet.dat6 and open it.



Afterwards click "edit", then "find".



This window should open. Paste the hex string into the the text box labelled "search", then click the button labelled "find all" and wait for it to search the wallet.dat file.



Make sure you run all software offline inside a virtualbox or vmware virtual machine. Don't risk viewing private keys on any computer that connects to the internet.

If you get any results from your search the following 32 bytes could be a private key.

Copy them into notepad and remove any spaces. This is an example of a private key copied from a hex editor into notepad with the spaces removed.



That can then be copied into an offline copy of this website, which will convert it into a format that Bitcoin wallets like electrum can import.

https://www.bitaddress.org/


This is the private key copied from notepad into an offline copy of the bitaddress website. Clicking the view details button converts the private key into normal formats.



AleksTo
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 10, 2017, 07:53:48 PM
 #12

Sadly my wallet had a password
HI-TEC99
Legendary
*
Offline Offline

Activity: 1372
Merit: 1042



View Profile
July 10, 2017, 08:18:56 PM
 #13

Sadly my wallet had a password


You could continue trying to use pywallet. However it's very old software and difficult to use (as you found out).

What operating system did you install pywallet onto?

I had it working on windows, but I can't remember all the steps I made to install it. This is a screenshot showing the windows command that got it working for me. That command scans a whole drive rather than just one file.

AleksTo
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
July 11, 2017, 12:24:35 AM
 #14

Finally I got it working and got my bitcoin address as well. I really am an idiot..... the reason I couldn't get pywallet to work was because I had to write D: but I wrote D:\ by mistake.
Thank you to everyone who helped me out. Wink
cellard
Legendary
*
Offline Offline

Activity: 1190
Merit: 1167


View Profile
July 11, 2017, 04:31:39 PM
 #15

Finally I got it working and got my bitcoin address as well. I really am an idiot..... the reason I couldn't get pywallet to work was because I had to write D: but I wrote D:\ by mistake.
Thank you to everyone who helped me out. Wink

Im glad that you are able to enjoy your BTC after this scare. I know the stress of potentially losing your wallet.dat myself, it is the worst feeling ever.

Generally if Recuva shows you a green, then it's good to go, the file should be intact.

In fact right now im going to do my weekly backup and put my wallet into every usb pendrive I can find.

morbius55
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
July 23, 2017, 05:59:53 PM
 #16

Finally I got it working and got my bitcoin address as well. I really am an idiot..... the reason I couldn't get pywallet to work was because I had to write D: but I wrote D:\ by mistake.
Thank you to everyone who helped me out. Wink
Any chance you could list the steps you took to actually set up pywallet,  for a novice computer user to understand?. I am in the same situation you were in, with potentially 32 BTC at stake. I will understand if you don't have the time or inclination to help. Cheers.
hexafraction
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
July 29, 2017, 07:18:02 PM
 #17

Finally I got it working and got my bitcoin address as well. I really am an idiot..... the reason I couldn't get pywallet to work was because I had to write D: but I wrote D:\ by mistake.
Thank you to everyone who helped me out. Wink
Any chance you could list the steps you took to actually set up pywallet,  for a novice computer user to understand?. I am in the same situation you were in, with potentially 32 BTC at stake. I will understand if you don't have the time or inclination to help. Cheers.

Might be a really late reply.

First of all, stop using the computer/hard disk that the wallet was on immediately. Every time you write to that disk, you lower your chances of recovery.

Using another computer, create a live DVD or live USB for Ubuntu Linux by downloading the Ubuntu install disk file and using a disk burning tool (for DVD) or Unetbootin (for flash drive). Insert that drive into the computer with the lost wallet, and boot using that live CD. Pick "try Ubuntu".

Once it's booted up, download pywallet and put it in the Downloads folder. Open a terminal, use the cd command to change directory (if it's in Downloads, cd Downloads will do the trick).
Open up the Disks tool and identify the ID and size of the partition that the wallet was on. The ID is something like /dev/sda3.
Back in the terminal, run the following command:

Code:
python pywallet--recover --recov_size 30.1Gio --recov_device /dev/sda3 --recov_outputdir ~/Desktop/recov

Replace /dev/sda3 with the ID of the partition you found in the Disks tool.
Replace 30.1Gio with the size of the partition that you also found in the Disks tool. (note that pywallet uses Gio instead of GB to mean Gigabytes).
If you need more details or live assistance, just PM me or email me at my username at gmail dot com and I'll try to help.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
ArtFactor
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
August 24, 2017, 02:50:04 PM
 #18

Greatings!
Can you guys help me pls?
How can i reset the password of my corrupted wallet.dat so i can find privkey in hex editor?
I know the password.
tk808
Hero Member
*****
Offline Offline

Activity: 840
Merit: 536


Invest in your knowledge


View Profile WWW
December 31, 2017, 08:11:11 PM
 #19

I had a coldstorage machine with over 50 altcoins that was heavily encrypted (3 encryptions: Window's Bitlocker (I had the file key), Bitdefender, and the Wallet.dat passphrase) (the mindset of 2013-2014 was much different now). I recovered all the formatted harddrive's data using a data recovery software, found all 50 wallets and then recovered them.

So now time to actually use these old 2014 wallet.dat files, and unfortunately every time i tried each wallet, i got "wallet.dat is corrupted can't be salvaged", i tried pywallet, hexeditors and etc, i'm a novice when it comes to computer coding.

I finally resolved the issue by first trying -salvagewallet command in the exe wallet file, and the wallet would close immediately. I tried then downloading the older versions (2014) files of the wallets, those still woulden't work.

The last thing i tried was -upgradewallet command, and executed the file. And behold, it worked (i think). I posted this being very ampped up and excited, but i see the QT wallet opened and i see 1 transaction in the history. I'll keep you guys updated when i actually make a transaction.

I've started with Vertcoin (the newest wallet available).


Step-by-step for beginners:

1) Download the latest QT wallet.
2) Don't start it, if you've already downloaded blocks, then delete the entire roaming folder (except wallet.dat)
3) Place your wallet.dat file in the roaming folder
4) Create a shortcut of the QT file, and add -upgradewallet in the executable line.
5) Open the wallet


After reading and reviewing several articles on Bitcointalk and spending 2-3 hours trying to recover old coins, i found this to work.

Edit: Yeah, this worked for me most of the time. I unlocked the wallet with my old passphrase list, and dumped the private keys, and imported them to electrum. Got my final balance and everything! Keep hunting and you'll find a solution that works to open your corrupted wallet.

Edit 2: After trying other wallets, i realized that if a coin had a fork in the chain, you will need to use older wallet versions, specifically the version of the wallet you first made the wallet.dat on. I also had noticed that my restore backup made sometimes 3 different versions of my wallet.dat files, and one would work only. I used EaseUS data recovery fyi.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!