Replacing the OS on a Netgear ReadyNAS Duo v1

Generic Goals

  1. Install Linux on the Netgear ReadyNAS Duo v1.
  2. Install and expose some file sharing capabilities that allow me to utillize the storage bays as I have 2 x 1 TB drives waiting to be installed.

Why

  • Newer nicer hardware that would be much easier to use is more expensive -- I was given this item free of charge
  • This is a learning experience. Installing a new OS on this somewhat constrained hardware will be a new experience from me.
  • Recycling! Reuse what you've got instead of throwing away and buying new.

Research and Limitations

  • This model features a single-core SPARC processor. I've not heard of this processor (apparently it's in the RISC family), but Debian latest doesn't current appear to build for it. The last release to build for SPARC was Debian 7 (codename "wheezy"). In fact, DistroWatch doesn't list any Linux distros as currently supporting SPARC. However, I'm okay with running an "obsolete" OS such as long as the exposure is only on the local network.
  • The hardware only contains 256 MB of RAM.

Specific Goals

  1. Install Debian 7 "wheezy" on 2 x 1 TB drives in raid 1 using Btrfs. However, support for Btrfs was backported to "wheezy" and that concerns me. I may have to go with older technology such as LVM + ext4.
  2. Really reaching is to try to install Nextcloud. This system barely meets (see Duo Technical Specifications bookmark) the minimum recommended hardware specifications to run Nextcloud, but for a single user this may be okay. I'd probably opt for using SQLite as the database over MariaDB/Postgres.
  3. Probably more realisitic is to setup a Samba server.

Progress

Get the Debian 7 "wheezy" Installer

  • The Debian organization archived "wheezy" some time ago, so in order to find the images, I had to dig into http://archive.debian.org/. The *.iso can be found here.

Halted

There are two reasons I'm halting this project. I just discovered my ethernet port on my hardware is not functional. In the stock Netgear OS, I can't get the ethernet lights to activate and using Netgear's RAIDar app, it cannot find my unit. Therefore, its not practical for me to continue with this project, but I'll leave this post for documentations sake for the next lucky sucker who thinks they can acheive this. I'm suspicious that I would have had serious issues doing this after reading Paul Whittaker's attempt to put Diet-PC on the SPARC ReadyNAS.

Resources and Similar Guides

Duo v1

Duo v2 (for reference only)

Nix[OS] on Darwin

Background

I've recently fallen down the rabbit whole of exploring Nix and it's ecosystem of projects. That includes NixOS; however, since my nomad machine is a Macbook Pro from 2016 (MBP 13,1), I've hit a wall with the hardware compatability of installing a Linux distro as the primary OS on my machine (actually, the support is improving everyday -- my biggest issues are with A2DP for bluetooth headphones and sleep/hibernate/resume on a dual boot of Fedora 32 running the latest kernel). I've known about the ability of installing Nix on a macOS machine, but that wasn't enough for me. I wanted the ability to declaratively describe as much of my machines configuration as possible. Recently, I stumbled across nix-darwin.

Install

Here's the gist, BUT make sure you read below for an explanation of flags. With Nix being fairly new and still actively developed, things often change quickly -- especially as it relates to install nix on other *unix distros.

#!/usr/bin/env bash
##### INSTALL NIX #####
wget -qO - https://nixos.org/nix/install | sh -s -- --daemon --darwin-use-unencrypted-nix-store-volume

##### START NIX DAEMON #####
sudo -b nix-daemon # launchctl script for nix-daemon

##### INSTALL NIX-DARWIN #####
sudo -b su
NIX_DARWIN_INSTALLER="$TMPDIR/nix-darwin-installer"
mkdir -p "$NIX_DARWIN_INSTALLER" && cd "$NIX_DARWIN_INSTALLER"
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
 source /etc/static/bashrc
 darwin-rebuild switch

Install Nix on APFS Volume (--darwin-use-unencrypted-nix-store-volume)

nix-darwin still needs Nix already installed. That's tricky on its own because Nix tools expects to write to and control /nix while the root of the partition is made read only by Apple as a method to protect your computer from malicious software. Since High Sierra, Apple has defaulted to using APFS. This has allowed the Nix team to come up with a clever solution that creates an APFS volume that gets mounted to /nix during installation. While I'm not an expert on filesystems, it helps for me to consider APFS volumes as something similar to Btrfs subvolumes in that they are space sharing volumes -- meaning you don't have to define the size of the volume during creation like you would in LVM with ext4. More information can be found on the Nix installation instructions.

Install Nix as Multi-User Installation (--daemon)

I opted to install Nix as a multi-user installtion on my macOS for a few reasons:

  1. Allows for multiple users to use the packages installed by Nix
  2. It felt a little more like NixOS as NixOS is by default a multi-user install
  3. I didn't see any downsides More information can be found on the Nix installation instructions.

Install nix-darwin

Finally, nix-darwin can be installed. Follow along with the prompts given while the installation script is running.

PS: This post is going to be actively updated, improved upon, and added to over the near future as I learn more and dig into Nix on Darwin. I'm also aiming to do a clean install soon of macOS Catalina to verify these install steps work as expected as system creep can affect things.