Installing Linux on a Synology RS3617xs: from DSM to Debian to NixOS

My Synology RS3617xs now runs NixOS. Its hostname is syn, it boots unattended, and it uses the original motherboard and SATA controllers.

When I went looking for instructions for installing Linux on a Synology NAS, the internet seemed to say it wasn’t possible. Searches turned up advice to keep DSM, run something inside it, or replace the hardware. I couldn’t find a repeatable recipe for my exact model. I’m writing this to put the missing instructions on the internet, where search engines—and the next person trying this—can find them.

I used AI, specifically Codex, to help investigate the hardware, interpret boot output, write tools, and work out the installation. I also used AI to reconstruct my Codex sessions and write this post. Some early AI suggestions were wrong. The useful answers came from testing on the actual machine, preserving the output, and revising assumptions.

The route was factory GRUB → Debian installer → installed Debian → NixOS RAM installer → installed NixOS. Debian gave me a working Linux environment before I attempted the final NixOS setup.

The machine and the working boot path

This is the RS3617xs, without a plus sign. Similar Synology names do not establish identical hardware or boot behavior. Synology’s installation guide for this model documents installing DSM; the procedure below records what worked on my machine.

The important pieces were:

HardwarePurpose in the final installation
Original 120 MiB internal Synology USB moduleFactory GRUB Legacy and a small GRUB 2 image
16 GB SanDisk Cruzer Fit USB stickNixOS boot menu, kernels, and initrds
120 GB SanDisk SATA SSDInstalled system, Nix store, and swap
Serial connection to a Linux workstationBootloader access and installation console

The final boot sequence is:

Firmware
  → factory GRUB Legacy on internal USB
  → /nixos/core.img on internal USB partition 2
  → GRUB 2 finds the Cruzer Fit by filesystem UUID
  → menu, kernel, and initrd from the Cruzer Fit
  → Linux mounts the SATA SSD root by UUID
  → NixOS on syn

Both USB devices are required for this NixOS arrangement. The separate Samsung USB stick used for my initial installer experiments is no longer needed.

Back up data and the factory boot module before changing anything. I erased the system SSD deliberately; preserving factory boot entries does not preserve data erased from an SSD. Filesystem UUIDs, disk identities, and factory MAC addresses must come from your own machine.

Start with the bootloader you can reach

I initially investigated BIOS access. There was a short burst of unreadable output before GRUB, and trying different baud rates didn’t turn it into a useful firmware prompt. I never established a working BIOS setup method. I also found no VGA header to use.

What did work was the factory GRUB console, at 115200 baud, 8 data bits, no parity, 1 stop bit, and no flow control:

picocom --baud 115200 --databits 8 --parity n --stopbits 1 --flow n /dev/ttyUSB0

Use the correct adapter and verified wiring for your connector; these serial settings do not specify the electrical interface or pinout. Open the terminal before powering on. Interrupt the factory countdown with Ctrl-C, then use c to reach the GRUB command line if necessary.

This was GRUB Legacy, not GRUB 2. An early suggestion to run ls produced an unrecognized-command error. These inspection commands worked:

root
geometry (hd0)
geometry (hd1)
find /boot/grub/menu.lst
cat (hd0,0)/boot/grub/menu.lst

Legacy GRUB numbers partitions from zero. My internal module appeared as a 245760-sector disk, about 120 MiB, with two partitions. A second USB stick connected before power-on became another accessible disk. Identify them by size and contents each time; disk order can change.

The factory menu loaded /zImage and /rd.gz. That was enough of an opening: I could use the existing bootloader to load another kernel or another bootloader. GNU still hosts the GRUB Legacy manual, which was useful once I stopped assuming modern commands.

The silent kernel was a serial-port mistake

My first attempts at a modern Debian kernel produced no console output. At one point the speaker made noise. That looked discouraging, but silence alone didn’t tell me whether the kernel had failed to start.

I went back to a known working component: Synology’s own recovery kernel. From factory GRUB, this booted a RAM shell on my machine:

root (hd0,0)
kernel /zImage root=/dev/ram0 rw init=/bin/sh rdinit=/bin/sh console=ttyS0,115200n8 syno_hw_version=RS3617xs
initrd /rd.gz
boot

That particular recovery boot took about 215 seconds, largely repeated waits for SATA ports. It was slow, but it gave me a shell from which to inspect the hardware. I did not establish a tested parameter change that fixed that old kernel’s delay.

The decisive command was:

cat /proc/tty/driver/serial

