kernel – Unable to boot Raspbian on QEMU

recently I have a problem emulating Raspbian on QEMU for a school project.
The teacher provides me a guide, but when I start the qemu emulation appear this error and the emulation stopped.
This is the command: qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -dtb versatile-pbbuster. dtb -kernel kernel-qemu-4.19.50-buster -drive file=2020-02-13- raspbian-buster-lite.img,format=raw -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -serial stdio -no-reboot -k it

And the error: Error log
P.S I’m in Windows 10

Thanks to all.

mining theory – How to install the latest bfgminer binaries directly from terminal without ‘aptitude’ on a raspberry pi 4 8gb running raspbian?

months ago I found an entry on StackExchange or somewhere else on how to install the latest (!) bfgminer binaries directly from terminal. I can not find the stackexchange post, no matter how deep I search here / on Google.

I do not remember if it was a download directly from luke-jr’s website via terminal or from somewhere else. I only remember that it was done via the terminal and it created an executeable shortcut in the /bin/ and/or /usr/bin/ folder.

Visiting the website from luke-jr triggers my anti virus software telling me the website is infected or hosts infected files. So I can’t visit it directly sadly.

Months ago I tried it out on my old RPi and it worked just fine. But now that I had to switch to a newer RPi I can not find or remember the correct terminal command for installing bfgminer binaries directly.

More details about why I need the binaries:
Compiling prints out LOTS of errors for me.
Using ‘sudo aptitude install bfgminer’ needs “aptitude” installed, so I tried to install it and it returned lots of errors, most of the package files where not downloadable (my Internet connection is fine by the way).

Can you help me out with a terminal command that let’s me successfully install bfgminer on raspbian?
On my old Pi I managed to install it without aptitude and without compiling it first.

Thanks so far!

debian – raspbian: dependency fail for usb

I have to following issue with my raspberry. Yesterday I just found out that my usb drive couldn’t be read anymore.
When i do df -h none of the two sd’s are show.

pi@smbmichiel:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  3.6G   11G  27% /
devtmpfs        1.8G     0  1.8G   0% /dev
tmpfs           1.9G  1.8M  1.9G   1% /dev/shm
tmpfs           1.9G  9.6M  1.9G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   48M  205M  19% /boot
tmpfs           383M     0  383M   0% /run/user/999
tmpfs           383M     0  383M   0% /run/user/1000

This was the following output when I used less /var/log/syslog:

Mar 10 16:36:17 smbmichiel systemd(1): systemd-hostnamed.service: Succeeded.
Mar 10 16:36:26 smbmichiel systemd(1): Started Session 6 of user pi.
Mar 10 16:36:27 smbmichiel systemd(1): Started Session 7 of user pi.
Mar 10 16:37:06 smbmichiel systemd(1): dev-disk-byx2duuid-325520c5x2dc500x2d4a5ax2d8e55x2da7c25c50b155.device: Job dev-di
sk-byx2duuid-325520c5x2dc500x2d4a5ax2d8e55x2da7c25c50b155.device/start timed out.
Mar 10 16:37:06 smbmichiel systemd(1): Timed out waiting for device /dev/disk/by-uuid/325520c5-c500-4a5a-8e55-a7c25c50b155.
Mar 10 16:37:06 smbmichiel systemd(1): Dependency failed for /media/michiel/usb_phillips.
Mar 10 16:37:06 smbmichiel systemd(1): media-michiel-usb_phillips.mount: Job media-michiel-usb_phillips.mount/start failed with result 'dependency'.
Mar 10 16:37:06 smbmichiel systemd(1): Startup finished in 2.092s (kernel) + 1min 31.148s (userspace) = 1min 33.240s.
Mar 10 16:37:06 smbmichiel systemd(1): dev-disk-byx2duuid-325520c5x2dc500x2d4a5ax2d8e55x2da7c25c50b155.device: Job dev-disk-byx2duuid-325520c5x2dc500x2d4a5ax2d8e55x2da7c25c50b155.device/start failed with result 'timeout'.

The raspberry was used as an samba server. It was mostly used as an archive for school.
Can anyone help me?

