Popular Post flyride Posted May 23, 2022 Popular Post Share #1 Posted May 23, 2022 This post was recognized by Polanskiman! flyride was awarded the badge 'Great Content' and 5 points. Loader Information and Background RedPill is the core technology that enables DSM 7.x to run on non-Synology hardware. This post is intended to serve as a definitive tutorial/reference for configuring @pocopico's TinyCore RedPill (TCRP) loader. It explains how to install TCRP on baremetal, i.e. with DSM as the only operating system on your NAS hardware. A tutorial to install TCRP using the ESXi hypervisor is located here. There are other hypervisor tutorials in the Tutorials and Guides forum. TCRP uses a two step-process. First, a Linux OS (TinyCore) boots and evaluates the NAS hardware configuration. Therefore, it is best to have the hardware you plan to use (disk controllers and network cards in particular) installed prior to starting the TCRP setup. Then, an individualized loader (RedPill) is created. This loader is used to install and run DSM. After that, you can switch between starting DSM with RedPill, and booting back into TinyCore to adjust and rebuild the loader as needed. Basic Linux command line skills are needed to complete the installation. The tutorial provides examples of the commands that are needed, but exact syntax and capitalization are critical. If unfamiliar, research and review the following minimal list of commands: ls show the files in the current directory cat <file> show the contents of the specified file pwd show the current directory name cd <directory path> change to the specified directory (same rules as Windows, except with forward slashes instead of backslashes). With no argument, it returns to the “home” TCRP directory vi <file> a file editor, for manual editing of configuration files if required Ongoing Development This tutorial is maintained for consistency with the pocopico stable repository. Since TCRP is completely open-sourced, anyone can fork their own repo and contribute to development, and pocopico now maintains a separate development repo. As the best features and ideas are fully vetted and tested, they may be incorporated into the stable repo over time. If you use a repo, script or shell other than the pocopico stable repo, the loader may behave quite differently and the instructions and troubleshooting steps in this tutorial might no longer apply. In an open-source community, you can use any development resource you want, but you add the additional responsibility of understanding, vetting and testing that code on your system. Migration Spoiler DSM 6.x (with Jun’s loader) can be migrated to DSM 7.x using TCRP. Do not attempt to upgrade from 6.x to 7.x using the Control Panel. Complete the following tasks prior to migration: Read through this reference thoroughly Remove the 6.x loader USB and array disks (making sure to mark their order) Build a TCRP loader on a new USB to practice and confirm the build process (with all the same NAS hardware that will be used for the upgrade) Trial install DSM 7.x to a test HDD/SDD Verify DSM is working perfectly with all the NAS hardware Remove the test USB and HDD/SDD, and restore the 6.x loader USB and array disks VERIFY BACKUP of all data saved elsewhere before attempting an in-place upgrade The actual migration process is simple: Remove any existing SSD cache configuration (strongly recommended) Shut down the NAS Replace the existing 6.x USB loader with the TCRP 7.x USB loader from the process above Boot the NAS and complete the DSM Migration when prompted Restore SSD cache configuration as desired NOTE: Depending on which DSM version was previously installed, the migration process may override the manual option for DSM updates and set it to automatic. Restore the manual option from Control Panel as soon as possible - it might be necessary to shutdown the Internet connection until that is complete. Step 1. Choose a DSM Platform/Architecture Evaluate your intended NAS hardware and your the intended use of DSM, and select a platform that best meets your needs. Reference information here: https://xpenology.com/forum/topic/61634-dsm-7x-loaders-and-platforms/ Write down the selected platform (e.g. DS918+), the corresponding architecture (e.g. apollolake) and whether the platform uses SataPortMap/DiskIdxMap or Device Tree for slot mapping. This information will be needed later. Now, make sure the NAS hardware is compatible, and prepare it correctly: x86-64-compatible CPU with two cores or more Each platform have maximum threads support! Any threads in excess will be ignored For certain platforms, Intel CPUs must be 4th generation “Haswell” or newer with FMA3 instruction set The corresponding AMD CPU architecture is “Piledriver” or newer AMD-based systems may require deactivation of the C1E option in the BIOS 2GB of RAM or more 2GB or larger USB flash drive Configure the BIOS to boot from the USB flash drive ONLY SATA disk controllers are preferred, but SCSI/SAS are compatible IMPORTANT: All SATA controllers must be configured to AHCI mode SATA controllers with port multipliers are not compatible ATA controllers are not compatible (disable embedded ATA in BIOS if possible) At least one SATA/SCSI/SAS drive (HDD or SSD), minimum size 21GB IMPORTANT: Enable SATA port hotplug on each disk port, if hotplug is supported by the BIOS/controller IMPORTANT: Disable M.2 SATA ports that are not in use, if supported by the BIOS/controller NVMe drives are not usable except as dedicated cache devices Host Bus Adapters are not currently compatible with Device Tree platforms Install any NVMe drives intended as cache devices On Device Tree platforms, NVMe drives must be installed prior to loader installation in order for them to be recognized Step 2. Download TCRP and Write Image to the USB Flash Drive The latest pocopico stable loader code is always linked here: https://xpenology.com/forum/topic/7848-links-to-loaders/ Download the tinycore-redpill 7.x loader and save it to your personal computer. Then, open it with a zip manager to show the boot images: tinycore-redpill.vX.X.X.img.gz (for BIOS/CSM/Legacy boot from USB flash drive) tinycore-redpill-uefi.vX.X.X.img.gz (for UEFI/EFI boot from USB flash drive) tinycore-redpill.vX.X.X.vmdk.gz (for virtual machine SATABOOT from disk image) Select the boot image that matches the boot capability of the NAS motherboard. If unsure, choose BIOS/CSM/Legacy boot. Save the gzip file to your personal computer, then open it with a zip archive manager and save the uncompressed version. Write the uncompressed image to the USB flash drive using Win32DiskImager or other appropriate tool. The USB flash drive is used to store TinyCore and the RedPill loader that it generates. It is a permanent component of an operational XPEnology system. Do not remove it, even after the DSM installation is complete and the NAS is fully up and running. Step 3. Boot into TinyCore and Complete Pre-Configuration Updates Start your NAS with the USB flash drive installed and TinyCore will boot. Then, launch a command-line session with either of these methods: Click the Terminal icon at the bottom right of the TinyCore desktop to launch a console window Use a ssh client (e.g. PuTTY) on your computer to connect a network-based console Consult your DHCP server/router for the IP address assignment (TinyCore's host name is "box") Login credentials: tc/P@ssw0rd When the Linux command line prompt ($) is displayed, update the TCRP script ./rploader.sh update Checking Internet Access -> OK Checking if a newer version exists -> There is a newer version on the repo should we use that ? [yY/nN] Y OK, updating, please re-run after updating Updating tinycore loader with latest updates Backing up files to /mnt/sda3//mydata.tgz Then, update the TCRP support files ./rploader.sh fullupgrade <downloads snipped> Current /home/tc size is 114M , try to keep it less than 1GB as it might not fit into your image Should i update the sda with your current files [Yy/Nn] Y Backing up home files to sda : Backing up files to /mnt/sda3//mydata.tgz Finally, choose a DSM release number Each DSM build as provided by Synology has a release number. You can display the combinations of platforms and releases supported by TCRP by just running the script with no arguments ./rploader.sh <command help snipped> Available platform versions: ---------------------------------------------------------------------------------------- apollolake-7.0-41890 apollolake-7.0.1-42218 apollolake-7.1.0-42661 broadwell-7.0.1-42218 broadwell-7.1.0-42661 broadwellnk-7.0.1-42218 broadwellnk-7.1.0-42661 bromolow-7.0.1-42218 bromolow-7.1.0-42661 denverton-7.0.1-42218 denverton-7.1.0-42661 geminilake-7.0.1-42218 geminilake-7.1.0-42661 v1000-7.0.1-42218 v1000-7.1.0-42661 Step 4. Configure System-Specific Parameters Custom system parameters are stored in the user_config.json file. This can be manually edited, or TCRP can help determine appropriate values for the hardware. USB flash drive VID/PID: TCRP can query the USB flash drive for the hardware vid/pid values that DSM uses to identify the loader during bootup ./rploader.sh identifyusb Found: Superdisk Flash SerialNumber: 123456 Vendor ID: 0x1234 Product ID: 0x0001 Should i update the user_config.json with these values ? [Yy/Nn] Y Serial number/MAC: TCRP can automatically generate a serial number for the platform selected in step 1. Additionally, it will generate a random MAC address for the NAS network card. If you prefer to use the actual hardware MAC address instead, append "realmac" to the command. Example 1: random MAC address ./rploader.sh serialgen DS3622xs+ Serial Number for Model : 20C0SQRLR47QM Mac Address for Model DS3622xs+ : 00:11:32:80:B2:36 Should i update the user_config.json with these values ? [Yy/Nn] Y Example 2: real MAC address ./rploader.sh serialgen DS3622xs+ realmac Serial Number for Model : 2150SQRGS7N5T Mac Address for Model DS3622xs+ : 00:11:32:57:3A:9B Real Mac Address : 00:0C:24:62:3E:3D Notice : realmac option is requested, real mac will be used Should i update the user_config.json with these values ? [Yy/Nn] Y Drive Slot Mapping: TCRP can try to determine how to map the NAS disk controller ports to DSM slots. If the chosen platform uses SataPortMap/DiskIdxMap for port mapping, the command below will do this. If it uses Device Tree for slot mapping, the command may be skipped, as the Device Tree is configured automatically during the loader build. ./rploader.sh satamap Found "02:02.0 SATA AHCI controller" Detected 4 ports/2 drives. Override # of ports or ENTER to accept: <4> Recommended settings: SataPortMap=4 DiskIdxMap=00 Should I update the user_config with these values ? [Yy/Nn] Y If the port count is not what you expect, it may be due to the motherboard design servicing physical ports with multiple controllers, or because of M.2 SATA slot support. If necessary, the port count can be overridden with whatever you like. NOTE: If you see a WARNING message, it is certain that either some of your drives are inaccessible or the DSM install will encounter problems. Evaluate and investigate the issue. The satamap command can be rerun as many times as needed to understand the system. Manual Review: With prior loaders (such as Jun's), the configuration of these parameters was completely manual. There is no single setup that works for all hardware. Even after using the tools above, please review and verify the parameters, understand what they do, and manually edit if needed. Whatever changes rploader.sh makes to the user_config.json file can be reviewed by displaying the file contents cat user_config.json and overridden by editing the file vi user_config.json You can also add a simpler editor, nano tce-load -iw nano nano user_config.json And there is also a graphical editor accessible from the TinyCore desktop Step 5. Optional: Manually Add Driver Extensions While TCRP can automatically add drivers based on the detected NAS hardware, it isn’t foolproof. You might want to build a loader for a device you don’t actually have yet. And there are features that are "opt-in" only. So, a process exists to manually add drivers and other functionality. Extensions are stored in repositories hosted on the web. All the extensions in the main repository are viewable here: https://github.com/pocopico/rp-ext To list all the extensions recommended by TCRP's hardware detection algorithm, use ./rploader.sh listmods <architecture>-<version>-<DSMreleasenumber> ./rploader.sh listmods apollolake-7.1.0-42661 To add a specific extension, choose from the list and reference the architecture from Step 1. ./rploader.sh ext <architecture>-<version>-<DSMreleasenumber> <extensionurl> ./rploader.sh ext apollolake-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/redpill-acpid/rpext-index.json ./rploader.sh ext denverton-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/v9fs/rpext-index.json The examples illustrate adding ACPI and VIRTIO support. These are often chosen enhancements to a basic installation. Step 6. Build the Loader When all preparation steps are complete, build the loader using the command structure ./rploader.sh build <architecture>-<version>-<DSMreleasenumber> Example #1: DS3622xs+, auto detect hardware ./rploader.sh build broadwellnk-7.1.0-42661 Example #2: DS918+, use preselected drivers ./rploader.sh build apollolake-7.1.0-42661 manual TCRP will download resources from the Internet to complete the complex process of the loader build. When finished, it will write it to the USB flash drive and add new items to the GRUB boot menu. Review the output for any errors and make corrections if necessary. Step 7. Optional Backup Tasks Save the TinyCore configuration state as the default, so that the next boot of TInyCore starts with all your settings ./rploader.sh backup Back up the generated RedPill loader partition to available space on the USB flash drive ./rploader.sh backuploader Step 8: Restart and Boot DSM Using the Grub USB Option Cleanly shutdown and reboot with the TinyCore command exitcheck.sh reboot First, the GRUB Menu is displayed. If necessary, use the arrow keys to ensure that USB is selected and press ENTER. The loader will show some initialization information and silently boot DSM. Nothing else will be displayed unless a serial console is attached (see the Troubleshooting section below). Wait a few minutes, then launch either https://find.synology.com or the Synology Assistant desktop utility. If the loader is working properly, a new "SynologyNAS" will be displayed as Not installed (for a new build) or the name of your existing Migratable NAS (if upgrading from a previous version). Use your browser to connect to the NAS. If "Something went wrong" is displayed, jump to the Basic Troubleshooting section below. Otherwise, browse to the Synology Download Center and download the DSM install PAT file that matches the platform and release number specified in the loader build. Do not use the PAT file stored in TinyCore. It has modifications that are incompatible with DSM installation. However, its name may help identify the correct PAT file to download below. There can be several files that appear to be candidates. PAT files marked VirtualDSM will not work. Also there can be patch PAT files with the same numbering. These will not work and will usually be smaller than 50MB. The correct PAT file is 300MB or larger. Once the correct DSM PAT file is saved to your personal computer, upload it to the NAS. Follow the prompts to complete the installation. FOR UPGRADES ONLY: If Synology Assistant shows Not installed, or if prompted to erase the disks during the upgrade, STOP! Some or all of your array disks are not visible to DSM. This must be resolved via troubleshooting and reconfiguration before installing DSM 7.x. IMPORTANT: During the install, always select DSM manual updates. If a new install completes normally, but then fails after the reboot, it may be that DSM has attempted to auto-update itself with incompatible code. Basic Troubleshooting Spoiler Typical Problems: If the DSM installation reports something went wrong/SATA ports disabled, or if WARNING: Bad port is returned by the TCRP configuration tools, there are three primary causes: hotplug not enabled for all ports on controllers that support hotplug ports supported by the chipset but omitted from the motherboard physical implementation M.2 SATA-capable ports that have no hotplug option enabled Consider these workarounds/solutions: enable hotplug on all ports install SATA drives on all ports (including M.2 SATA ports) disable M.2 SATA ports in the BIOS (if the option exists) reduce SataPortMap port count to exclude unimplemented or M.2 SATA ports (this only works IF they are not the first ports on the controller) install a different SATA controller and disable the onboard one virtualize the DSM installation, possibly in concert with one of the above options change the DSM platform to one that uses Device Tree (which can address only the good ports, leaving out the bad) choose another motherboard which does not exhibit the causal issues A loader or SATA controller configuration that disables valid ports in order to install DSM can be updated to enable those ports once the DSM installation is complete. If the DSM installation reports that no drives are available, use the serial or TCRP console described below to help investigate the problem If unable to locate the new SynologyNAS using Synology Assistant, either the loader has kernel panicked, or the network is not functioning (usually because of a missing or incompatible network driver, or no accessible DHCP server). The only way to verify the specific cause is to use a serial console. Using the Serial Console for Troubleshooting This involves configuring a physical serial port from the NAS hardware to your personal computer and using a terminal emulation program for access. The serial console is also mirrored to a special TCRP network console. If the network is functioning (i.e. you can see the IP in Synology Assistant), it can be accessed via a browser at https://<DSM IP>:7681 If DSM has not been installed, "SynologyNAS login:" will be displayed. If DSM has been installed but cannot start, "DiskStation login:" will be displayed. This is Junior mode. You can log in with root (you won't be prompted for a password). If desired, the reason that Junior mode was started can be displayed with cat /var/log/junior_mode Disk port shutdown errors and missing disks are usually a SataPortMap/DiskIdxMap/Device Tree problem, but can be a driver issue if using SCSI or SAS host bus adapters. If SATA disks are missing, investigate DSM’s view of SataPortMap/DiskIdxMap and some other user_config.json parameters by typing cat /proc/cmdline If the loader device "/dev/synoboot" is not returned by the following command, the identifyusb step of the install may have been skipped ls /dev/synoboot Inspect DSM's view of the accessible disk devices with ls –la /sys/block If using a Device Tree platform, display the contents of the device tree with dtc –I dtb -O dts /var/run/model.dtb Where to Post for Help It’s easy for requests for installation help to get lost in various unrelated forum threads. Post requests for help as a new topic in the DSM Installation Forum. At a minimum, state the hardware configuration, selected platform, DSM version, user_config.json information (delete or redact the serial number and configured MAC address) and any information from debugging analysis that you have done. DON’T post general requests for help on this thread. Please DON’T post general requests for help on TCRP or RedPill development threads unless providing feedback on a dev issue. Spoiler 2022-Jun-03 added disabled SATA port troubleshooting, removed some satamap complex description 2022-May-31 added restoresession argument 18 22 Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted May 28, 2022 Share #2 Posted May 28, 2022 It seems like a good guide that explains in detail even the parts that users who are new to TC can easily miss. If there is only one modification, the build action is as confirmed by @pocopico. ./rploader.sh build broadwellnk-7.1.0-42661 auto instead ./rploader.sh build broadwellnk-7.1.0-42661 [static] is correct. Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted May 28, 2022 Share #3 Posted May 28, 2022 (edited) IMPORTANT: If you are attempting to upgrade DSM, and Synology Assistant shows Not installed, or if prompted to erase the disks during the upgrade, STOP! Some or all of the disks are not visible to DSM. This must be resolved via troubleshooting and reconfiguration before installing DSM 7.x. -> In the case of migration, if all of the disks are visible, Same DS918+ dsm 6 to DSM918+ dsm 7 was the migration possible message confirmed in the above process? I haven't tried it a few times, so I can't remember. Edited May 28, 2022 by Peter Suh 1 Quote Link to comment Share on other sites More sharing options...
Dreadnought Posted May 28, 2022 Share #4 Posted May 28, 2022 Could you add the update process from e.g. 7.0.1 to 7.0.1 Update X? Quote Link to comment Share on other sites More sharing options...
Fireball Posted May 28, 2022 Share #5 Posted May 28, 2022 7.0.1 create direcory "/mnt/sdb3/auxfiles" (if not created, upgrade to 7.1.0 will fail) ./rploader.sh update now ./rploader.sh fullupgrade now ./rploader.sh serialgen DS3622xs+ ./rploader.sh identifyusb now /rploader.sh satamap now ./rploader.sh build broadwellnk-7.0.1-42218 7.1.0 ./rploader.sh clean now ./rploader.sh build broadwellnk-7.1.0-42661 ./rploader.sh clean now; rm -rf /mnt/sdb3/auxfiles; rm -rf /home/tc/custom-module; ./rploader.sh backup now; sudo poweroff HPE Proliant Microserver Gen10 - working with no problems (no extensions added) 1 Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted May 28, 2022 Share #6 Posted May 28, 2022 (edited) @Fireball, @Dreadnought doesn't seem to be asking how to build to 7.1. If you update patch from 7.0.1, there are cases where you fall into a loop, but I don't think I've seen a complete solution to this part. In the end, the choice seems to be either migrating to another platform or choosing to update to 7.1. And as @flyride, the author of this topic, said, please don't ask for help in general. Wouldn't requesting a process or guide for 7.0.1 update X also be considered a general help request? Edited May 28, 2022 by Peter Suh Quote Link to comment Share on other sites More sharing options...
Dreadnought Posted May 28, 2022 Share #7 Posted May 28, 2022 39 minutes ago, Peter Suh said: @Fireball, @Dreadnought doesn't seem to be asking how to build to 7.1. If you update patch from 7.0.1, there are cases where you fall into a loop, but I don't think I've seen a complete solution to this part. In the end, the choice seems to be either migrating to another platform or choosing to update to 7.1. And as @flyride, the author of this topic, said, please don't ask for help in general. Wouldn't requesting a process or guide for 7.0.1 update X also be considered a general help request? I was not following the main thread in detail. So I thought that my request simply result in an addition to the tutorial of flyride. If this is not the case, just forget it. Quote Link to comment Share on other sites More sharing options...
PincoPalla Posted May 28, 2022 Share #8 Posted May 28, 2022 On 5/23/2022 at 8:47 AM, flyride said: Loader Information and Background RedPill is the core technology that enables DSM 7.x to run on non-Synology hardware. It has gone through an extensive alpha development process that has been very public and visible. This has resulted in many installation posts and tutorials, some of which are out of date, incorrect or incomplete. This post is intended to serve as a definitive tutorial/reference for installing DSM 7.x using the TinyCore RedPill (TCRP) loader, superseding the limited README documentation in the TCRP github. It explains how to install TCRP on baremetal, i.e. with DSM as the only operating system on your NAS hardware. Discussion of the differences associated with using a hypervisor is accomplished in a different tutorial. TCRP installs with a two step-process. First, a Linux OS (TinyCore) boots and evaluates the NAS hardware configuration. Therefore, it is best to have the hardware you plan to use (disk controllers and network cards in particular) installed prior to starting the TCRP setup. Then, an individualized loader (RedPill) is created. This loader is used to install and run DSM. After that, you can switch between starting DSM with RedPill, and booting back into TinyCore to adjust and rebuild the loader as needed. Basic Linux command line skills are needed to complete the installation. The tutorial provides examples of the commands that are needed, but exact syntax and capitalization is critical. If unfamiliar, research and review the following minimal list of commands: ls show the files in the current directory cat <file> show the contents of the specified file pwd show the current directory name cd <directory path> change to the specified directory (same rules as Windows, except with forward slashes instead of backslashes). With no argument, it returns to the “home” TCRP directory vi <file> a file editor, for manual editing of configuration files if required Migration Any XPEnology installation of DSM 6.x (with Jun’s loader) can be migrated to DSM 7.x using TCRP. However, TCRP works very differently than Jun’s loader. It is strongly recommended to complete the following tasks prior to migration: Read through this reference thoroughly Remove the 6.x loader USB and array disks (making sure to mark their order) Build a TCRP loader on a new USB to practice and confirm the build process (with all the same NAS hardware that will be used for the upgrade) Trial install DSM 7.x to a test HDD/SDD Verify DSM is working perfectly with all the NAS hardware Remove the test USB and HDD/SDD, and restore the 6.x loader USB and array disks VERIFY BACKUP of all data saved elsewhere before attempting an in-place upgrade The actual migration process is simple: Shut down the NAS Replace the existing 6.x USB loader with the TCRP 7.x USB loader from the process above Boot the NAS and complete the DSM Migration when prompted Do not attempt to upgrade from 6.x to 7.x using the Control Panel. Step 1. Choose a DSM Platform/Architecture First, make sure the NAS hardware is compatible, and prepare it correctly: x86-64-compatible CPU with two cores or more Each platform have maximum threads support! Any threads in excess will be ignored For certain platforms, Intel CPUs must be 4th generation “Haswell” or newer with FMA3 instruction set The corresponding AMD CPU architecture is “Piledriver” or newer AMD-based systems may require deactivation of the C1E option in the BIOS 2GB of RAM or more 2GB or larger USB flash drive Configure the BIOS to boot from the USB flash drive ONLY SATA disk controllers are preferred, but SCSI/SAS are compatible All SATA controllers must be configured to AHCI mode SATA controllers with port multipliers are not compatible ATA controllers are not compatible (disable embedded ATA in BIOS if possible) At least one HDD/SSD of at least 16GB in size (21GB for DVA3221) Enable BIOS/controller hotplug features on each disk port, if available NVMe is not directly supported except for caching purposes Install any NVMe drives intended for caching On certain platforms, NVMe drives must be installed prior to loader installation in order for them to be recognized Now, evaluate the NAS hardware and your the intended use of DSM, and select a platform that best meets your needs. Reference information here: https://xpenology.com/forum/topic/61634-dsm-7x-loaders-and-platforms/ Write down your chosen platform (e.g. DS918+), the corresponding architecture (e.g. apollolake) and whether the platform uses SataPortMap/DiskIdxMap or Device Tree for slot mapping. This information will be needed later. Step 2. Download TCRP and Write Image to the USB Flash Drive The latest core loader code is always linked here: https://xpenology.com/forum/topic/7848-links-to-loaders/ Download the tinycore-redpill 7.x loader and save it to your personal computer. Then, open it with a zip manager to show the boot images: tinycore-redpill.vX.X.X.img.gz (for BIOS/CSM/Legacy boot from USB flash drive) tinycore-redpill-uefi.vX.X.X.img.gz (for UEFI/EFI boot from USB flash drive) tinycore-redpill.vX.X.X.vmdk.gz (for hypervisor VM boot from disk image) Select the appropriate boot image, depending upon the boot capability of the NAS motherboard. If unsure, choose BIOS/CSM/Legacy boot. Save the gzip file to your personal computer, open it with a zip archive manager and save the uncompressed version. Write the uncompressed image to the USB flash drive using Win32DiskImager or other appropriate tool. The USB flash drive is used to store TinyCore and the RedPill loader that it generates. It is a permanent component of an operational XPEnology system. Do not remove it, even after the DSM installation is complete and the NAS is fully up and running. Step 3. Boot into TinyCore and Complete Pre-Configuration Updates Start your NAS with the USB flash drive installed and TinyCore will boot. Then, launch a command-line session with either of these methods: Click the Terminal icon at the bottom right of the TinyCore desktop to launch a console window Use a ssh client (e.g. PuTTY) on your computer to connect a network-based console Consult your DHCP server/router for the IP address assignment Login credentials: tc/P@ssw0rd When the Linux command line prompt ($) is displayed, update the TCRP script ./rploader.sh update now Checking Internet Access -> OK Checking if a newer version exists -> There is a newer version on the repo should we use that ? [yY/nN]y OK, updating, please re-run after updating Updating tinycore loader with latest updates Backing up files to /mnt/sda3//mydata.tgz Done. Then, update the TCRP support files ./rploader.sh fullupgrade now <downloads redacted> Please make sure you are using the latest 1GB img before using backup option Current /home/tc size is 114M , try to keep it less than 1GB as it might not fit into your image Should i update the sda with your current files [Yy/Nn] Y Backing up home files to sda : Backing up files to /mnt/sda3//mydata.tgz Done. Finally, choose a DSM release number Each DSM build as provided by Synology has a release number. You can display the combinations of platforms and releases supported by TCRP by just running the script with no arguments ./rploader.sh (command help redacted) Available platform versions: ---------------------------------------------------------------------------------------- apollolake-7.0-41890 apollolake-7.0.1-42218 apollolake-7.1.0-42661 broadwell-7.0.1-42218 broadwell-7.1.0-42661 broadwellnk-7.0.1-42218 broadwellnk-7.1.0-42661 bromolow-7.0.1-42218 bromolow-7.1.0-42661 denverton-7.0.1-42218 denverton-7.1.0-42661 geminilake-7.0.1-42218 geminilake-7.1.0-42661 v1000-7.0.1-42218 v1000-7.1.0-42661 ---------------------------------------------------------------------------------------- Each time an existing loader is to be rebuilt (e.g. if troubleshooting or adding hardware), re-run the above updates to get the latest code, and: ./rploader.sh clean now This will make space for the rebuild process on the limited storage of the USB flash drive. Step 4. Configure System-Specific Parameters Custom system parameters are stored in the user_config.json file. This can be manually edited, or use the TCRP rploader.sh script to determine appropriate values for the NAS. USB flash drive VID/PID: TCRP can query the USB flash drive for the hardware vid/pid values that DSM uses to identify the loader during bootup ./rploader.sh identifyusb now Found: Superdisk Flash SerialNumber: 123456 Vendor ID: 0x1234 Product ID: 0x0001 Should i update the user_config.json with these values ? [Yy/Nn] Answer “Yes” to write the detected values to user_config.json Serial number/MAC: TCRP can automatically generate a serial number for the platform selected in step 1. Additionally, it will generate a random MAC address for the NAS network card. If you prefer to use the actual hardware MAC address instead, append "realmac" to the command. Example 1: random MAC address ./rploader.sh serialgen DS3622xs+ Serial Number for Model : 20C0SQRLR47QM Mac Address for Model DS3622xs+ : 00:11:32:80:B2:36 Should i update the user_config.json with these values ? [Yy/Nn] Example 2: real MAC address ./rploader.sh serialgen DS3622xs+ realmac Serial Number for Model : 2150SQRGS7N5T Mac Address for Model DS3622xs+ : 00:11:32:57:3A:9B Real Mac Address : 00:0C:24:62:3E:3D Notice : realmac option is requested, real mac will be used Should i update the user_config.json with these values ? [Yy/Nn] Answer “Yes” to write the proposed values to user_config.json. Drive Slot Mapping: TCRP can try to determine how to map the NAS disk controller ports to DSM slots. If the chosen platform uses SataPortMap/DiskIdxMap for port mapping, the command below will do this. If it uses Device Tree for slot mapping, the command may be skipped, as the Device Tree is configured automatically during the loader build. ./rploader.sh satamap now Found "02:02.0 SATA AHCI controller" Detected 4 ports/2 drives. Override # of ports or ENTER to accept: <4> Recommended settings: SataPortMap=4 DiskIdxMap=00 Should I update the user_config with these values ? [Yy/Nn] Y Done. For the best disk hotplug functionality, accept all the ports detected on each controller. Sometimes there are multiple embedded SATA controllers on a motherboard (for example, the AsRock J4105-ITX has two controllers, each with 2 ports connected). If TCRP has trouble determining the correct configuration, it can be overridden with whatever you like. The total number of ports allocated must be less than maxdisks. For all supported platforms, default maxdisks is 16. This is a stable value that meets capacity requirements for most users. Maxdisks can be increased by editing user_config.json. Change it only if you plan to exceed 16 disks, as it may create unexpected issues with DSM. At a minimum, the internalportcfg and usbportcfg parameters will also need to be changed for compatibility with the new maxdisks. Determining the correct values for these parameters is beyond the scope of a basic installation tutorial. The tool only evaluates SATA controllers. DSM automaticaly adds the ports on SCSI and SAS controllers after the last SATA slot. Even if there are no SATA controllers present, the tool should be run to set functional default values. NOTE: As SCSI/SAS ports are not evaluated, there will be no warning if the addition of the SCSI/SAS ports exceeds the maxdisk value. Manual Review: With prior loaders (such as Jun's), the configuration of these parameters was completely manual. There is no single setup that works for all hardware. Even after using the tools above, please review and verify the parameters, understand what they do, and manually edit if needed. Whatever changes rploader.sh makes to the user_config.json file can be reviewed by displaying the file contents cat user_config.json and overridden by editing the file vi nano user_config.json You can also add a simpler editor, nano tce-load -iw nano nano user_config.json And there is also a graphical editor accessible from the TinyCore desktop Step 5. Optional: Manually Add Driver Extensions While TCRP can automatically add drivers based on the detected NAS hardware, it isn’t foolproof. You might want to build a loader for a device you don’t actually have yet. And there are features that are "opt-in" only. So, a process exists to manually add drivers and other functionality. Extensions are stored in repositories hosted on the web. All the extensions in the main repository are viewable here: https://github.com/pocopico/rp-ext To list all the extensions recommended by TCRP's hardware detection algorithm, use ./rploader.sh listmods <architecture>-<version>-<DSMreleasenumber> ./rploader.sh listmods apollolake-7.1.0-42661 To add a specific extension, choose from the list and reference the architecture from Step 1. ./rploader.sh ext <architecture>-<version>-<DSMreleasenumber> <extensionurl> ./rploader.sh ext apollolake-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/redpill-acpid/rpext-index.json ./rploader.sh ext denverton-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/v9fs/rpext-index.json The examples illustrate adding ACPI and VIRTIO support. These are often chosen enhancements to a basic installation. Step 6. Build the Loader When all preparation steps are complete, build the loader using the command structure ./rploader.sh build <architecture>-<version>-<DSMreleasenumber> [buildtype] Example #1: DS3622xs+, auto detect hardware ./rploader.sh build broadwellnk-7.1.0-42661 auto Example #2: DS918+, use preselected drivers ./rploader.sh build apollolake-7.1.0-42661 manual TCRP will download resources from the Internet to complete the complex process of the loader build. When finished, it will write it to the USB flash drive and add new items to the GRUB boot menu. Review the output for any errors and make corrections if necessary. Step 7. Optional Backup Tasks Save the TinyCore configuration state as the default, so that the next boot of TInyCore starts with all your settings ./rploader.sh backup now Back up the generated RedPill loader partition to available space on the USB flash drive ./rploader.sh backuploader now Step 8: Restart and Boot DSM Using the Grub USB Option Cleanly shutdown and reboot with the TinyCore command exitcheck.sh reboot First, the GRUB Menu is displayed. If necessary, use the arrow keys to ensure that USB is selected and press ENTER. The loader will show some initialization information and silently boot DSM. Nothing else will be displayed unless a serial console is attached (see the Troubleshooting section below). Give it a few minutes to complete booting. Then, launch either https://find.synology.com or the Synology Assistant desktop utility. If all is well, a new "SynologyNAS" will be displayed as Not installed (for a new build) or the name of your existing Migratable NAS (if upgrading from a previous version). Download the DSM install PAT file that matches the platform and DSM release number specified in the loader build. Files are available from the Synology download archive https://archive.synology.com/download/Os/DSM. There can be several files that appear to be candidates. PAT files marked VirtualDSM will not work. Also there can be patch PAT files with the same numbering. These will not work and will usually be smaller than 50MB. The correct PAT file is 300MB or larger. Once the correct DSM PAT file is downloaded to your personal computer, launch the installer and upload the PAT file to the NAS. Follow the prompts to complete the installation. IMPORTANT: If you are attempting to upgrade DSM, and Synology Assistant shows Not installed, or if prompted to erase the disks during the upgrade, STOP! Some or all of the disks are not visible to DSM. This must be resolved via troubleshooting and reconfiguration before installing DSM 7.x. Troubleshooting If unable to locate the new SynologyNAS using Synology Assistant, either the loader has kernel panicked, or the network is not functioning (usually because of a missing or incompatible network driver, or no accessible DHCP server). The only way to verify the specific cause is to use a serial console. This involves configuring a physical serial port from the NAS hardware to your personal computer and using a terminal emulation program for access. The serial console is mirrored to a special TCRP network console. If the network is functioning (i.e. you can see the IP in Synology Assistant), it can be accessed via a browser at https://<DSM IP>:7681 However access is gained, a special DSM login prompt will be displayed. This is Junior mode, visible before DSM is installed, or if DSM is installed but cannot start. If DSM has not been installed, log in with root (you won't be prompted for a password). SynologyNAS login: Disk port shutdown errors and missing disks are usually a SataPortMap/DiskIdxMap/Device Tree problem, but can be a driver issue if using SCSI or SAS host bus adapters. If SATA disks are missing, investigate DSM’s view of SataPortMap/DiskIdxMap and some other user_config.json parameters by typing cat /proc/cmdline If the loader device "/dev/synoboot" is not returned by the following command, the identifyusb step of the install may have been skipped ls -la /dev/synoboot Inspect DSM's view of the accessible disk devices with ls –la /sys/block If using a Device Tree platform, display the contents of the device tree with dtc –I dtb /var/run/model.dtb Where to Post for Help It’s easy for requests for installation help to get lost in various unrelated forum threads. Post requests for help as a new topic in the DSM Installation Forum. At a minimum, state the hardware configuration, selected platform, DSM version, user_config.json information (delete or redact the serial number and configured MAC address) and any information from debugging analysis that you have done. DON’T post general requests for help on this thread. Please DON’T post general requests for help on TCRP or RedPill development threads unless providing feedback on a dev issue. Final Words Because of ongoing community development, TCRP capabilities change rapidly. Please DO post corrections and new or divergent results when encountered, so that this tutorial may be updated. Great post Flyride, thanks I hope to be able to fix something. Thank you Quote Link to comment Share on other sites More sharing options...
flyride Posted May 28, 2022 Author Share #9 Posted May 28, 2022 Minor changes made to the rploader.sh command syntax to reflect @pocopico's latest updates. No change in functionality with old or new syntax. Quote Link to comment Share on other sites More sharing options...
billat29 Posted June 1, 2022 Share #10 Posted June 1, 2022 A typo. I think. Should it be vi user_config.json rather than vi nano user_config.json Quote Link to comment Share on other sites More sharing options...
flyride Posted June 1, 2022 Author Share #11 Posted June 1, 2022 Thank you Quote Link to comment Share on other sites More sharing options...
asheenlevrai Posted June 2, 2022 Share #12 Posted June 2, 2022 Thanks a lot for putting this together in a comprehensive form. Really appreciated! On 5/23/2022 at 8:47 AM, flyride said: Step 5. Optional: Manually Add Driver Extensions The examples illustrate adding ACPI and VIRTIO support. These are often chosen enhancements to a basic installation. Could you please elaborate on that? What "non-default" driver extensions are generally chosen and why (what do they bring)? I'm not familiar with ACPI but it seems to me that ACPI supports sounds pretty central/critical, right? Why wouldn't it be included in every installation? (I have no idea about what VIRTIO is, yet...) Thanks a lot -a- Quote Link to comment Share on other sites More sharing options...
asheenlevrai Posted June 2, 2022 Share #13 Posted June 2, 2022 On 5/23/2022 at 8:47 AM, flyride said: Step 7. Optional Backup Tasks Back up the generated RedPill loader partition to available space on the USB flash drive ./rploader.sh backuploader I don't understand. Isn't the generated RP loader partition already on the USB flash drive? This would create a backup copy on the same medium? Is that right? Quote Link to comment Share on other sites More sharing options...
flyride Posted June 2, 2022 Author Share #14 Posted June 2, 2022 Some functions cannot be auto-detected. If they are not part of the core RedPill code (ACPI is not) and have no PCI device associated with them for detection, this process handles them. Quote Link to comment Share on other sites More sharing options...
flyride Posted June 2, 2022 Author Share #15 Posted June 2, 2022 16 minutes ago, asheenlevrai said: I don't understand. Isn't the generated RP loader partition already on the USB flash drive? This would create a backup copy on the same medium? Is that right? Writing the post-build loader image created by TCRP to the loader partition is a one-way operation. Once DSM is installed or upgraded, the loader partition is altered. ./rploader.sh backuploader makes a copy of the post-build loader image to free space on the flash drive. The loader image can then be reverted if necessary. ./rploader.sh backup saves the configuration state (pre-build) so that it is intact as you left it when you next boot TinyCore. ./rploader.sh restoresession attempts to reconstruct the configuration state (pre-build) from the previous session if it was not saved with backup. 1 Quote Link to comment Share on other sites More sharing options...
flyride Posted June 3, 2022 Author Share #16 Posted June 3, 2022 Added issue description and troubleshooting steps for "Something went wrong/SATA port disabled" error message on install. 2 Quote Link to comment Share on other sites More sharing options...
sliders Posted June 6, 2022 Share #17 Posted June 6, 2022 hello , @flyride , I want to say a big thank you for this tutorial 2 Quote Link to comment Share on other sites More sharing options...
vbap Posted June 7, 2022 Share #18 Posted June 7, 2022 (edited) Thanks @flyride Edited June 7, 2022 by vbap 1 Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted June 8, 2022 Share #19 Posted June 8, 2022 On 5/28/2022 at 10:33 PM, Fireball said: 7.0.1 create direcory "/mnt/sdb3/auxfiles" (if not created, upgrade to 7.1.0 will fail) ./rploader.sh update now ./rploader.sh fullupgrade now ./rploader.sh serialgen DS3622xs+ ./rploader.sh identifyusb now /rploader.sh satamap now ./rploader.sh build broadwellnk-7.0.1-42218 7.1.0 ./rploader.sh clean now ./rploader.sh build broadwellnk-7.1.0-42661 ./rploader.sh clean now; rm -rf /mnt/sdb3/auxfiles; rm -rf /home/tc/custom-module; ./rploader.sh backup now; sudo poweroff HPE Proliant Microserver Gen10 - working with no problems (no extensions added) The second parameter "now" is a completely unnecessary parameter. It was initially misguided from pocopico. Even if "now" is removed and used, everything works normally. I am in the process of guiding again to remove this "now" from the guide I made. Quote Link to comment Share on other sites More sharing options...
SsilviuS Posted June 9, 2022 Share #20 Posted June 9, 2022 thank you for the guide, works like a charm, installed it on esxi 7 without a hitch anyone knows how to patch update this, is it even possible, tried to manual update from DSM to 7.1-42661-2 but it goes in a loop asking for recovery? Quote Link to comment Share on other sites More sharing options...
flyride Posted June 9, 2022 Author Share #21 Posted June 9, 2022 31 minutes ago, SsilviuS said: thank you for the guide, works like a charm, installed it on esxi 7 without a hitch anyone knows how to patch update this, is it even possible, tried to manual update from DSM to 7.1-42661-2 but it goes in a loop asking for recovery? For 42661-2 look here: https://xpenology.com/forum/topic/53817-redpill-tinycore-loader/?do=findComment&comment=284855 Generally you want to look at the updates reporting forum before attempting any update. https://xpenology.com/forum/forum/78-dsm-updates-reporting/ 1 Quote Link to comment Share on other sites More sharing options...
stefanakis Posted June 11, 2022 Share #22 Posted June 11, 2022 Thank you so much , excellent guide. And just so I save somebody some time, I spent hours trying to figure out why ./rploader.sh fullupgrade did not work and destroyed all scripts and had to reburn the image to USB to start again. My motherboard battery was toast and time was incorrect. MAKE sure your clock is set in tinycore Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted June 11, 2022 Share #23 Posted June 11, 2022 On 6/11/2022 at 6:42 PM, stefanakis said: Thank you so much , excellent guide. And just so I save somebody some time, I spent hours trying to figure out why ./rploader.sh fullupgrade did not work and destroyed all scripts and had to reburn the image to USB to start again. My motherboard battery was toast and time was incorrect. MAKE sure your clock is set in tinycore I also experienced the disappearance of all files in /home/tc for no reason. There is no need to re-record the USB for recovery. You can also download the rploader.sh below and re-download it and restore it only with fullupgrade. curl --location "https://github.com/pocopico/tinycore-redpill/raw/main/rploader.sh" --output rploader.sh ./rploader.sh fullupgrade 1 Quote Link to comment Share on other sites More sharing options...
piter Posted June 18, 2022 Share #24 Posted June 18, 2022 I know that we have to run these commands after installing update 2 (in this example for DS3622xs+): ./rploader.sh update sudo ./rploader.sh postupdate broadwellnk-7.1.0-42661 In my case sudo was very important - without sudo I had a lot of errors (including "Compressed data is corrupt"). My question is: don't we have to run this command at the end: ./rploader.sh backup Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted June 18, 2022 Share #25 Posted June 18, 2022 On 6/18/2022 at 4:19 PM, piter said: My question is: don't we have to run this command at the end: ./rploader.sh backup This can be done at the end after the loader building work is finished. After that, boot or shutdown processing can be performed. sudo reboot or sudo poweroff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.