Quantcast
Channel: Arch Linux – Philipp Klaus's Computing Blog
Viewing all articles
Browse latest Browse all 11

Setting up my Raspberry Pi for Raspberry Pi colocation by PCextreme

$
0
0

Setting up my Raspberry Pi for Raspberry Pi colocation by PCextreme.

# Change the root password:
passwd
# Full system upgrade:
pacman -Syyu
## Extend the root partition as explained on http://goo.gl/kFOnW
fdisk -c /dev/mmcblk0
#   p    d 2      n p 2    w
# Then reboot:
shutdown -r now
# And extend the partition:
resize2fs /dev/mmcblk0p2
# Install htop and option dependencies:
pacman -S htop lsof strace
# Install screen:
pacman -S screen

Network Setup

Static network setup set up using a custom systemd script /etc/systemd/system/network.service:

[Unit]
Description=Wired Static IP Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-eth0.device
After=sys-subsystem-net-devices-eth0.device

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ip link set dev eth0 up
ExecStart=/sbin/ip addr add 582.631.871.22/24 dev eth0
ExecStart=/sbin/ip route add default via 582.631.871.1

ExecStop=/sbin/ip addr flush dev eth0
ExecStop=/sbin/ip link set dev eth0 down

[Install]
WantedBy=multi-user.target

Then start, test and then enable the profile (creates a systemd startup entry):

ip link set eth0 down; sleep 1; systemctl start network

# When everything works fine, disable RaspberryPi's standard DHCP config and enable your setup:
systemctl disable dhcpcd@eth0; systemctl enable network

Then set /etc/resolv.conf to your nameservers: nameserver 8.8.8.8 and make it immutable: chattr +i /etc/resolv.conf .

Resources

  • Alternative network setup using netctl (not working so far, I prefer the method above for the time being): http://pastebin.com/hBpLNPEc
  • An older description on how to set up a static IP address on the RPi on Arch Linux ARM can be found here.

Viewing all articles
Browse latest Browse all 11

Trending Articles