windows – openVPN client connects to server on raspbian but Internet cannot be reached

I have a Raspberry Pi 3B+ connected to the router via WiFi, installed with raspbian and openVPN. I can connect to the VPN from my Windows 10 computer using openVPN Connect but I cannot reach the internet.

This is my client settings file (the router’s original IP address and hostname are replaced with fake values for this question):

client
dev tun
proto udp
remote aFancyRegisteredName.ddns.net 13742
resolv-retry infinite
nobind
remote-cert-tls server
tls-version-min 1.2
verify-x509-name mrasp_Wireless_9a17f6bf-f239-4b53-8f1d-e1e3d0461e26 name
cipher AES-256-CBC
auth SHA256
auth-nocache
verb 3
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----
</key>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
</tls-crypt>

This is my server’s config file:

dev tun
proto udp
port 13742
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/mrasp_Wireless_9a17f6bf-f239-4b53-8f1d-e1e3d0461e26.crt
key /etc/openvpn/easy-rsa/pki/private/mrasp_Wireless_9a17f6bf-f239-4b53-8f1d-e1e3d0461e26.key
dh none
ecdh-curve prime256v1
topology subnet
server 10.8.0.0 255.255.255.0
# Set your primary domain name server address for clients
push "dhcp-option DNS 9.9.9.9"
push "dhcp-option DNS 149.112.112.112"
# Prevent DNS leaks on Windows
push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
#DuplicateCNs allow access control on a less-granular, per user basis.
#Remove # if you will manage access by user instead of device. 
#duplicate-cn
# Generated for use by PiVPN.io

During connection I get the following log:

10/31/2020, 9:51:28 PM OpenVPN core 3.git::662eae9a win x86_64 64-bit built on Oct 27 2020 12:49:07
⏎10/31/2020, 9:51:28 PM Frame=512/2048/512 mssfix-ctrl=1250
⏎10/31/2020, 9:51:28 PM UNUSED OPTIONS
4 (resolv-retry) (infinite) 
5 (nobind) 
8 (verify-x509-name) (mrasp_Wireless_9a17f6bf-f239-4b53-8f1d-e1e3d0461e26) (name) 
11 (auth-nocache) 
12 (verb) (3) 
⏎10/31/2020, 9:51:28 PM EVENT: RESOLVE ⏎10/31/2020, 9:51:28 PM Contacting 95.95.95.95:13742 via UDP
⏎10/31/2020, 9:51:28 PM WinCommandAgent: transmitting bypass route to 95.95.95.95
{
    "host" : "95.95.95.95",
    "ipv6" : false
}

⏎10/31/2020, 9:51:28 PM EVENT: WAIT ⏎10/31/2020, 9:51:28 PM Connecting to (aFancyRegisteredName.ddns.net):13742 (95.95.95.95) via UDPv4
⏎10/31/2020, 9:51:28 PM EVENT: CONNECTING ⏎10/31/2020, 9:51:28 PM Tunnel Options:V4,dev-type tun,link-mtu 1569,tun-mtu 1500,proto UDPv4,cipher AES-256-CBC,auth SHA256,keysize 256,key-method 2,tls-client
⏎10/31/2020, 9:51:28 PM Creds: UsernameEmpty/PasswordEmpty
⏎10/31/2020, 9:51:28 PM Peer Info:
IV_VER=3.git::662eae9a
IV_PLAT=win
IV_NCP=2
IV_TCPNL=1
IV_PROTO=2
IV_AUTO_SESS=1
IV_GUI_VER=OCWindows_3.2.2-1455
IV_SSO=openurl

⏎10/31/2020, 9:51:29 PM SSL Handshake: CN=mrasp_Wireless_9a17f6bf-f239-4b53-8f1d-e1e3d0461e26, TLSv1.2, cipher TLSv1.2 ECDHE-ECDSA-AES256-GCM-SHA384
⏎10/31/2020, 9:51:29 PM Session is ACTIVE
⏎10/31/2020, 9:51:29 PM Sending PUSH_REQUEST to server...
⏎10/31/2020, 9:51:29 PM EVENT: GET_CONFIG ⏎10/31/2020, 9:51:29 PM OPTIONS:
0 (dhcp-option) (DNS) (9.9.9.9) 
1 (dhcp-option) (DNS) (149.112.112.112) 
2 (block-outside-dns) 
3 (redirect-gateway) (autolocal) (def1) 
4 (redirect-gateway) (def1) 
5 (route-gateway) (10.8.0.1) 
6 (topology) (subnet) 
7 (ping) (15) 
8 (ping-restart) (120) 
9 (ifconfig) (10.8.0.2) (255.255.255.0) 
10 (peer-id) (0) 
11 (cipher) (AES-256-GCM) 

⏎10/31/2020, 9:51:29 PM PROTOCOL OPTIONS:
  cipher: AES-256-GCM
  digest: NONE
  compress: NONE
  peer ID: 0
⏎10/31/2020, 9:51:29 PM EVENT: ASSIGN_IP ⏎10/31/2020, 9:51:29 PM CAPTURED OPTIONS:
Session Name: aFancyRegisteredName.ddns.net
Layer: OSI_LAYER_3
Remote Address: 95.95.95.95
Tunnel Addresses:
  10.8.0.2/24 -> 10.8.0.1
Reroute Gateway: IPv4=1 IPv6=0 flags=( ENABLE REROUTE_GW AUTO_LOCAL DEF1 IPv4 )
Block IPv6: no
Add Routes:
Exclude Routes:
DNS Servers:
  9.9.9.9
  149.112.112.112
Search Domains:

⏎10/31/2020, 9:51:31 PM SetupClient: transmitting tun setup list to \.pipeagent_ovpnconnect
{
    "confirm_event" : "d80b000000000000",
    "destroy_event" : "880d000000000000",
    "tun" : 
    {
        "adapter_domain_suffix" : "",
        "block_ipv6" : false,
        "dns_servers" : 
        (
            {
                "address" : "9.9.9.9",
                "ipv6" : false
            },
            {
                "address" : "149.112.112.112",
                "ipv6" : false
            }
        ),
        "layer" : 3,
        "mtu" : 0,
        "remote_address" : 
        {
            "address" : "95.95.95.95",
            "ipv6" : false
        },
        "reroute_gw" : 
        {
            "flags" : 283,
            "ipv4" : true,
            "ipv6" : false
        },
        "route_metric_default" : -1,
        "session_name" : "aFancyRegisteredName.ddns.net",
        "tunnel_address_index_ipv4" : 0,
        "tunnel_address_index_ipv6" : -1,
        "tunnel_addresses" : 
        (
            {
                "address" : "10.8.0.2",
                "gateway" : "10.8.0.1",
                "ipv6" : false,
                "metric" : -1,
                "net30" : false,
                "prefix_length" : 24
            }
        )
    },
    "wintun" : false
}
POST np://(\.pipeagent_ovpnconnect)/tun-setup : 200 OK
TAP ADAPTERS:
guid='{8E2F4532-C95B-4A71-977F-F69268C7C5FB}' index=17 name='Local Area Connection 2'
Open TAP device "Local Area Connection 2" PATH="\.Global{8E2F4532-C95B-4A71-977F-F69268C7C5FB}.tap" SUCCEEDED
TAP-Windows Driver Version 9.24
ActionDeleteAllRoutesOnInterface iface_index=17
netsh interface ip set interface 17 metric=1
Ok.
netsh interface ip set address 17 static 10.8.0.2 255.255.255.0 gateway=10.8.0.1 store=active
netsh interface ip add route 95.95.95.95/32 21 10.140.72.1 store=active
The object already exists.
netsh interface ip add route 0.0.0.0/1 17 10.8.0.1 store=active
Ok.
netsh interface ip add route 128.0.0.0/1 17 10.8.0.1 store=active
Ok.
netsh interface ip set dnsservers 17 static 9.9.9.9 register=primary validate=no
netsh interface ip add dnsservers 17 149.112.112.112 2 validate=no
NRPT::ActionCreate names=(.) dns_servers=(9.9.9.9,149.112.112.112)
ActionWFP openvpn_app_path=C:Program FilesOpenVPN ConnectOpenVPNConnect.exe tap_index=17 enable=1
permit IPv4 DNS requests from OpenVPN app
permit IPv6 DNS requests from OpenVPN app
block IPv4 DNS requests from other apps
block IPv6 DNS requests from other apps
allow IPv4 traffic from TAP
allow IPv6 traffic from TAP
ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
TAP handle: 3811000000000000
⏎10/31/2020, 9:51:31 PM TunPersist: saving tun context:
Session Name: aFancyRegisteredName.ddns.net
Layer: OSI_LAYER_3
Remote Address: 95.95.95.95
Tunnel Addresses:
  10.8.0.2/24 -> 10.8.0.1
Reroute Gateway: IPv4=1 IPv6=0 flags=( ENABLE REROUTE_GW AUTO_LOCAL DEF1 IPv4 )
Block IPv6: no
Add Routes:
Exclude Routes:
DNS Servers:
  9.9.9.9
  149.112.112.112
Search Domains:

⏎10/31/2020, 9:51:31 PM Connected via TUN_WIN
⏎10/31/2020, 9:51:31 PM EVENT: CONNECTED aFancyRegisteredName.ddns.net:13742 (95.95.95.95) via /UDPv4 on TUN_WIN/10.8.0.2/ gw=(10.8.0.1/)⏎

I already tried to edit the server config at /etc/openvpn/server.conf according to this serverfault case by adding a line push "redirect-gateway autolocal def1", then issuing service openvpn restart on the raspbian, but didn’t solve the problem. On Windows, for route print I get (some numbers are replaced with capital letters):

route print
===========================================================================
Interface List
 17...00 ff 8e 2f 45 32 ......TAP-WinCows ACapter V9 for OpenVPN Connect
 19...28 C2 44 b5 92 b3 ......Intel(R) Ethernet Connection I218-V
  5...00 ff 17 e3 c7 fC ......TAP-WinCows ACapter V9
 16...28 b2 bC 41 9a eC ......Microsoft Wi-Fi Cirect Virtual ACapter
  4...2a b2 bC 41 9a ec ......Microsoft Wi-Fi Cirect Virtual ACapter #2
 21...28 b2 bC 41 9a ec ......Intel(R) Cual BanC Wireless-AC 7260
  1...........................Software Loopback Interface 1
 27...00 15 5C 56 8a 76 ......Hyper-V Virtual Ethernet ACapter
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Cestination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      E.A.G.1    E.A.B.C     40
          0.0.0.0          0.0.0.0         E.8.0.1         E.8.0.2      2
          0.0.0.0        128.0.0.0         E.8.0.1         E.8.0.2    257
         E.8.0.0    255.255.255.0         On-link          E.8.0.2    257
         E.8.0.2  255.255.255.255         On-link          E.8.0.2    257
       E.8.0.255  255.255.255.255         On-link          E.8.0.2    257
      E.A.G.0    255.255.248.0         On-link     E.A.B.C    296
    E.A.B.C  255.255.255.255         On-link     E.A.B.C    296
    E.A.79.255  255.255.255.255         On-link     E.A.B.C    296
     95.95.95.95  255.255.255.255      E.A.G.1    E.A.B.C    296
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
        128.0.0.0        128.0.0.0         E.8.0.1         E.8.0.2    257
    D.F.L.J  255.255.255.240         On-link     D.F.G.H   5256
    D.F.L.K  255.255.255.255         On-link     D.F.L.K   5256
    D.F.L.1B  255.255.255.255         On-link     D.F.L.K   5256
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link          E.8.0.2    257
        224.0.0.0        240.0.0.0         On-link     E.A.B.C    296
        224.0.0.0        240.0.0.0         On-link     D.F.L.K   5256
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link          E.8.0.2    257
  255.255.255.255  255.255.255.255         On-link     E.A.B.C    296
  255.255.255.255  255.255.255.255         On-link     D.F.L.K   5256
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Cestination      Gateway
  1    331 ::1/128                  On-link
 17    281 fe80::/64                On-link
 21    296 fe80::/64                On-link
 27   5256 fe80::/64                On-link
 27   5256 fe80::8Ce:9457:9e21:152/128
                                    On-link
 21    296 fe80::11c1:b451:23e4:98ec/128
                                    On-link
 17    281 fe80::b001:C4b:f28a:5baa/128
                                    On-link
  1    331 ff00::/8                 On-link
 17    281 ff00::/8                 On-link
 21    296 ff00::/8                 On-link
 27   5256 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

backticks – Raspbian ( Debian) cmd prompt five single back quote marks

I’m trying to understand something that happened today.

Setup Win10 PC RasPi2 with wifi dongle and usb bluetooth keyboard set up as Octoprint controller.

While bouncing between working on PC and RasPi I inadvertently started typing on the wireless keyboard when I meant to be typing on PC. I cannot remember what I typed but when I turned around to look at the monitor for the RasPi, there was a warning about ~”there are 1500 entries, Continue?” I hit enter and the screen started rolling with entries. Some of the final entries were:

`````zmore
`````znew
`````zramctl
`````{
`````}

I’m just wondering what I did because when I hit the up arrow to repeat the last command all I get is the five back quotation marks and a continuation prompt if I hit enter. And since google ignores punctuation marks, I cannot search for it.

bitcoin core – How do I run GUI on Raspbian?

I had this running perfectly and the blockchain was synching and at about 80% completion. I came home from work to a power outage.

I keep seeing to run bitcoin-qt, it doesn’t appear that I have that. In /src/ I have bitcoin-cli, bitcoind, and bitcoin-tx. Obviously d is daemon, and -tx isn’t what I want either. So I try

bitcoin-cli -datadir=/pi/home/bitcoin/
error: too few parameters (need at least command)

linux – Raspbian: Lock (but not logout) of Command-line-only system so that background processes can continue

I have a Raspberry pi running full Buster but only boots to command line interface (CLI) or I use SSH. Currently, I can only login or log out. I want to be able to stay logged in so my background processes can keep running, but lock the system so that someone can’t walk up and accidentally mess with it.

raspbian – Raspberry pi 3 SD card exchange

I would like to know if it is possible to change the SD card in raspberry pi without losing the whole setup.

The story is: I have one raspberry pi 3 model B. I have there SD card with raspbian OS. Last week I saw a tutorial on How to have windows 10 on raspberry pi. I would like to have one too because some of the programs I need are only on windows. The problem is that I want to download windows on the same raspberry pi that already has raspbian OS. So is it possible to change SD cards (one with Windows one with raspbian OS) without losing any data?

Thank you.

raspbian – ssmtp does not send emails (gmail)

I want to use ssmtp on Raspbian Buster to send emails. I have configured /etc/ssmtp/ssmtp.conf as follows:

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=username@gmail.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587

# Where will the mail seem to come from?
#rewriteDomain=gmail.com

# The full hostname
hostname=raspberrypi

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES

AuthUser=username@gmail.com
AuthPass=xxxxxxxx
UseTLS-YES
UseSTARTTLS=YES

I sent a test email by sending the following: echo "Test" | ssmtp -vvv receiver@outlook.com and got the following answer:

(<-) 220 smtp.gmail.com ESMTP 132qw785543qpfc.183 - gsmtp
(->) EHLO raspberrypi
(<-) 250 SMTPUTF8
(->) STARTTLS
(<-) 220 2.0.0 Ready to start TLS
(->) EHLO raspberrypi
(<-)
ssmtp:  (raspberrypi)

However, when I checked that my Gmail articles were being sent, there was nothing in it. I also checked the recipient's Outlook account and did not receive an email.

Could you please help us?

Thank you in advance.

Linux – Install Bitcoin Core on Raspbian with apt-get

Is it possible to install Bitcoin Core on Raspbian OS with just apt-get?

I tried adding the Bitcoin repo with the following elements:

sudo add-apt-repository ppa:bitcoin/bitcoin

and I get:

sudo add-apt-repository ppa:bitcoin/bitcoin
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 95, in 
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/buster