Skip to content

ROCKPro64 - Armbian - Go & Restic installieren!

Verschoben Armbian
  • Da ich ja heute ziemlich gescheitert bin, Go und Restic zu installieren, hier mal ein neuer Ansatz. Ich will ja immer noch die USB3 HDD in mein NAS einbauen 🙂

    Go installieren

    Das File holen, ich hatte natürlich vorher das Falsche installiert 😞 Naja, macht nix. Hier das Richtige für den ROCKPro64 mit Armbian.

    wget https://dl.google.com/go/go1.11.4.linux-arm64.tar.gz
    

    Das File dann auspacken nach /usr/local

    tar -C /usr/local -xzf go1.11.4.linux-arm64.tar.gz
    

    Danach im Profil den Suchpfad für das Programm einbauen.

    nano /etc/profile
    

    Ganz ans Ende folgendes einfügen.

    export PATH=$PATH:/usr/local/go/bin
    

    Danach funktioniert die Programmiersprache Go wie gewünscht.

    root@rockpro64:~# go version
    go version go1.11.4 linux/arm64
    

    Restic

    Das File bei guthub abholen.

    root@rockpro64:/home/frank# git clone https://github.com/restic/restic
    Cloning into 'restic'...
    remote: Enumerating objects: 6, done.
    remote: Counting objects: 100% (6/6), done.
    remote: Compressing objects: 100% (6/6), done.
    remote: Total 49414 (delta 1), reused 0 (delta 0), pack-reused 49408
    Receiving objects: 100% (49414/49414), 54.98 MiB | 7.39 MiB/s, done.
    Resolving deltas: 100% (30365/30365), done.
    

    Ins Verzeichnis wechseln.

    root@rockpro64:/home/frank# cd restic/
    

    Restic bauen

    root@rockpro64:/home/frank/restic# go run build.go
    go: finding github.com/inconshreveable/mousetrap v1.0.0
    go: finding github.com/pkg/xattr v0.3.1
    go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
    go: finding github.com/russross/blackfriday v1.5.1
    go: finding github.com/satori/go.uuid v1.2.0
    go: finding github.com/spf13/cobra v0.0.3
    go: finding github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2
    go: finding github.com/pmezard/go-difflib v1.0.0
    go: finding cloud.google.com/go v0.27.0
    go: finding gopkg.in/ini.v1 v1.38.2
    go: finding github.com/Azure/azure-sdk-for-go v20.1.0+incompatible
    go: finding golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
    go: finding github.com/elithrar/simple-scrypt v1.3.0
    go: finding github.com/mattn/go-isatty v0.0.4
    go: finding golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
    go: finding gopkg.in/yaml.v2 v2.2.1
    go: finding google.golang.org/appengine v1.1.0
    go: finding github.com/google/go-cmp v0.2.0
    go: finding gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
    go: finding github.com/pkg/profile v1.2.1
    go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
    go: finding google.golang.org/api v0.0.0-20180907210053-b609d5e6b7ab
    go: finding golang.org/x/text v0.3.0
    go: finding github.com/pkg/sftp v1.8.2
    go: finding github.com/minio/minio-go v6.0.7+incompatible
    go: finding github.com/restic/chunker v0.2.0
    go: finding github.com/kr/pretty v0.1.0
    go: finding github.com/jtolds/gls v4.2.1+incompatible
    go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
    go: finding github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c
    go: finding github.com/go-ini/ini v1.38.2
    go: finding github.com/cpuguy83/go-md2man v1.0.8
    go: finding github.com/golang/protobuf v1.2.0
    go: finding golang.org/x/sys v0.0.0-20180525142821-c11f84a56e43
    go: finding github.com/pkg/errors v0.8.0
    go: finding golang.org/x/sys v0.0.0-20180907202204-917fdcba135d
    go: finding github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a
    go: finding github.com/kurin/blazer v0.5.1
    go: finding github.com/stretchr/testify v1.2.2
    go: finding github.com/mitchellh/go-homedir v1.0.0
    go: finding golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
    go: finding github.com/cenkalti/backoff v2.0.0+incompatible
    go: finding github.com/Azure/go-autorest v10.15.3+incompatible
    go: finding github.com/ncw/swift v1.0.41
    go: finding github.com/juju/ratelimit v1.0.1
    go: finding github.com/kr/fs v0.1.0
    go: finding github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf
    go: finding github.com/davecgh/go-spew v1.1.1
    go: finding github.com/kr/text v0.1.0
    go: finding github.com/hashicorp/golang-lru v0.5.0
    go: finding github.com/spf13/pflag v1.0.2
    go: finding github.com/marstr/guid v1.1.0
    go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
    go: finding github.com/kr/pty v1.1.1
    go: finding bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
    root@rockpro64:/home/frank/restic#
    

    Fertig! Restic läuft?

    root@rockpro64:/home/frank/restic# ./restic
    
    restic is a backup program which allows saving multiple revisions of files and
    directories in an encrypted repository stored on different backends.
    
    Usage:
      restic [command]
    
    Available Commands:
      backup        Create a new backup of files and/or directories
      cache         Operate on local cache directories
      cat           Print internal objects to stdout
      check         Check the repository for errors
      diff          Show differences between two snapshots
      dump          Print a backed-up file to stdout
      find          Find a file, a directory or restic IDs
      forget        Remove snapshots from the repository
      generate      Generate manual pages and auto-completion files (bash, zsh)
      help          Help about any command
      init          Initialize a new repository
      key           Manage keys (passwords)
      list          List objects in the repository
      ls            List files in a snapshot
      migrate       Apply migrations
      mount         Mount the repository
      prune         Remove unneeded data from the repository
      rebuild-index Build a new index file
      recover       Recover data from the repository
      restore       Extract the data from a snapshot
      self-update   Update the restic binary
      snapshots     List all snapshots
      stats         Scan the repository and show basic statistics
      tag           Modify tags on snapshots
      unlock        Remove locks other processes created
      version       Print version information
    
    Flags:
          --cacert file              file to load root certificates from (default: use system certificates)
          --cache-dir string         set the cache directory. (default: use system default cache directory)
          --cleanup-cache            auto remove old cache directories
      -h, --help                     help for restic
          --json                     set output mode to JSON for commands that support it
          --key-hint string          key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
          --limit-download int       limits downloads to a maximum rate in KiB/s. (default: unlimited)
          --limit-upload int         limits uploads to a maximum rate in KiB/s. (default: unlimited)
          --no-cache                 do not use a local cache
          --no-lock                  do not lock the repo, this allows some operations on read-only repos
      -o, --option key=value         set extended option (key=value, can be specified multiple times)
      -p, --password-file string     read the repository password from a file (default: $RESTIC_PASSWORD_FILE)
      -q, --quiet                    do not output comprehensive progress report
      -r, --repo string              repository to backup to or restore from (default: $RESTIC_REPOSITORY)
          --tls-client-cert string   path to a file containing PEM encoded TLS client certificate and private key
      -v, --verbose n                be verbose (specify --verbose multiple times or level n)
    
    Use "restic [command] --help" for more information about a command.
    
    root@rockpro64:/home/frank/restic# ./restic version
    restic 0.9.3 (v0.9.3-83-g0dd80542) compiled with go1.11.4 on linux/arm64
    

    Damit wir das aber an der richtigen Stelle haben, kopieren wir das mal nach /usr/bin

    root@rockpro64:/home/frank/restic# sudo cp restic /usr/bin
    

    Nun kann man das Programm von überall aufrufen.

    root@rockpro64:/home/frank/restic# restic
    
    restic is a backup program which allows saving multiple revisions of files and
    directories in an encrypted repository stored on different backends.
    
    Usage:
      restic [command]
    
    Available Commands:
      backup        Create a new backup of files and/or directories
      cache         Operate on local cache directories
      cat           Print internal objects to stdout
      check         Check the repository for errors
      diff          Show differences between two snapshots
      dump          Print a backed-up file to stdout
      find          Find a file, a directory or restic IDs
      forget        Remove snapshots from the repository
      generate      Generate manual pages and auto-completion files (bash, zsh)
      help          Help about any command
      init          Initialize a new repository
      key           Manage keys (passwords)
      list          List objects in the repository
      ls            List files in a snapshot
      migrate       Apply migrations
      mount         Mount the repository
      prune         Remove unneeded data from the repository
      rebuild-index Build a new index file
      recover       Recover data from the repository
      restore       Extract the data from a snapshot
      self-update   Update the restic binary
      snapshots     List all snapshots
      stats         Scan the repository and show basic statistics
      tag           Modify tags on snapshots
      unlock        Remove locks other processes created
      version       Print version information
    
    Flags:
          --cacert file              file to load root certificates from (default: use system certificates)
          --cache-dir string         set the cache directory. (default: use system default cache directory)
          --cleanup-cache            auto remove old cache directories
      -h, --help                     help for restic
          --json                     set output mode to JSON for commands that support it
          --key-hint string          key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
          --limit-download int       limits downloads to a maximum rate in KiB/s. (default: unlimited)
          --limit-upload int         limits uploads to a maximum rate in KiB/s. (default: unlimited)
          --no-cache                 do not use a local cache
          --no-lock                  do not lock the repo, this allows some operations on read-only repos
      -o, --option key=value         set extended option (key=value, can be specified multiple times)
      -p, --password-file string     read the repository password from a file (default: $RESTIC_PASSWORD_FILE)
      -q, --quiet                    do not output comprehensive progress report
      -r, --repo string              repository to backup to or restore from (default: $RESTIC_REPOSITORY)
          --tls-client-cert string   path to a file containing PEM encoded TLS client certificate and private key
      -v, --verbose n                be verbose (specify --verbose multiple times or level n)
    
    Use "restic [command] --help" for more information about a command.
    
    root@rockpro64:/home/frank/restic# restic version
    restic 0.9.3 (v0.9.3-83-g0dd80542) compiled with go1.11.4 on linux/arm64
    root@rockpro64:/home/frank/restic# 
    

    Wenn sich jemand fragt, warum man das selber baut und damit natürlich ein wenig Arbeit hat. Das Restic was in den normalen Quellen ist, ist viel zu alt. Kann ich nicht gebrauchen.

    Wieder ein Schritt weiter!! 🙂 Jetzt kann ich ja das NAS wieder in Angriff nehmen!

  • Der frühe Vogel.... 🙂

    IMG_20181226_072626_ergebnis.jpg

    Das oben geschriebene eben nochmal durchgeführt, funktioniert einwandfrei. Jetzt kann ich die USB3-Platte umbauen und den Job verlagern. Dann habe ich einen ROCKPro64 wieder frei zum Testen 😉

  • Mainline 5.13.x

    Images
    1
    0 Stimmen
    1 Beiträge
    176 Aufrufe
    Niemand hat geantwortet
  • Armbian Images

    Armbian
    1
    0 Stimmen
    1 Beiträge
    251 Aufrufe
    Niemand hat geantwortet
  • Armbian 20.08 (Caple) released

    Armbian
    1
    0 Stimmen
    1 Beiträge
    292 Aufrufe
    Niemand hat geantwortet
  • SATA Adapter - SSD kopieren

    Hardware
    1
    0 Stimmen
    1 Beiträge
    179 Aufrufe
    Niemand hat geantwortet
  • ROCKPro64 - Armbian Desktop Variante

    Verschoben Armbian
    1
    0 Stimmen
    1 Beiträge
    501 Aufrufe
    Niemand hat geantwortet
  • ROCKPro64 - Armbian nand-sata-install

    Verschoben Armbian
    14
    0 Stimmen
    14 Beiträge
    2k Aufrufe
    FrankMF

    Ich habe heute, nachdem es einige Updates von Armbian gab, mal nachgeschaut ob ein spezieller Fehler verschwunden ist.
    Und zwar geht es um das Resizen der Partion nachdem wir Armbian auf eine USB-HDD (USB3) installiert haben.

    Ich setze dafür folgendes System ein.

    Hardware ROCKPro64v2.0 4GB RAM SanDisk 240GB 2,5 Zoll HDD (nix tolles) Software Welcome to ARMBIAN 5.67.181217 nightly Debian GNU/Linux 9 (stretch) 4.4.167-rockchip64

    Was sehe ich nach dem Reboot?

    root@rockpro64:~# df -h Filesystem Size Used Avail Use% Mounted on udev 1.9G 0 1.9G 0% /dev tmpfs 388M 5.3M 383M 2% /run /dev/sda1 220G 1.3G 207G 1% / tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup tmpfs 1.9G 4.0K 1.9G 1% /tmp /dev/mmcblk0p1 58G 1.3G 57G 3% /media/mmcboot /dev/zram0 49M 3.0M 43M 7% /var/log tmpfs 388M 0 388M 0% /run/user/0

    Korrekt die Größe angepasst!

    Schnell mal den USB3 testen

    root@rockpro64:~# sudo dd if=/dev/zero of=sd.img bs=1M count=4096 conv=fdatasync 4096+0 records in 4096+0 records out 4294967296 bytes (4.3 GB, 4.0 GiB) copied, 38.0723 s, 113 MB/s

    Der Adapter

    root@rockpro64:~# lsusb -vvv Bus 004 Device 002: ID 2109:0715 VIA Labs, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x2109 VIA Labs, Inc. idProduct 0x0715 bcdDevice 1.31 iManufacturer 1 VLI Manufacture String iProduct 2 VLI Product String iSerial 3 000000123ADA bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 121 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 224mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 1 bNumEndpoints 4 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 98 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Command pipe (0x01) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-in pipe (0x03) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-out pipe (0x04) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 MaxStreams 32 Status pipe (0x02) Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 70 bNumDeviceCaps 4 FIXME: alloc bigger buffer for device capability descriptors Device Status: 0x0000 (Bus Powered)

    Ein lästiger Fehler weniger. 😉

  • Kernel updaten NVMe / SDCard

    Verschoben ROCKPro64
    1
    0 Stimmen
    1 Beiträge
    866 Aufrufe
    Niemand hat geantwortet
  • Unterstützung Lüfter

    ROCKPro64
    5
    0 Stimmen
    5 Beiträge
    2k Aufrufe
    FrankMF

    Mit dem neuen Release hatte jemand das mal ausprobiert -> https://forum.frank-mankel.org/topic/795/fan-control-omv-auyfan-0-10-12-gitlab-ci-linux-build-184-kernel-5-6/6

    Dieser Kernel kam zur Anwendung

    Linux rockpro64 5.6.0-1137-ayufan-ge57f05e7bf8f #ayufan SMP Wed Apr 15 10:16:02 UTC 2020 aarch64 GNU/Linux

    Dort stellt man dann fest, das sich eine Kleinigkeit geändert hat. Der Pfad und der Dateiname hat sich geändert.

    Kontrollieren kann man das mit

    nano /sys/devices/platform/pwm-fan/hwmon/hwmon3/pwm1

    Der Wert geht von 0 - 255, wie gehabt.