1

So I own a device (casa node) which is basically a raspberry pi 3b+ with a hard drive and a modified OS (they call it CasaOS) and I want to edit a file. I found the location of this file by looking at the debug logs of the program that uses it. here's what they look like:

2019-01-05T22:11:44Z Bitcoin Core version v0.17.0 (release build)
2019-01-05T22:11:44Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrel$2019-01-05T22:11:44Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 hav$2019-01-05T22:11:44Z Setting nMinimumChainWork=0000000000000000000000000000000000000000028822fef1c230963535a90d
2019-01-05T22:11:44Z Using the 'standard' SHA256 implementation
2019-01-05T22:11:44Z Default data directory /root/.bitcoin
2019-01-05T22:11:44Z Using data directory /usr/local/casa/chains/bitcoind/data/
2019-01-05T22:11:44Z Using config file /usr/local/casa/chains/bitcoind/conf/bitcoin.conf

The bitcoin.conf is the on I'm after, however I can't get in the directory. Once I'm in /usr/local/casa I can't see or cd into the chains dir. the ls -a command returns

.  ..  applications  launch.sh

How can I get in the chains folder and ultimately to the bitcoin.conf file? I did all of this as root.

Paradox
  • 1,369
  • 3
  • 13
  • 27
Relaxo143
  • 11
  • 1
  • Is the application chrooted? I.e. does it have a displaced root directory under which the path exists? What's, for example, under `/root/.bitcoin/usr/local/...`? – Kusalananda Apr 04 '19 at 21:37
  • K7AAY, if you mean sudo ls -a, then it returns the same thing. Kusalananda, I have no idea how to check that. Does that help? root@casa-node:/usr/local/casa# ls -al total 16 drwxr-sr-x 3 root staff 4096 Dec 5 16:30 . drwxrwsr-x 11 root staff 4096 Nov 14 01:50 .. drwxr-sr-x 2 root staff 4096 Apr 2 14:54 applications -rwxr-xr-x 1 root root 321 Apr 4 12:53 launch.sh – Relaxo143 Apr 04 '19 at 21:39
  • 1
    You might try to use find: find / -name bitcoin.conf – Fitz Apr 05 '19 at 04:58
  • 1
    Oh my God Fitz, you are literally the best. Thanks. The actual path was `/mnt/data/overlay2/60fe75e985602eb59c95fb97c0002750e4a41935c02a9d73472b8997f52a879e/diff/usr/local/casa/chains/bitcoind/conf/bitcoin.conf` I would have never found it myself if it wasn't for you! Thanks to the others for the great tips and effort too! – Relaxo143 Apr 05 '19 at 10:26

1 Answers1

0

This answer is made from the comments of Fitz and the Questioner:

To find the file:

find / -name bitcoin.conf

This shows that the file is present in: /mnt/data/overlay2/60fe75e985602eb59c95fb97c0002750e4a41935c02a9d73472b8997f52a879e/diff/usr/local/casa/chains/bitcoind/conf/bitcoin.conf

Which can be mounted on a different path. Note /mnt/ is used as the default mount point for devices. You have to run these commands as root (prepending sudo)

umount /dev/sdx
mount /dev/sdx /usr/local/casa/chains/bitcoind

Or use:

mount -o remount, rw /dev/sdx /usr/local/casa/chains/bitcoind

The file can be edited as long as the device it's on is mounted, whether on default mount point /mnt or the path it is mounted on after the manual mounting

ToxicMender
  • 639
  • 5
  • 5