Make sure that you have a backup of the corrupted wallet before doing this even though it's corrupted back ups are handy to keep around to try other ways of recovering the data. You could create a small partition on a flash drive, and copy the corrupted wallet.dat to that partition. Before following this guide you can also try and find the mkey and ckey with a hex editor to see if there are any addresses that are in the corrupted file.
Then run this via pywallet command:
sudo ./pywallet.py --recover --recov_device --recov_size 1Gio --recov_outputdir
If the command worked correctly, it will now ask you to enter your password, which if correct will then show a message along the lines of:
All the found encrypted private keys have been decrypted.
The wallet is encrypted and the passphrase is correct
If everything has been followed and has worked it should then start importing the keys, which you can then check to see if any of these change addresses contain any of your Bitcoin.
I have successfully copied wallet.dat that is "corrupt, salvage failed". I'm trying to recover it with pywallet following your advice (I found some old 2.5" HDD for that and made an 1Gb partition), but with no result no matter what exactly am I trying to do. I was trying to recover the wallet reading the partition first and then the file itself, but every time I get this (in case of partition reading):
or this (in case of readinf the wallet.dat itself):
Note that I know the password for damaged wallet.dat, but why there are no any keys after scanning?
In case of another wallet.dat, for which I don't know the exact password, I see some result:
Read 0.0 Go in 0.0 minutes
Found 1 possible wallets
Found 329 possible encrypted keys
Found 0 possible unencrypted keys
Possible wallet #1
with passphrase #1
Private keys not decrypted: 329
Trying all the remaining possibilities (329) might take up to 1 minutes.
Do you want to test them? (y/n): y
But how can I recover that first wallet, which seems to be invisible for pywallet?