Synology’s kernel reported the active console as ttyS0 at I/O address 0x2f8, IRQ 3. My earlier explicit early-console tests had targeted 0x3f8.

On stock Debian and NixOS, the working physical port was named ttyS1. The name changed between kernels; the hardware address did not.

The installed Linux console arguments became:

console=ttyS1,115200n8 earlycon=uart8250,io,0x2f8,115200n8

GRUB 2 also needed its serial port selected explicitly:

serial --port=0x2f8 --speed=115200 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial

Factory scripts used the other UART, 0x3f8, for hardware control. I inferred that sending kernel output there might explain the earlier speaker noise; I didn’t prove that connection. Use 0x2f8 for the console on this tested machine. Keep the factory GRUB’s already-working serial configuration intact rather than translating its unit numbering from another kernel.

Preserve the factory module, then boot Debian

The recovery shell initially showed no disks. Booting directly into a shell had skipped initialization that normally loads USB drivers. After loading the available USB controller and storage modules from /lib/modules, I could see the factory module as /dev/synoboot and the spare USB stick as /dev/sdu.

I imaged the entire 120 MiB factory module to a file on the spare stick, synced and unmounted it, then moved the stick to the workstation. I kept the image, extracted boot files, and serial logs. The limited recovery shell couldn’t compare source and image; on the workstation, I verified the transferred image against the copy on the spare using SHA-256. Before editing the factory menu later, I separately backed up and verified that configuration.

Do not reuse those /dev/ names blindly. Under Debian, the same USB devices appeared under different names. Identify devices by capacity, model, serial number, and stable IDs before imaging or formatting them.

For the initial Debian boot, the spare Samsung stick had an MBR partition table and a 1 GiB ext2 partition labeled LINUXBOOT. I placed the Debian amd64 netboot kernel and initrd on it as /linux and /initrd.gz, along with a GRUB 2 core image and configuration. Obtain a matching kernel/initrd pair from the Debian installer distribution; current versions will differ from my installation record.

From factory GRUB, this handoff worked when the spare was (hd1,0):

root (hd1,0)
kernel --type=multiboot /boot/grub/i386-pc/core.img
boot

That core.img was prepared as a BIOS (i386-pc) GRUB image with its required modules and configuration available on the stick. It wasn’t an arbitrary file copied out of another installation. The GRUB image documentation explains how the core image and modules fit together.

My corrected GRUB 2 installer entry was:

serial --port=0x2f8 --speed=115200 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial
set timeout=-1

menuentry "Debian installer - RS3617xs UART 0x2f8" {
    search --no-floppy --label LINUXBOOT --set=root
    linux /linux DEBIAN_FRONTEND=text console=uart8250,io,0x2f8,115200n8 earlycon=uart8250,io,0x2f8,115200n8 keep_bootcon ignore_loglevel
    initrd /initrd.gz
}

keep_bootcon was useful diagnostically but duplicated kernel output; I omitted it from the installed configuration. I also learned to pace serial pastes at about 50 ms per character. Fast pastes lost characters, and one malformed entry had accidentally put ignore_loglevel on a separate line.

Keep a continuous serial log and use a terminal that can pace transmitted characters. That makes it much easier to distinguish a bad paste from a failed boot and to compare one attempt with the next.

With the corrected UART, Debian reached its installer.

Getting disks and networking working

The netboot initramfs initially lacked the SATA drivers I needed. I downloaded the matching Debian installer packages for scsi-core-modules, ata-modules, and sata-modules, verified their SHA-256 hashes against the official package index, and installed them into the running RAM environment with udpkg.

The package versions must match the running installer kernel. After installing them, the relevant commands were:

depmod -a
modprobe ahci

The original SATA controllers then exposed the SanDisk SSD. Stock Debian probed the AHCI controllers in about two seconds, rather than repeating the old recovery kernel’s minutes of waits. I didn’t need a replacement HBA to access this SSD.

Networking had another appliance-specific surprise: all four NICs initially exposed the same placeholder MAC address, 12:34:56:78:9a:bc. I recovered their individual factory MAC addresses from Synology’s vendor data and applied them before configuring networking. For persistence, I used systemd .link files matched to PCI paths, with MACAddressPolicy=none and each port’s own address. The first port then used DHCP normally. Anyone repeating this needs their own unit’s factory addresses.

I installed Debian 13 on the 120 GB SSD with a 1 GiB ext4 /boot, 4 GiB swap, and an ext4 root filesystem in the remaining space.

Why an installed SSD still wouldn’t boot

Linux could read the SATA SSD. The firmware boot path could not.

