Skip to content

Instantly share code, notes, and snippets.

@kristapsk
Last active December 2, 2021 00:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristapsk/79049d6da791ac5f44c4b655b5d50e4e to your computer and use it in GitHub Desktop.
Save kristapsk/79049d6da791ac5f44c4b655b5d50e4e to your computer and use it in GitHub Desktop.
Odroid HC4 RaspiBolt installation notes

Odroid HC4 RaspiBolt installation notes

Upgrading

Upgrading kernel will make it unbootable.

# apt update
# apt-mark hold linux-odroid-c4
linux-odroid-c4 set on hold.
# apt upgrade

Attaching "external" drive (two drive mdraid mirror)

# apt install mdadm parted
# mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda /dev/sdb
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
Continue creating array? y
mdadm: Fail create md1 when using /sys/module/md_mod/parameters/new_array
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md1 started.
# cat /proc/mdstat
Personalities : [raid1] 
md1 : active raid1 sdb[1] sda[0]
      976630464 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  0.3% (3601792/976630464) finish=81.0min speed=200099K/sec
      bitmap: 8/8 pages [32KB], 65536KB chunk

unused devices: <none>
# parted /dev/md1
GNU Parted 3.3
Using /dev/md1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                      
(parted) mkpart                                                           
Partition name?  []?                                                      
File system type?  [ext2]? ext4                                           
Start? 1M
End? -1                                                                   
(parted) quit                                                             
Information: You may need to update /etc/fstab.
# mkfs.ext4 /dev/md1p1
# lsblk -o NAME,MOUNTPOINT,UUID,FSTYPE,SIZE,LABEL,MODEL
NAME        MOUNTPOINT UUID                                 FSTYPE             SIZE LABEL    MODEL
sda                    99f94ac0-b22f-1b7e-6e7b-2a77f6b67f3a linux_raid_membe 931.5G odroid:1 WDC_WDS100T1R0A-68A4W
└─md1                                                                        931.4G          
  └─md1p1              199f9135-a1a8-4b0a-aad0-03b828e29cc4 ext4             931.4G          
sdb                    99f94ac0-b22f-1b7e-6e7b-2a77f6b67f3a linux_raid_membe 931.5G odroid:1 WDC_WDS100T1R0A-68A4W
└─md1                                                                        931.4G          
  └─md1p1              199f9135-a1a8-4b0a-aad0-03b828e29cc4 ext4             931.4G          
mmcblk0                                                                       29.8G          
├─mmcblk0p1 /media/boo F702-39CB                            vfat               128M BOOT     
└─mmcblk0p2 /          e139ce78-9841-40fe-8823-96a304a09859 ext4              29.7G rootfs   
# mkdir /mnt/ext
# nano -w /etc/fstab
# mount -a
# df -h /mnt/ext
Filesystem      Size  Used Avail Use% Mounted on
/dev/md1p1      916G   77M  870G   1% /mnt/ext

Installing Tor

Had problems with added torproject repository, ended up installing tor from default sources (just ignore whole editing /etc/apt/sources.list and signing keys part).

Bitcoin installation

Changes for aarch64 and 22.0+.

$ wget https://bitcoincore.org/bin/bitcoin-core-22.0/bitcoin-22.0-aarch64-linux-gnu.tar.gz
$ wget https://bitcoincore.org/bin/bitcoin-core-22.0/SHA256SUMS
$ sha256sum --check SHA256SUMS --ignore-missing
bitcoin-22.0-aarch64-linux-gnu.tar.gz: OK
$ wget https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/builder-keys/keys.txt
$ cat keys.txt | cut -f 1 -d ' ' | while read key; do gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys $key; done
$ wget https://bitcoincore.org/bin/bitcoin-core-22.0/SHA256SUMS.asc
$ gpg --verify SHA256SUMS.asc
$ tar -xvf bitcoin-22.0-aarch64-linux-gnu.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-22.0/bin/*
$ bitcoind --version
Bitcoin Core version v22.0.0

LND installation

$ cd /tmp
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.13.1-beta/lnd-linux-arm64-v0.13.1-beta.tar.gz
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.13.1-beta/manifest-v0.13.1-beta.txt
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.13.1-beta/manifest-roasbeef-v0.13.1-beta.sig
$ wget -O roasbeef.asc https://keybase.io/roasbeef/pgp_keys.asc
$ sha256sum --check manifest-v0.13.1-beta.txt --ignore-missing
lnd-linux-arm64-v0.13.1-beta.tar.gz: OK
$ gpg ./roasbeef.asc
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
pub   rsa4096 2019-10-13 [C]
      E4D85299674B2D31FAA1892E372CBD7633C61696
uid           Olaoluwa Osuntokun <laolu32@gmail.com>
sub   rsa4096 2019-10-13 [E] [expires: 2024-10-11]
sub   rsa4096 2019-10-13 [S] [expires: 2024-10-11]
sub   rsa4096 2019-10-13 [A] [expires: 2024-10-11]
$ gpg --import ./roasbeef.asc
$ gpg --verify manifest-roasbeef-v0.13.1-beta.sig manifest-v0.13.1-beta.txt
gpg: Signature made Mon Jul 19 21:41:37 2021 UTC
gpg:                using RSA key 60A1FA7DA5BFF08BDCBBE7903BBD59E99B280306
gpg: Good signature from "Olaoluwa Osuntokun <laolu32@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: E4D8 5299 674B 2D31 FAA1  892E 372C BD76 33C6 1696
     Subkey fingerprint: 60A1 FA7D A5BF F08B DCBB  E790 3BBD 59E9 9B28 0306
$ tar -xzf lnd-linux-arm64-v0.13.1-beta.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm64-v0.13.1-beta/*
$ lnd --version
lnd version 0.13.1-beta commit=v0.13.1-beta

Electrs installation

# download
$ cd /tmp
$ curl https://static.rust-lang.org/dist/rust-1.55.0-aarch64-unknown-linux-gnu.tar.gz -o rust.tar.gz
$ curl https://static.rust-lang.org/dist/rust-1.55.0-aarch64-unknown-linux-gnu.tar.gz.asc -o rust.tar.gz.asc
$ curl https://keybase.io/rust/pgp_keys.asc | gpg --import

# verify
$ gpg --verify rust.tar.gz.asc rust.tar.gz
gpg: Signature made Thu Sep  9 14:00:22 2021 UTC
gpg:                using RSA key 85AB96E6FA1BE5FE
gpg: Good signature from "Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 108F 6620 5EAE B0AA A8DD  5E1C 85AB 96E6 FA1B E5FE

# install
$ mkdir /home/admin/rust
$ tar --strip-components 1 -C /home/admin/rust -xzvf rust.tar.gz
$ cd /home/admin/rust
$ sudo ./install.sh
$ sudo apt install clang cmake
# download
$ cd /home/admin/rust
$ electrsgit=$(curl -s https://api.github.com/repos/romanz/electrs/tags | jq -r '.[0].name')
$ git clone --branch ${electrsgit} https://github.com/romanz/electrs.git
$ cd electrs

# compile
$ cargo build --locked --release

# install
$ sudo cp ./target/release/electrs /usr/local/bin/

(my device become totally unresponsible during first build attempt at 181/189, needed to manually poweroff/poweron, after reboot build succeeded)

RTL installation

To install RTL, you need Node v16. By defaul you will have Node v14 for now. To upgrade:

$ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
$ sudo sh -c "echo deb https://deb.nodesource.com/node_16.x focal main > /etc/apt/sources.list.d/nodesource.list"
$ sudo apt update
$ sudo apt install nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment