raspi: disk & network & gpio

QQ

Network:

? ifconfig: lost eth0 ip

error when ping:

root@raspberrypi:~# ping google.com
connect: Network is unreachable

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 network-name

after

root@raspberrypi:/etc/network/interfaces.d# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.20.20 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 network-name

nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto eth0
iface eth0 inet dhcp

/etc/init.d/networking restart

DiskUtil

error:

root@raspberrypi:~/intbird# mount /dev/sda2 ./sda/
mount: /root/intbird/sda: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error.
root@raspberrypi:~/intbird# 

error2:

HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
ntfsfix /dev/sdb1

apt-get update
apt-get upgrade
apt-get install ntfs-3g
apt-get install ntfsprogs
apt-get install exfat-fuse
df -h
 lsblk
fdisk -l
sfdisk -ls

apt-get install smartmontools
smartctl -a /dev/sda1
mount -t ntfs-3g /dev/sda1 sda1 -o force
mount -t ext4 /dev/sda2 sda2

findmnt /root/intbird/sdb
ntfsfix /dev/sda1
! mkfs -t ntfs|ext4 /dev/sda2
dd if=/dev/sda1 of=/root/sda1.img

DiskUtil-GUI

GPIO

https://pinout.xyz/pinout/pin7_gpio4