On this machine, firmware exposed USB disks to GRUB, but not the SATA SSD. Attempts to hand off directly to the SSD failed, and GRUB’s native AHCI probing didn’t solve it. Installing GRUB to the SSD’s MBR therefore didn’t provide a usable startup path.

The solution was to keep the files needed before Linux starts on USB. Once the kernel and initramfs were running, their AHCI drivers could find and mount the SSD root filesystem by UUID.

For Debian, I fitted everything onto the factory module’s second partition: a self-contained GRUB 2 image plus a versioned kernel and initramfs. A compact MODULES=dep initramfs with ahci, sd_mod, ext4, and igb explicitly included kept the initial combined payload around 22 MiB.

I preserved the factory bootloader and both original Synology menu entries, then added Debian as the default entry with a five-second timeout. For kernel updates, the important sequence is to copy the new kernel and matching initramfs onto the USB filesystem, verify the copies, and only then update the menu to reference them. Keep the previous working pair until the new one has booted successfully.

Debian passed unattended warm boots, update-hook tests, and two actual AC-disconnect cold boots with the Samsung installer stick removed. Temporary provisioning access was then removed, and the machine booted to a normal authenticated serial login.

Replacing Debian with NixOS

Once Debian worked, I asked Codex to prepare a NixOS host named syn using my existing configuration repository.

I built a NixOS RAM installer with the correct console arguments, USB/SATA support, restored NIC addresses, and an administration SSH key. Using kexec from Debian let me enter that installer without first fitting the installer onto the tiny factory module.

From the RAM environment, I mounted the SSD filesystems, generated the hardware configuration, and built the target system before replacing Debian. I preserved the SSH host keys locally on the machine so it retained its SSH identity.

NixOS needed more comfortable space for kernels, initrds, and rollback generations. A smaller initrd could fit on the internal module, but I added a 16 GB Cruzer Fit for the boot payloads. I formatted it as ext4 with label SYNBOOT and used its filesystem UUID for discovery.

The factory GRUB entry now loads /nixos/core.img from the internal module’s second partition. That embedded GRUB 2 configuration selects the correct UART, finds SYNBOOT by UUID, and reads /nixos/grub.cfg there. That menu loads the kernel and initrd, which start the system on the SSD.

The GRUB 2 configuration embedded in core.img needs to find the payload stick independently of disk enumeration. This is the relevant configuration, with your stick’s UUID substituted:

serial --port=0x2f8 --speed=115200 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial
search --no-floppy --fs-uuid --set=root YOUR-SYNBOOT-UUID
set prefix=($root)/nixos
normal ($root)/nixos/grub.cfg

A NixOS menu entry also needs the selected generation’s init path. For example, after copying that generation’s kernel and initrd to the payload stick:

menuentry "NixOS" {
    linux /nixos/kernel init=/nix/store/YOUR-SYSTEM-GENERATION/init console=ttyS1,115200n8 earlycon=uart8250,io,0x2f8,115200n8
    initrd /nixos/initrd
}

These are templates: replace the UUID and store path, and preserve any additional kernel parameters required by your generated configuration. The selected system’s boot.json bootspec records its kernel, initrd, init path, and kernel parameters. The kernel and initrd on USB must belong to that same generation.

Every update needs to publish matching boot files and a corresponding menu entry. Retaining an older NixOS entry also requires retaining its system closure on the SSD with a Nix garbage-collection root; keeping an old kernel on USB alone is insufficient. I automated those steps locally, but the configuration above shows the bootloader handoff without depending on that automation.

The final NixOS installation passed normal reboot and an unattended AC-disconnect cold boot. It reached an authenticated ttyS1 prompt, SSH worked, DHCP and swap worked, and no systemd services failed during installation validation. Measured kernel, initrd, and userspace startup was about 7.6 seconds, excluding firmware and GRUB time.

Getting the SATA drive LEDs working

Booting Linux and accessing the disks didn’t automatically restore the drive-tray LEDs. This became another case where the factory kernel contained the missing hardware setup.

I first identified a shared LED enable gate: Intel PCH GPIO 0, active low. Pulling it low lit the tray LEDs red, without activity blinking. That showed the gate worked, but enabling it alone wasn’t enough.

The next clue was in the saved Synology kernel. I recovered the initialization sequence from its syno_mv_9235_gpio_active_init routine, which configures LED outputs on the six Marvell 88SE9235 SATA controllers:

Vendor registerFactory value
0x070710240x00000000
0x070710200x00000000
0x070710580x00b6d8d1

