<p>Just something to check quick. What are the file permissions on the folder and files you are trying to access. You may want to set them to 777 temporarily and try opening it just to rule out that it's not a permission issue.</p>

<p>Edit: A .lock file of size 0 does not tell us anything. My client is running perfectly and also has one just fyi.</p>

CC BY-SA 3.0
2013-12-22T21:06:37.460Z
The permissions should be fine. The user under which I run bitcoind can write/delete from that shared directory. Running "chmod -R 777 vboxshare2" does not help.
Kozuch
CC BY-SA 3.0
2013-12-22T21:13:46.547Z
have you tried starting bitcoin with starting bitcoin with the datadir=\new directory\ flag. Also do you need to run bitcoin-qt instead of one of the lighter wallets?
michael.schuett
CC BY-SA 3.0
2013-12-22T21:19:59.083Z
Yes I use the -datadir=/home/kozuch/vboxshare2 parameter if that is what you are asking. And yes I want to run the full client.
Kozuch
CC BY-SA 3.0
2013-12-22T21:29:05.340Z
Very odd issue. Last thing I can think of is running bitcoin with -checklevel=2.
michael.schuett
CC BY-SA 3.0
2013-12-22T20:57:07.780Z
2013-12-22T21:04:39.293Z
2013-12-22T21:04:39.293Z
michael.schuett
<p>It should be compatible if your running one instance at a time, BUT I think that the datadir is being locked. 
Try to find more details in the logs, it should tell you the reason of the error which could be anything.
if you are running any bitcoin software on windows stop it and try to restart bitcoind from your linux box. <br /></p>

<p>EDIT: Did you install bitcoind and run it as root? if not, can you try to chown -R  ~/.bitcoin as root, not the db folder itself, it still can be a permission issue, </p>

CC BY-SA 3.0
2013-12-22T20:16:26.963Z
2013-12-22T23:14:45.113Z
2013-12-22T23:14:45.113Z
user10950
<p>I want to use my Windows 7 Bitcoin database (the block chain I downloaded + my wallets) on Linux (Debian). I run Debian as VirtualBox guest on Windows 7 host and share the Bitcoin data folder (C:/Users/Username/AppData/Roaming/Bitcoin/) as a folder to Debian.</p>

<p>However bitcoind on Debian with proper -datadir parameter says "Error opening block database. Do you want to rebuild the block database now?" message. This brings me to the question whether the databases are compatible between Windows and Linux at all.</p>

<p><strong>Edit 1:</strong>
I am using one Bitcoin instance at a time. I realized I get the same error even when using en empty data directory that is mounted via VirtualBox on the host.</p>

<p>Here is the debug.log (same for empty or full data directory):</p>

<pre><code>2013-12-22 20:49:07 Bitcoin version v0.8.6-dirty-beta (2013-12-05 13:11:26 +0100)
2013-12-22 20:49:07 Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
2013-12-22 20:49:07 Default data directory /home/kozuch/.bitcoin
2013-12-22 20:49:07 Using data directory /home/kozuch/vboxshare2
2013-12-22 20:49:07 Using at most 125 connections (1024 file descriptors available)
2013-12-22 20:49:07 init message: Verifying wallet...
2013-12-22 20:49:07 dbenv.open LogDir=/home/kozuch/vboxshare2/database ErrorFile=/home/kozuch/vboxshare2/db.log
2013-12-22 20:49:07 Bound to [::]:8333
2013-12-22 20:49:07 Bound to 0.0.0.0:8333
2013-12-22 20:49:07 init message: Loading block index...
2013-12-22 20:49:07 Opening LevelDB in /home/kozuch/vboxshare2/blocks/index
2013-12-22 20:49:07 : Error opening block database.
Do you want to rebuild the block database now?
2013-12-22 20:49:07 Shutdown : In progress...
2013-12-22 20:49:07 Flush(false)
2013-12-22 20:49:07 DBFlush(false) ended               0ms
2013-12-22 20:49:07 StopNode()
2013-12-22 20:49:07 Flushed 0 addresses to peers.dat  4ms
2013-12-22 20:49:07 Flush(true)
2013-12-22 20:49:07 DBFlush(true) ended               1ms
2013-12-22 20:49:07 Shutdown : done
</code></pre>

<p>Seems like the problem might be with following:</p>

<pre><code>ErrorFile=/home/kozuch/vboxshare2/db.log
</code></pre>

<p><strong>Edit 2:</strong>
There also is a .lock file with 0 size in the datadir after I get the error.</p>

<p><strong>Edit 3:</strong>
So "ErrorFile=/home/kozuch/vboxshare2/db.log" was not a problem. I get this error for a working instance locally (without shared data folder).</p>

