Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: kloinko1n on August 08, 2011, 09:36:37 AM



Title: Bitcoin doesn't start up anymore in Tiny Core Linux VM after a power off
Post by: kloinko1n on August 08, 2011, 09:36:37 AM
After my laptop switched off automatically when the battery got exhausted during a blackout, I'm not able anymore to start bitcoin in the Tiny Core Linux VM.
It looks easy enough to solve, because the error message is:
Code:
error loading blkindex.dat
so probably I have to remove that file, after which bitcoin will probably start up fine and will reload the blockchain.

However, looking in the .bitcoin (data) directory, I see all the files having ownership tc:staff, except for the blk0001.dat, which has root:dat.
Code:
tc@box:~/.bitcoin$ ll
total 645460
-rw-------    1 tc       staff        24576 Aug  8 08:09 __db.001
-rw-------    1 tc       staff      1130496 Aug  8 08:09 __db.002
-rw-------    1 tc       staff       270336 Aug  8 08:09 __db.003
-rw-------    1 tc       staff        98304 Aug  8 08:09 __db.004
-rw-------    1 tc       staff      3891200 Aug  8 08:09 __db.005
-rw-------    1 tc       staff        49152 Aug  8 08:09 __db.006
-rw-------    1 tc       staff     18984960 Aug  8 08:08 addr.dat
-rw-------    1 root     staff    425711616 Aug  8 06:53 blk0001.dat
-rw-------    1 tc       staff    207921152 Aug  8 08:09 blkindex.dat
drwx--S---    2 tc       staff         4096 Aug  8 07:27 database/
-rw-------    1 tc       staff            0 Jun  8 17:39 db.log
-rw-------    1 tc       staff      3037249 Aug  8 08:09 debug.log
-rw-r--r--    1 tc       staff           74 Jun 20 15:31 encryption
-rw-------    1 tc       staff       159744 Aug  8 08:09 wallet.dat
-rw-r--r--    1 tc       staff        34131 Jun 20 15:32 wallet.dat.gpg
tc@box:~/.bitcoin$

Is root-ownership for that one file specifically intended behaviour, or is it a result from the hard switch-off during the blackout?

 ???


Title: Re: Bitcoin doesn't start up anymore in Tiny Core Linux VM after a power off
Post by: kloinko1n on August 11, 2011, 04:57:54 PM
BUMP! :-[


Title: Re: Bitcoin doesn't start up anymore in Tiny Core Linux VM after a power off
Post by: drawoc on August 11, 2011, 09:19:37 PM
Well, no, that's not normal. It may in fact be your problem - try making that owned by tc:staff first and see if it helps.

If not, you should probably delete everything but wallet.dat because some of the other files contain parts of the blockchain and it might be problematic if you only delete part of the blockchain.
(I assume that wallet.dat.gpg and encryption relate to some wallet encryption of yours. If so, keep these too.)


Title: Re: Bitcoin doesn't start up anymore in Tiny Core Linux VM after a power off
Post by: deepceleron on August 13, 2011, 07:23:59 PM
I suppose the question to mull over is how did root get ownership of this file in the first place, did you start bitcoin in single-user mode during recovery perhaps?

-rw-------    1 tc       staff    207921152 Aug  8 08:09 blkindex.dat
-rw-------    1 root     staff    425711616 Aug  8 06:53 blk0001.dat


The permissions are on the left. They are
(1): (-) normal file
(234): (rw-) Owner can read and write (but not execute as a program)
(567): (---) Other members of group cannot read or write
(890): (---) Non-group members cannot read or write

It seems that the owner was changed on the file, but not the group. You can do one of two things, either give permission for all group members to be able to read the file, and/or change the file owner back to tc.

To change the owner, you would use the chown command like so:
sudo chown tc blk0001.dat