polanskiman Posted September 29, 2022 #1 Posted September 29, 2022 @pocopico I initially burn TRCP v8. Updated to TRCP v9. In the meantime I upgraded DSM from 7.1 u1 to 7.1 u4. All went well. Using broadwellnk-7.1.0-42661. Now I wish to recreated the loader on a different flash drive. How can I do so, so that the loader understands I am in 7.1 u4 and not on the major DSM 7.1 I have tried fiddling around but clearly I am missing something and DSM is not booting. Quote
pocopico Posted September 29, 2022 #2 Posted September 29, 2022 (edited) 2 hours ago, Polanskiman said: @pocopico I initially burn TRCP v8. Updated to TRCP v9. In the meantime I upgraded DSM from 7.1 u1 to 7.1 u4. All went well. Using broadwellnk-7.1.0-42661. Now I wish to recreated the loader on a different flash drive. How can I do so, so that the loader understands I am in 7.1 u4 and not on the major DSM 7.1 I have tried fiddling around but clearly I am missing something and DSM is not booting. You can download the update file from syno and extract the contents of the pat file using the extractor that is stored on your /home/tc/custom-module/ Link to updates : https://archive.synology.com/download/Os/DSM/7.1-42661-4 The commands for doing so should be : # Copy the extractor tcrppart="$(mount | grep -i optional | grep cde | awk -F / '{print $3}' | uniq | cut -c 1-3)3" sudo cp /mnt/${tcrppart}/auxfiles/extractor/lib* /lib/ sudo ln -s /lib /lib64 sudo cp /mnt/${tcrppart}/auxfiles/extractor/scemd /bin/syno_extract_system_patch #Extract the file temp_pat_folder="/home/tc/temppat" mkdir ${temp_pat_folder} /bin/syno_extract_system_patch ${patfile} ${temp_pat_folder} At the end you can copy the rd.gz from the extracted folder to your loader second partition and perform postupdate Edited September 29, 2022 by pocopico 1 Quote
polanskiman Posted September 29, 2022 Author #3 Posted September 29, 2022 Thank you. And then simply reboot? Quote
pocopico Posted September 29, 2022 #4 Posted September 29, 2022 17 minutes ago, Polanskiman said: Thank you. And then simply reboot? Yes after a succesfull post update you should be fine. If you end up in recovery you can press recovery and that should copy the ramdisk and kernel found on the root of DSM /.syno/patch/rd.gz to your second partition and then you can go back to TCRP to perform the postupdate again. All this upgrade actions can be done automatically if you use the newly introduced TCRP Friend. To bring this to your loader you can execute ./rploader.sh bringfriend Of course there are some that prefer manual and more controlled operations, so i will leave the other commands there just in case. Quote
polanskiman Posted September 29, 2022 Author #5 Posted September 29, 2022 I actually had brought TCRP Friend to the loader but it was not working. Here is my process. Please correct me if I am wrong. 1. burn image to key 2. boot TinyCore then run: ./rploader.sh update ./rploader.sh fullupgrade ./rploader.sh identifyusb ./rploader.sh serialgen DS3622xs+ realmac ./rploader.sh satamap ./rploader.sh listmods broadwellnk-7.1.0-42661 ./rploader.sh build broadwellnk-7.1.0-42661 then download the https://global.download.synology.com/download/DSM/criticalupdate/update_pack/42661-4/synology_broadwellnk_3622xs%2B.pat to /home/tc/custom-module/ (I didn't see any 'cache-module' directory) Then run the below code: 56 minutes ago, pocopico said: # Copy the extractor tcrppart="$(mount | grep -i optional | grep cde | awk -F / '{print $3}' | uniq | cut -c 1-3)3" sudo cp /mnt/${tcrppart}/auxfiles/extractor/lib* /lib/ sudo ln -s /lib /lib64 sudo cp /mnt/${tcrppart}/auxfiles/extractor/scemd /bin/syno_extract_system_patch #Extract the file temp_pat_folder="/home/tc/temppat" mkdir ${temp_pat_folder} /bin/syno_extract_system_patch ${patfile} ${temp_pat_folder} Then reboot in TCRP and run: ./rploader.sh postupdate How would I need to do this if using TCRP Friends? Sorry if I'm a bit thick but after several years off Xpenology I have become rather rusty and old! Quote
pocopico Posted September 29, 2022 #6 Posted September 29, 2022 Sorry corrected the folder name should be /home/tc/custom-module/ Quote
pocopico Posted September 29, 2022 #7 Posted September 29, 2022 27 minutes ago, Polanskiman said: How would I need to do this if using TCRP Friends? The TCRP Friend is automatically patching the kernel and ramdisk after each update for there is no need to manual patching. Quote
polanskiman Posted September 29, 2022 Author #8 Posted September 29, 2022 Unfortunately I am struggling. After booting DSM is not even visible on the network. Not sure if I was clear though, I had already booted to DSM 7.1 u4 with my previous key drive, not sure if that makes any difference. Quote
polanskiman Posted September 29, 2022 Author #9 Posted September 29, 2022 @pocopico I just realized something. The pat file is not being extracted: tc@box:/mnt/sdc3/auxfiles$ tcrppart="$(mount | grep -i optional | grep cde | awk -F / '{print $3}' | uniq | cut -c 1-3)3" tc@box:/mnt/sdc3/auxfiles$ sudo cp /mnt/${tcrppart}/auxfiles/extractor/lib* /lib/ tc@box:/mnt/sdc3/auxfiles$ sudo ln -s /lib /lib64 tc@box:/mnt/sdc3/auxfiles$ sudo cp /mnt/${tcrppart}/auxfiles/extractor/scemd /bin/syno_extract_system_patch tc@box:/mnt/sdc3/auxfiles$ temp_pat_folder="/home/tc/temppat" tc@box:/mnt/sdc3/auxfiles$ mkdir ${temp_pat_folder} tc@box:/mnt/sdc3/auxfiles$ /bin/syno_extract_system_patch ${patfile} ${temp_pat_folder} /bin/syno_extract_system_patch: /usr/local/lib/libcurl.so.4: no version information available (required by /bin/syno_extract_system_patch) Copyright (c) 2003-2021 Synology Inc. All rights reserved. /bin/syno_extract_system_patch PATCH_PATH DEST_PATH tc@box:/mnt/sdc3/auxfiles$ cd /home/tc/temppat tc@box:~/temppat$ ls -la total 0 drwxr-sr-x 2 tc staff 40 Sep 29 12:17 ./ drwxr-s--- 13 tc staff 780 Sep 29 12:17 ../ tc@box:~/temppat$ Quote
pocopico Posted September 29, 2022 #10 Posted September 29, 2022 (edited) 1 hour ago, Polanskiman said: Unfortunately I am struggling. After booting DSM is not even visible on the network. Not sure if I was clear though, I had already booted to DSM 7.1 u4 with my previous key drive, not sure if that makes any difference. There was an issue with broadwellnk that was fixed a couple of minutes ago. Can you please try again ? Also the variable ${patfile} should be set to your pat file location. You should point to your downloaded pat file. EDIT: before running these commands please run : curl --insecure -L "https://global.download.synology.com/download/DSM/criticalupdate/update_pack/42661-4/synology_broadwellnk_3622xs%2B.pat" -o /home/tc/ds3622_42962U4.pat patfile="/home/tc/ds3622_42962U4.pat" Then re-run the commands that i've sent you earlier Edited September 29, 2022 by pocopico Quote
polanskiman Posted September 29, 2022 Author #11 Posted September 29, 2022 1 hour ago, pocopico said: Also the variable ${patfile} should be set to your pat file location. No matter how I set it I can't see any extraction going on. Can you please give the proper syntax? Quote
pocopico Posted September 29, 2022 #12 Posted September 29, 2022 3 minutes ago, Polanskiman said: No matter how I set it I can't see any extraction going on. Can you please give the proper syntax? Yes please give me a couple of minutes to test first. Quote
pocopico Posted September 29, 2022 #13 Posted September 29, 2022 Well it was harder than i thought. I had this update extraction methon on my todo list but it has stuck in between other higher priority issues. Meanwhile i wrote this script that should do the work for you. Just download it in your TCRP /home/tc folder change execute bit with chmod +x getupdatedrd.sh and execute. getupdatedrd.sh Quote
polanskiman Posted September 29, 2022 Author #14 Posted September 29, 2022 1 hour ago, pocopico said: Well it was harder than i thought. I had this update extraction methon on my todo list but it has stuck in between other higher priority issues. Meanwhile i wrote this script that should do the work for you. Just download it in your TCRP /home/tc folder change execute bit with chmod +x getupdatedrd.sh and execute. getupdatedrd.sh 3.63 kB · 1 download Something is off 🧐 or I am doing something wrong: tc@box:~$ sh getupdatedrd.sh : not foundd.sh: line 2: : not foundd.sh: line 5: mkdir: cannot create directory '/home/tc/patch-extractor/\r': No such file or directory : not foundd.sh: line 7: : No such file or directory: can't cd to /home/tc/patch-extractor/ : not foundd.sh: line 9: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 345M 100 345M 0 0 66.7M 0 0:00:05 0:00:05 --:--:-- 68.0M : not foundd.sh: line 12: tar: ../oldpat.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: hda1.tgz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: hda1.tgz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now : not foundd.sh: line 16: mkdir: cannot create directory '/home/tc/patch-extractor/lib/\r': No such file or directory : not foundd.sh: line 18: cp: cannot stat 'usr/lib/libicudata.so*': No such file or directory cp: cannot stat 'usr/lib/libicui18n.so*': No such file or directory cp: cannot stat 'usr/lib/libicuuc.so*': No such file or directory cp: cannot stat 'usr/lib/libjson.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_program_options.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_locale.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_filesystem.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_thread.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_coroutine.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_regex.so*': No such file or directory cp: cannot stat 'usr/lib/libapparmor.so*': No such file or directory cp: cannot stat 'usr/lib/libjson-c.so*': No such file or directory cp: cannot stat 'usr/lib/libsodium.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_context.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocrypto.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocredentials.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_iostreams.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocore.so*': No such file or directory cp: cannot stat 'usr/lib/libicuio.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_chrono.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_date_time.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_system.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocodesign.so.7*': No such file or directory cp: cannot stat 'usr/lib/libsynocredential.so*': No such file or directory cp: cannot stat 'usr/lib/libjson-glib-1.0.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_serialization.so*': No such file or directory cp: cannot stat 'usr/lib/libmsgpackc.so*': No such file or directory : not foundd.sh: line 46: cp: cannot stat 'usr/syno/sbin/synoarchive': No such file or directory : not foundd.sh: line 48: : not foundd.sh: line 52: : not foundd.sh: line 54: : not foundd.sh: line 56: getupdatedrd.sh: line 57: ./xxd: not found getupdatedrd.sh: line 57: ./xxd: not found getupdatedrd.sh: line 58: ./xxd: not found getupdatedrd.sh: line 58: ./xxd: not found getupdatedrd.sh: line 59: ./xxd: not found getupdatedrd.sh: line 59: ./xxd: not found : not foundd.sh: line 60: : not foundd.sh: line 62: mkdir: cannot create directory '/mnt/sdc3\r/auxfiles/patch-extractor\r': No such file or directory : not foundd.sh: line 64: cp: cannot stat '/home/tc/patch-extractor/lib': No such file or directory cp: cannot stat '/home/tc/patch-extractor/synoarchive.*': No such file or directory : not foundd.sh: line 67: cp: cannot stat '/home/tc/patch-extractor/lib': No such file or directory cp: cannot stat '/home/tc/patch-extractor/synoarchive.*': No such file or directory : not foundd.sh: line 70: mkdir: cannot create directory '/home/tc/temppat\r\r': File exists : not foundd.sh: line 74: curl: (3) URL using bad/illegal format or missing URL : not foundd.sh: line 78: getupdatedrd.sh: line 79: synoarchive.nano: not found : not foundd.sh: line 80: tar: flashupdate-3622xs+_7.1-42661-s3.tar\r: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: content.txz\r: Cannot open: No such file or directory tar: Error is not recoverable: exiting now ls: cannot access '/home/tc/temppat'$'\r\r''/rd.gz': No such file or directory The initrd you need is -> : not foundd.sh: line 84: Quote
pocopico Posted September 29, 2022 #15 Posted September 29, 2022 8 hours ago, Polanskiman said: Something is off 🧐 or I am doing something wrong: tc@box:~$ sh getupdatedrd.sh : not foundd.sh: line 2: : not foundd.sh: line 5: mkdir: cannot create directory '/home/tc/patch-extractor/\r': No such file or directory : not foundd.sh: line 7: : No such file or directory: can't cd to /home/tc/patch-extractor/ : not foundd.sh: line 9: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 345M 100 345M 0 0 66.7M 0 0:00:05 0:00:05 --:--:-- 68.0M : not foundd.sh: line 12: tar: ../oldpat.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: hda1.tgz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: hda1.tgz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now : not foundd.sh: line 16: mkdir: cannot create directory '/home/tc/patch-extractor/lib/\r': No such file or directory : not foundd.sh: line 18: cp: cannot stat 'usr/lib/libicudata.so*': No such file or directory cp: cannot stat 'usr/lib/libicui18n.so*': No such file or directory cp: cannot stat 'usr/lib/libicuuc.so*': No such file or directory cp: cannot stat 'usr/lib/libjson.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_program_options.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_locale.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_filesystem.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_thread.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_coroutine.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_regex.so*': No such file or directory cp: cannot stat 'usr/lib/libapparmor.so*': No such file or directory cp: cannot stat 'usr/lib/libjson-c.so*': No such file or directory cp: cannot stat 'usr/lib/libsodium.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_context.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocrypto.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocredentials.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_iostreams.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocore.so*': No such file or directory cp: cannot stat 'usr/lib/libicuio.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_chrono.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_date_time.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_system.so*': No such file or directory cp: cannot stat 'usr/lib/libsynocodesign.so.7*': No such file or directory cp: cannot stat 'usr/lib/libsynocredential.so*': No such file or directory cp: cannot stat 'usr/lib/libjson-glib-1.0.so*': No such file or directory cp: cannot stat 'usr/lib/libboost_serialization.so*': No such file or directory cp: cannot stat 'usr/lib/libmsgpackc.so*': No such file or directory : not foundd.sh: line 46: cp: cannot stat 'usr/syno/sbin/synoarchive': No such file or directory : not foundd.sh: line 48: : not foundd.sh: line 52: : not foundd.sh: line 54: : not foundd.sh: line 56: getupdatedrd.sh: line 57: ./xxd: not found getupdatedrd.sh: line 57: ./xxd: not found getupdatedrd.sh: line 58: ./xxd: not found getupdatedrd.sh: line 58: ./xxd: not found getupdatedrd.sh: line 59: ./xxd: not found getupdatedrd.sh: line 59: ./xxd: not found : not foundd.sh: line 60: : not foundd.sh: line 62: mkdir: cannot create directory '/mnt/sdc3\r/auxfiles/patch-extractor\r': No such file or directory : not foundd.sh: line 64: cp: cannot stat '/home/tc/patch-extractor/lib': No such file or directory cp: cannot stat '/home/tc/patch-extractor/synoarchive.*': No such file or directory : not foundd.sh: line 67: cp: cannot stat '/home/tc/patch-extractor/lib': No such file or directory cp: cannot stat '/home/tc/patch-extractor/synoarchive.*': No such file or directory : not foundd.sh: line 70: mkdir: cannot create directory '/home/tc/temppat\r\r': File exists : not foundd.sh: line 74: curl: (3) URL using bad/illegal format or missing URL : not foundd.sh: line 78: getupdatedrd.sh: line 79: synoarchive.nano: not found : not foundd.sh: line 80: tar: flashupdate-3622xs+_7.1-42661-s3.tar\r: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: content.txz\r: Cannot open: No such file or directory tar: Error is not recoverable: exiting now ls: cannot access '/home/tc/temppat'$'\r\r''/rd.gz': No such file or directory The initrd you need is -> : not foundd.sh: line 84: OK ! it took me a while to finish my previous work on rploader functions. You should now be able to execute ./rploader.sh downloadupgradepat The normal process though should be to recover with pressing the recover button on DSM GUI. This will recover the correct pat file to loader partition2 and then the postupdate can run. A bit of more explanation here : 1 Quote
polanskiman Posted September 30, 2022 Author #16 Posted September 30, 2022 All went fine until the last bit: tc@box:~$ ./rploader.sh downloadupgradepat 1) DS1621+ 3) DS3615xs 5) DS3622xs+ 7) DS920+ 9) DVA3221 11) RS4021xs+ 2) DS2422+ 4) DS3617xs 6) DS918+ 8) DVA1622 10) FS6400 Select Model : 5 Selected model : DS3622xs+ 1) 7.1.1-42962-1-NanoPacked 6) 7.1-42661-1-NanoPacked 11) 7.0.1-42218-3 2) 7.1.1-42962-1 7) 7.1-42661-1 12) 7.0.1-42218-2 3) 7.1-42661-4 8) 7.1-42661 13) 7.0.1-42218-1 4) 7.1-42661-3 9) 7.0.1-42218-5 14) 7.0.1-42218 5) 7.1-42661-2 10) 7.0.1-42218-4 15) 7.0-41890 Select update version : 3 Selected version : 7.1-42661-4 1) "https://global.download.synology.com/download/DSM/criticalupdate/update_pack/42661-4/synology_broadwellnk_3622xs%2B.pat" Select pat file URL : 1 Selected patfile : https://global.download.synology.com/download/DSM/criticalupdate/update_pack/42661-4/synology_broadwellnk_3622xs%2B.pat Downloading PAT file ################################################################################################ 100.0% Downloaded Patfile /home/tc/DS3622xs+_42661-4.pat Extracting pat file to find your files... Upgrade patfile /home/tc/DS3622xs+_42661-4.pat will be extracted to /home/tc/temppat PAT file is a smallupdate file synoarchive.nano: error while loading shared libraries: libsynocodesign.so.7: cannot open shared object file: No such file or directory ls: cannot access 'flash*update*': No such file or directory tar: Old option 'f' requires an argument. Try 'tar --help' or 'tar --usage' for more information. tar: content.txz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now Something went wrong or the update file does not contain rd.gz or zImage There is some progress though. DSM was visible on the network (seems to be related to the fact that the loader was updated to v 0.9.2.6 although I am not sure) in a recoverable state before I even run the ./rploader.sh downloadupgradepat command. So this looked promising. I should have stopped here and recover but being half awake, I forcibly shutdown, booted in TCRP and run ./rploader.sh downloadupgradepat which gave me the above error. DSM was no longer visible on the network. duh! So I used the 2 neurones I had left in storage, and started all from scratch. Here is the procedure in case this helps anyone in the same situation: 1. burn TCRP v.0.9.2.5 image to usb key and plug to NAS 2. boot TinyCore then run: ./rploader.sh update here I got updated to TCRP v.0.9.2.6 ./rploader.sh fullupgrade ./rploader.sh identifyusb ./rploader.sh serialgen DS3622xs+ realmac ./rploader.sh satamap ./rploader.sh listmods broadwellnk-7.1.0-42661 ./rploader.sh build broadwellnk-7.1.0-42661 withfriend ./rploader.sh clean ./rploader.sh backup ./rploader.sh backuploader exitcheck.sh reboot Once rebooted DSM went into recoverable state. I logged in DSM recoverable page (with port 5000), asked me to recover, I accepted, it did its thing and rebooted. Bingo. I'm back up and running under DSM 7.1 u4 with my new usb key. Looks like bringing up your friend works like a charm. I can see it detected the ramdsik upgrade: @pocopico You're the man! Thanks for the kind help. edit: added the ./rploader.sh clean command. This is strongly recommended as one might end up not being able to run the subsequent backup commands. 1 Quote
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.