This guide will demonstrate how to install Debian (Stretch) on the My Cloud PR4100 NAS. No modifications to the NAS or its firmware are required. The installation process does not alter the factory firmware, and is fully reversible if reasonable precautions are taken.
WARNING: THE FOLLOWING PROCEDURES MAY VOID YOUR WARRANTY OR BRICK YOUR NAS - USE EXTREME CAUTION AT ALL TIMES
NOTE: BASIC LINUX SKILLS AND A SPARE HARD DRIVE ARE REQUIRED
The following guide is based on the WD My Cloud PR4100 NAS, but may be applicable to other WD My Cloud NAS models, possibly with minor variations applied as needed. It also assumes that the user knows how to obtain the NAS IP address and establish an SSH connection.
Compatibility:
Model: PR4100 / PR2100
Processor: Intel Pentium N3710 1.6GHz Quad Core
Archetecture: x86_64 (64 bit)
Distro: amd64
Required Tools:
Rufus (source): https://rufus.akeo.ie/
Mini Tool Partition Wizard: https://www.minitool.com/partition-manager/partition-wizard-home.html
PuTTY: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Optional:
Required Download:
Debian 9 - Stretch (x86_64):
https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-netinst.iso
Caveats:
UPDATE: Hardware control has been achieved⌠Instructions coming soon.
Due to missing drivers, there is currently no control of the fan (runs full speed), reset button, front text display, or front LEDs. The blue HDD LEDs are controlled by the hardware and work as expected. USB access and hot-swap HDD functionality have not been tested. Otherwise, Debian runs without any noticable problems,
Debian does not install a web inerface to configure and/or manage the NAS, but many packages exist to provide this functionality. Webmin and Openmediavault are two popular options.
Installation Overview:
- Power off the NAS.
- Remove all hard drives from the NAS.
- Insert a blank hard drive (with no partitions) into the NAS.
- Prepare a bootable USB stick using Rufus.
- Replace the existing
\boot\grub\grub.cfg
file. - Create a
preseed.cfg
file and copy it to\preseed.cfg
on the USB stick. - Remove the USB stick and insert it into the NAS.
- Power on the NAS. Installation time may vary from 30 to 60 minutes.
- When the NAS powers off, remove the USB stick and power it back on.
- Use SSH to connect with the NAS and login to verify that the installation was successful.
Installation Instructions:
Power off the NAS by briefly pressing the power button, then remove all hard drives and number each of them to indicate which HDD bay they originated from.
WARNING: Failure to remove all existing hard drives from the NAS may result in data loss.
Insert a blank hard drive (with no partitions) into the first HDD bay of the NAS. Any HDD bay may be used, but itâs easier to remember that the OS is stored on the hard drive in the first HDD bay. If necessary, the Mini Tool Partition Wizard (or similar tools) may be used to ensure that the hard drive is in fact blank. A blank hard drive is not strictly required, but it helps to avoid potential data loss and the complications of inserting a spare hard drive with a bootable partition, which can have unpredictable consequences.
Prepare a bootable USB stick using Rufus to load the Debian ISO file. The USB stick must be formatted as fat32 and it must be bootable. If using Rufus, load the Debian ISO file by clicking the little CD icon next to âCreate a bootable disk using [FreeDOS]â. Afterwards, you should see âCreate a bootable disk using [ISO Image]â. Other ISO to USB tools may work, but only Rufus has been fully tested.
After the ISO to USB process has finished, open \boot\grub\grub.cfg
on the USB stick and replace its contents with the following parameters.
set default="0"
set timeout="5"
menuentry --hotkey=i 'Debian Preseed Install' {
linux /install.amd/vmlinuz debian-installer/locale=en_US keyboard-configuration/xkb-keymap=us preseed/file=/cdrom/preseed.cfg console=ttyS0,115200n8
initrd /install.amd/initrd.gz
}
submenu 'Advanced options ...' {
menuentry --hotkey=e '... Expert install' {
linux /install.amd/vmlinuz priority=low console=ttyS0,115200n8
initrd /install.amd/initrd.gz
}
menuentry --hotkey=r '... Rescue mode' {
linux /install.amd/vmlinuz rescue/enable=true console=ttyS0,115200n8
initrd /install.amd/initrd.gz
}
menuentry --hotkey=a '... Automated install' {
linux /install.amd/vmlinuz auto=true priority=critical console=ttyS0,115200n8
initrd /install.amd/initrd.gz
}
}
Create a preseed.cfg
file using one of the following sets of parameters and copy it to \preseed.cfg
on the root of the USB stick. The first set of parameters provides a fully automated (headless) install. The second set of parameters can be used to establish an SSH connection so that the rest of the install process can be completed manually. Only one set of parameters may be used.
Debian Preseeding (Stretch):
https://www.debian.org/releases/stretch/amd64/apb.html.en
https://www.debian.org/releases/stretch/amd64/apbs04.html.en
The usernames and passwords in the âAccount Setupâ section of the preseed.cfg
file should be changed prior to installation. The default login for SSH is (username: debian / password: insecure). By default, the root user cannot connect to SSH and a standard user account must be used. If needed, the su
command may be used to become the root user (password: r00tme).
### Preseed (Automated Install):
### Splash
d-i debian-installer/splash boolean false
### Localization
d-i debian-installer/locale string en_US
### Keyboard Selection
d-i keyboard-configuration/xkb-keymap select us
### Network Configuration
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string
### Hardware Detection
d-i ethdetect/prompt_missing_firmware boolean false
d-i hw-detect/load_firmware boolean true
### Network Console (username is installer)
#d-i anna/choose_modules string network-console
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
### Mirror Settings
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
### Account Setup
d-i passwd/root-password password r00tme
d-i passwd/root-password-again password r00tme
d-i passwd/user-fullname string Debian User
d-i passwd/username string debian
d-i passwd/user-password password insecure
d-i passwd/user-password-again password insecure
### Clock and Time Zone
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern
d-i clock-setup/ntp boolean true
### Partitioning
d-i partman-efi/non_efi_system boolean true
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
### Apt Setup
d-i apt-setup/non-free boolean true
#d-i apt-setup/contrib boolean true
#d-i apt-setup/use_mirror boolean false
#d-i apt-setup/services-select multiselect security, updates
#d-i apt-setup/security_host string security.debian.org
### Package Selection
tasksel tasksel/first multiselect standard, web-server
d-i pkgsel/include string openssh-server build-essential
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
### Bootloader Installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean false
d-i grub-installer/bootdev string /dev/sda
d-i debian-installer/add-kernel-opts string nomodeset acpi_osi=Linux acpi_enforce_resources=lax console=ttyS0,115200n8
### Finish
d-i finish-install/reboot_in_progress note
d-i debian-installer/exit/poweroff boolean true
### Custom Commands
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#d-i preseed/late_command string LINUX COMMANDS GO HERE
The default login during the manual SSH install process is (username: installer / password: r00tme). Afterwards, the default login for SSH is (username: debian / password: insecure).
### Preseed (Manual SSH Install):
### Splash
d-i debian-installer/splash boolean false
### Localization
d-i debian-installer/locale string en_US
### Keyboard Selection
d-i keyboard-configuration/xkb-keymap select us
### Network Configuration
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string
### Hardware Detection
d-i ethdetect/prompt_missing_firmware boolean false
d-i hw-detect/load_firmware boolean true
### Network Console (username is installer)
d-i anna/choose_modules string network-console
d-i network-console/password password r00tme
d-i network-console/password-again password r00tme
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
Remove the USB stick and insert it into the NAS, then briefly press the power button to power on the NAS. At this point, the installation process will begin. Fully automated installation time may vary from 30 to 60 minutes. The manual SSH install process may take up to 5 minutes to provide an SSH connection.
If using the automated installation process, wait for the NAS to automatically power off, then remove the USB stick and power on the NAS by briefly pressing the power button.
WARNING: If using the automated installation process, EXTREME CAUTION must be taken not to leave the prepared USB stick inserted in the NAS (or computer) after the installation process is complete, or data loss may occur.
Afterwards, use SSH to connect with the NAS and login to verify that the installation was successful.
Installation Reversal:
To reverse the Debian installation process, simply power off the NAS by briefly pressing the power button, then remove the hard drive that Debian was installed on. Afterwards, replace the original hard drives and power on the NAS. The Debian installation process does not alter the WD factory firmware, which makes switching back and forth as easy as pushing a button and swapping hard drives⌠if desired.