Where is bitcoin.conf and why doesn't bitcoind find existing datadir v0.17.1
The syntax should be

bitcoind -datadir=/mnt/d/blockchain -txindex


Note the = sign.

This will look for the bitcoin.conf file at /mnt/d/blockchain/bitcoin.conf and will store the blockchain, databases, wallet files, etc, all in /mnt/d/blockchain.  With this option, Bitcoin Core shouldn't read or write anything in ~/.bitcoin at all.