A Python tool could collect controller metadata, but the running kernel’s strict I/O memory protection blocked its userspace register mapping. I wrote a small kernel helper, synology_rs3617xs_led, to access the controller’s vendor register window while coordinating with the AHCI driver. It checks the exact machine model and controller identities, saves the original values, applies the factory sequence, and verifies readback. Strict I/O memory protection stays enabled.

The working order was to initialize the controllers first, then hold the shared GPIO gate low. On November 21, 2026, I confirmed green tray LEDs and hardware activity blinking on syn, running kernel 6.18.63.

The complete kernel helper source and Makefile are included with this post. Save both files in an otherwise empty directory. The helper is restricted to DMI model RS3617xs, PCI ID 1b4b:9235, and controller locations 04:00.0, 05:00.0, 06:00.0, 08:00.0, 09:00.0, and 0a:00.0. Compare those with lspci -nn on your machine before proceeding; a different layout needs investigation rather than removal of the checks.

The core register definitions are:

#define LED_SELECTOR 0xa8
#define LED_DATA 0xac

static const u32 registers[] = { 0x07071024, 0x07071020, 0x07071058 };
static const u32 factory_values[] = { 0, 0, 0x00b6d8d1 };

The selector and data offsets are in PCI BAR5. The full source handles locking against AHCI, runtime power management, saving the window selector, readback, and restoration on unload. The constants alone are not a complete register-access implementation.

Build with a C toolchain and the configured kernel headers/build tree for the running kernel. On a system providing the usual build symlink:

make KDIR="/lib/modules/$(uname -r)/build"

On NixOS, supply the matching configured kernel build tree as KDIR; the conventional symlink may not exist. The module must match the running kernel, not just a newly installed kernel awaiting reboot. The hardware test used 6.18.63; other kernel versions may require source changes.

With libgpiod’s version 2 command-line tools installed, load the GPIO driver and identify the chip:

sudo modprobe gpio_ich
gpiodetect

This board needed acpi_enforce_resources=lax on the kernel command line for gpio_ich access. In the commands below, replace gpiochip0 with the chip labeled gpio_ich on your machine. Keep the gate disabled by holding GPIO 0 high in a separate terminal:

sudo gpioset --banner --chip gpiochip0 0=1

Leave that process running. First load the helper in its default snapshot mode and inspect the six controllers:

sudo insmod ./synology_rs3617xs_led.ko
sudo cat /sys/module/synology_rs3617xs_led/parameters/registers
sudo rmmod synology_rs3617xs_led

Then explicitly apply the factory initialization and check readback:

sudo insmod ./synology_rs3617xs_led.ko apply_factory=1
sudo cat /sys/module/synology_rs3617xs_led/parameters/registers

All six controller lines should show 07071024=00000000 07071020=00000000 07071058=00b6d8d1. If initialization fails, inspect sudo journalctl -k --no-pager --grep=synology_rs3617xs_led before enabling the gate.

After successful initialization, stop the high-holding gpioset with Ctrl-C, then hold the gate low instead:

sudo gpioset --banner --chip gpiochip0 0=0

Leave it running while observing existing disk activity. That combination restored green LEDs and activity blinking in my test. These are manual steps; they do not install a startup service. Automatic ZFS fault-to-red-LED reporting isn’t configured.

To roll back, stop the low-holding process, run the high-holding command again in a separate terminal, and leave it running while unloading the helper:

sudo rmmod synology_rs3617xs_led
sudo journalctl -k --no-pager --grep=synology_rs3617xs_led

The helper attempts to restore the original controller register values on unload; check the log for confirmation. Simply stopping gpioset releases the line but may leave its last electrical level in place, which is why rollback explicitly drives the gate high first.

What I would do first next time

I would establish the serial console, inspect the factory boot menu, and image the internal USB module before trying to replace anything. I would confirm the physical UART address from the working kernel, rather than assume ttyS0 means the same port everywhere. Then I would boot a modern installer from spare USB, verify storage and networking, and design kernel updates around whatever storage the firmware can actually read.

Before calling it finished, I would test a kernel update, a warm reboot, an actual power removal, and an authenticated login with temporary provisioning access removed. If the design requires a payload USB stick, it stays connected during those tests and in service.

Linux on my RS3617xs turned out to be possible with the original board. The working solution depended on a few specific discoveries: the console is at 0x2f8; firmware can read USB even when it can’t read SATA; Linux can take over storage access once it starts; and Synology’s vendor initialization contains details a general-purpose distribution doesn’t automatically reproduce.

Those are the details I wanted to find when I started searching. Now they’re written down.