Install Arch Linux on Synology NAS

Rob

Administrator
Staff member
Joined
Oct 27, 2011
Messages
1,203
Reaction score
2,229
Credits
3,442
Today I installed an Arch VM on my Synology NAS (AMD Ryzen R1600) and ran into a couple of things that I wanted to document and share. The following is a video going through all of the steps to get Arch up and running on your NAS. Below, you'll see the code as well as links that might be helpful along the way.

Thanks for watching/reading! Be sure to comment if you have any questions and also subscribe to my YouTube channel 'Linux Tutorials' where i'll be posting a lot more in the near future!

Note: This was a fresh OBS install and obv don't have it set to record high quality - i'll fix that up for the next one haha.


Helpful links:
Arch download page: https://archlinux.org/download/
Arch Installation wiki: https://wiki.archlinux.org/title/installation_guide

My notes:
Code:
# Download arch linux
  - save it somewhere the nas can see it

# Go to synology -> vm -> create
  - fill in stuff

# Set console keyboard layout (skip)

# Verify boot mode (skip)

# Verify internet
  ping google.com

# Update system clock
  timedatectl status

# Partition the disk - make sure sda is your drive
  fdisk -l
  fdisk /dev/sda

# Format the new partition(s)
  mkfs.ext4 /dev/sda1

# Mount the new filesystem
  mount /dev/sda1 /mnt

# Select the mirrors:
  vim /etc/pacman.d/mirrorlist

# Install essential packages
  pacstrap -K /mnt base linux linux-firmware vim grub

# Generate fstab
  genfstab -U /mnt >> /mnt/etc/fstab

# Enter chroot
  arch-chroot /mnt

# Set your timezone
  ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

# Run hwclock to set /etc/adjtime
  hwclock --systohc

# Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 and other needed locales.
# Then run
  locale-gen

# Edit/create /etc/locale.conf
  LANG=en_US.UTF-8

# Edit/create /etc/hostname
  archie

# Set root's password
  passwd

# Set up grub
  grub-install /dev/sda
  grub-mkconfig -o /boot/grub/grub.cfg

# Set up your network - type this to see what your network device is called
  ip a

# Edit/Create /etc/systemd/network/ens3.network
[Match]
Name=ens3

[Network]
DHCP=yes

# exit
  exit

# Unmount /mnt
  umount /mnt

# reboot
  reboot

################

# After stuff

# Add a regular user
  useradd -m rob
  passwd rob

# Install ssh server
  pacman -Sy
  pacman -S openssh
  systemctl start sshd
  systemctl enable sshd

# Add regular user to sudo
# fix default editor pointing to vi
  ln -s /usr/bin/vim /usr/bin/vi

  visudo

# Then towards the bottom:
  rob     ALL=NOPASSWD: ALL
 
Last edited:


Nice write-up! Just one thing and a question, don't forget to setup reflector to keep up-to-date mirrors and why didn't you use lvm in your setup or was it just a test setup?
 
I subscribed to your channel as well :) or is there also a Rob channel?
 

Staff online

Members online


Top