CC BY-SA 3.0
2013-12-24T01:11:09.700Z
can you check if all the files in bitcoin folder are owned by the same user you are using? if not try to chown -R ~/.bitcoin as root
user10950
<blockchain><linux><windows><error><database>
Is Bitcoin database cross platform compatible?
Kozuch
# Is Bitcoin database cross platform compatible?

(Asked by: username_0 on 2013-12-22)

I want to use my Windows 7 Bitcoin database (the block chain I downloaded + my wallets) on Linux (Debian). I run Debian as VirtualBox guest on Windows 7 host and share the Bitcoin data folder (C:/Users/Username/AppData/Roaming/Bitcoin/) as a folder to Debian.

However bitcoind on Debian with proper -datadir parameter says "Error opening block database. Do you want to rebuild the block database now?" message. This brings me to the question whether the databases are compatible between Windows and Linux at all.

**Edit 1:**
I am using one Bitcoin instance at a time. I realized I get the same error even when using en empty data directory that is mounted via VirtualBox on the host.

Here is the debug.log (same for empty or full data directory):

```
2013-12-22 20:49:07 Bitcoin version v0.8.6-dirty-beta (2013-12-05 13:11:26 +0100)
2013-12-22 20:49:07 Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
2013-12-22 20:49:07 Default data directory /home/username_0/.bitcoin
2013-12-22 20:49:07 Using data directory /home/username_0/vboxshare2
2013-12-22 20:49:07 Using at most 125 connections (1024 file descriptors available)
2013-12-22 20:49:07 init message: Verifying wallet...
2013-12-22 20:49:07 dbenv.open LogDir=/home/username_0/vboxshare2/database ErrorFile=/home/username_0/vboxshare2/db.log
2013-12-22 20:49:07 Bound to [::]:8333
2013-12-22 20:49:07 Bound to 0.0.0.0:8333
2013-12-22 20:49:07 init message: Loading block index...
2013-12-22 20:49:07 Opening LevelDB in /home/username_0/vboxshare2/blocks/index
2013-12-22 20:49:07 : Error opening block database.
Do you want to rebuild the block database now?
2013-12-22 20:49:07 Shutdown : In progress...
2013-12-22 20:49:07 Flush(false)
2013-12-22 20:49:07 DBFlush(false) ended               0ms
2013-12-22 20:49:07 StopNode()
2013-12-22 20:49:07 Flushed 0 addresses to peers.dat  4ms
2013-12-22 20:49:07 Flush(true)
2013-12-22 20:49:07 DBFlush(true) ended               1ms
2013-12-22 20:49:07 Shutdown : done

```

Seems like the problem might be with following:

```
ErrorFile=/home/username_0/vboxshare2/db.log

```

**Edit 2:**
There also is a .lock file with 0 size in the datadir after I get the error.

**Edit 3:**
So "ErrorFile=/home/username_0/vboxshare2/db.log" was not a problem. I get this error for a working instance locally (without shared data folder).

**Tags:** blockchain, linux, windows, error, database

> **Comments:**
> **username_1**: can you check if all the files in bitcoin folder are owned by the same user you are using? if not try to chown -R ~/.bitcoin as root  

---

## 2 answers

### Answer by username_2 on 2013-12-22. Score: 1

Just something to check quick. What are the file permissions on the folder and files you are trying to access. You may want to set them to 777 temporarily and try opening it just to rule out that it's not a permission issue.

Edit: A .lock file of size 0 does not tell us anything. My client is running perfectly and also has one just fyi.

> **Comments:**
> **username_0**: The permissions should be fine. The user under which I run bitcoind can write/delete from that shared directory. Running "chmod -R 777 vboxshare2" does not help.  
> **username_2**: have you tried starting bitcoin with starting bitcoin with the datadir=\new directory\ flag. Also do you need to run bitcoin-qt instead of one of the lighter wallets?  
> **username_0**: Yes I use the -datadir=/home/username_0/vboxshare2 parameter if that is what you are asking. And yes I want to run the full client.  
> **username_2**: Very odd issue. Last thing I can think of is running bitcoin with -checklevel=2.  

---

### Answer by username_1 on 2013-12-22. Score: 1

It should be compatible if your running one instance at a time, BUT I think that the datadir is being locked.
Try to find more details in the logs, it should tell you the reason of the error which could be anything.
if you are running any bitcoin software on windows stop it and try to restart bitcoind from your linux box.

EDIT: Did you install bitcoind and run it as root? if not, can you try to chown -R ~/.bitcoin as root, not the db folder itself, it still can be a permission issue,


---

