User Tools

Site Tools


Sidebar

change_for_headless_router

This is an old revision of the document!


Clean the console and output to serial

Into /etc/inittab:

Comment:

# TERMINALS
#x1:12345:respawn:/sbin/agetty 38400 console linux
#c1:12345:respawn:/sbin/agetty 38400 tty1 linux
#c2:2345:respawn:/sbin/agetty 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty 38400 tty6 linux

And set:

s0:12345:respawn:/sbin/agetty -L 115200 ttymxc0 linux
Other files
  • Set the correct entry into /etc/fstab with /dev/mmcblk0pX in case of uSD
  • Set your password into /etc/shadow
  • Add your ssh key
  • /etc/ssh/sshd_config put:
    • Banner none
    • AllowUsers root
    • #AcceptEnv LANG LC_*
    • AllowAgentForwarding no
    • AllowTcpForwarding no
    • GatewayPorts no
    • X11Forwarding no
    • PermitRootLogin yes
    • StrictModes yes
    • RhostsRSAAuthentication no
    • HostbasedAuthentication no
    • AuthorizedKeysFile .ssh/authorized_keys
  • Edit and set your network configuration
  • /etc/resolv.conf

nameserver 8.8.8.8

options timeout:1
  • Into /etc/portage/make.conf put:
CHOST="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -mfpu=vfpv4 -mfloat-abi=hard -march=native -mtune=native"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
PORTAGE_NICENESS="19"
FEATURES="parallel-fetch sandbox fail-clean noman noinfo nodoc"
PORTAGE_RSYNC_EXTRA_OPTS="-z --compress-level=9 -4 --exclude=/metadata/md5-cache --
exclude=/metadata/cache"
LC_MESSAGES=C

CURL_SSL="openssl"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python3_4 python2_7"
U_DEVICES="custom-cflags custom-cxxflags"
U_SYSTEM="ipv6 hardened glibc-omitfp cxx minimal nptl zlib threads lzma xz xtpax xattr openrc inotify openmp"
USE="-* ${U_DEVICES} ${U_SYSTEM}"
INPUT_DEVICES="keyboard"
PAX_MARKINGS="XT"
  • echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
  • Content of /etc/portage/package.use:
app-editors/nano -minimal
app-shells/bash readline
dev-lang/python xml ssl
net-analyzer/wireshark netlink pcap
net-dns/dnsmasq -dhcp -id -inotify
sys-apps/openrc netifrc
sys-apps/net-tools arp hostname
sys-apps/iproute2 -minimal
sys-apps/kmod tools
sys-apps/hwids udev pci net usb
sys-fs/cryptsetup kernel
sys-process/procps ncurses
System packages
  • emerge –sync
  • emerge -DaNuv world
  • emerge -av hdparm parted iptables dnsmasq ethtool app-misc/screen gentoolkit u-boot-tools
  • Set the hostname
  • /etc/conf.d/ip* SAVE_ON_STOP=“no”
Firewall
change_for_headless_router.1510625414.txt.gz · Last modified: 2017/11/14 02:10 by admin