FOXBI Posted March 15, 2022 #1 Posted March 15, 2022 (edited) Hello~! This is a topic I have been writing for a long time since I wrote the ch_cpuinfo topic. I am xpenology user. And I am an IT engineer who creates shell scripts as hobbies. Please understand that it is written by a google translate site. because i’m korean who is not fluent in English. I created a tool to help make building Tinycore + Redpill boot images easier. Requirement ============================================================= VM SATA Controller Config # Case1. New Create VM Create SATA controller 2ea SATA Controller 0:0 -> DATA Disk Iamge SATA Controller 1:0 -> Tinycore Disk Image # Case2. Already Use VM Add to SATA Controller 1ea AS-IS TO-BE SATA Controller 0 (0:0) -> Tinycore Disk Image SATA Controller 0 (0:1) -> DATA Disk Iamge SATA Controller 0 (0:0) -> DATA Disk Iamge SATA Controller 1 (1:0) -> Tinycore Disk Image Change to Bios Boot Squence # Case3. Use VMWare Paravirtual Create SATA Controller 1ea, SCIS Controller 1ea SATA Controller 0:0 -> Tinycore Disk Image SCSI Controller 0:0 -> DATA Disk Iamge After setting to all case an error occurs when entering Tinycore. enter 'e' Edit GRUB menu change to enter 'F10' Continue Tinycore booting. If you set up VM like this and proceed, Data Disk will be defined as drive 1 in the DSM storage later. (In case of SCSI, define from drive 2) Howto Run ============================================================= 1. Download attached file on your PC (tr_st.tar) or See the source page on github -> http://github.com/FOXBI/tr_st 2. Start up your Tinycore and upload it. (using sftp....) Alternatively, you can paste the source directly from the shell. 3. Connect to ssh by tc account. 4. Switch user to root: Progress as tc user. 5. Edit user_config.json Serial, MAC, Sataportmap, diskidxmap etc... recommand value.. Only use SATA Use SATA + SCSI "SataPortMap": "9", "DiskIdxMap": "0" "SasIdxMap": "0", "SataPortMap": "1", "DiskIdxMap": "0" 6. Check Directory location # pwd /home/tc 7. Decompress file & check file: # tar xvf tr_st.tar # ls -lrt # chmod 755 tr_st.sh (check root’s run auth) 8. Run to Source file # ./tr_st.sh When you execute it, proceed according to the description that is output. After reboot you install DSM keep going Excute Progress ============================================================= Follow the instructions to install (DS3622xs+ example) made a video of the setup process. How to Run tr_st v2.9.0-r02 7.1-42661 NEW Install 7.1-42661 Upgrade & Migration 1. To update the script after first execution, press y to proceed. 2. Choose how to proceed.(add 7.1.0-42621 install progress) select n -> normal progress select y -> 7.1.0-42621 progress 3. repository clean, and choose Model name If you choose y proceed the old method, if you choose n proceed the new way. 4. choose DSM Version In the case of the existing method, the DSM version proceeds after selecting the platform. 5. choose platform for repository download The new method automatically finds the platform and proceeds. The old method selects the DSM version after selecting the Platform. normal progress if you select 7.1.0-42621 progress, guide in red letters. 6. Modify the boot order configuration file and change the GRUB order SATA to be the first 7. It is provided for installing additional drivers. When you no longer need it, just press n. extension driver to be multi-selectable (ex> 57,13,14,10) 8. redpill is built according to the model name and platform DSM version through the selected value. New script update questions must be skipped by pressing N. 9. You can see that GRUB and (hd0 -> hd1) boot order have been changed so that SATA goes first. and Backup config 10 Completed Rebooting Finally, Publish the source through github(https://github.com/FOXBI/tr_st) Please contact me by comment or bug report, i’ll respond to you as much as possible within my ability. Quote Update new version 1.4.6-r01 - support install 7.1.0-42621 (Select y for both questions when proceeding) installed DSM version Check custom.gz overwrite - tc user excute enable - GRUB change (support 7.1.0-42621) Update new version 1.6.0-r01 - 7.1-42661 Version is newly created, and the problem that the list is not printed when the new method is performed has been fixed. - Modification of menu output function for future installation of 7.1-42661 version Update new version 1.7.0-r01 - Add ext-manager.sh update process - Change the extension driver to be multi-selectable (ex> 57,13,14,10) Update new version 2.2.0-r01 - 7.1-42661 Installation support (NEW & Migration) - Adjust variables and functions - 7.1.0-42621 RC and existing version installation support maintained - Test Success DS3622xs+, DS918+ NEW Install 7.1-42661 Update new version 2.2.1-r01 - When modifying GRUB, the value fixed to /dev/sdb for the boot partition is modified so that it can be changed automatically depending on the execution environment. Update new version 2.7.9-r01 - Added Boot Image & USB creation function after build - Include the functions of tr_cb.sh - Test Success DS3622xs+, DS918+, DS920+, DVA3221, DS1621+ NEW Install 7.1-42661 Update new version 2.7.9-r02 - A typo was identified and corrected in the USB creation function Update new version 2.9.0-r01 - Changed to allow automatic pre-download of *.pat files with the changed link for version 42661, 42661-1 - Reflects the change so that rploader builds version 42661 at once (reduces build time) Update new version 2.9.0-r02 - Fixed an error related to the previous version 42218 installation ============================================= Download links: tr_st.tar ============================================= Thank you!! Have a nice day!! Edited April 29, 2022 by FOXBI new version update 6 1 Quote
pocopico Posted March 16, 2022 #2 Posted March 16, 2022 Hi, Nice, i like the idea. I dont know if you've ever seen this but there was at some point an effort to create a menu driven interactive process. Can you have a look ? Maybe you can assist with the interactive.sh development If you want to test it , edit rploader.sh and remove the comment from lines 1333-1334 if [ -f interactive.sh ] ; then . ./interactive.sh else #curl --location --progress-bar "https://github.com/pocopico/tinycore-redpill/raw/main/interactive.sh" --output interactive.sh #. ./interactive.sh exit 99 fi and then just run ./rploader.sh interactive <platform> 1 Quote
FOXBI Posted March 16, 2022 Author #3 Posted March 16, 2022 2 hours ago, pocopico said: and then just run ./rploader.sh interactive <platform> WOW !!! COOL !!! I really didn't know that such a nice UI and ready-made features existed. I made this script because it was a bit cumbersome to enter parameters every time, and I wanted to minimize the execution process, and I didn't want to modify the original source that was well made and worked. As you said, I uncommented and proceeded without the root account as per the guide. There seems to be a permission error because some parts have to be run as root. I think the permission error will be resolved if you proceed with the same method as sudo su -c "command" Quote
pocopico Posted March 16, 2022 #4 Posted March 16, 2022 48 minutes ago, FOXBI said: WOW !!! COOL !!! I really didn't know that such a nice UI and ready-made features existed. I made this script because it was a bit cumbersome to enter parameters every time, and I wanted to minimize the execution process, and I didn't want to modify the original source that was well made and worked. As you said, I uncommented and proceeded without the root account as per the guide. There seems to be a permission error because some parts have to be run as root. I think the permission error will be resolved if you proceed with the same method as sudo su -c "command" Have a look on the script and maybe add some features and PR to the repo. Quote
Edward Page Posted March 19, 2022 #5 Posted March 19, 2022 Can you edit the grub setting back to normal as hd1 to hd0 and usb first to go in boot menu entries for default because I'm using usb so I not able to bootup @FOXBI I know this script is for VMS but using your way I'm able to update system drivers correctly.. Quote
FOXBI Posted March 19, 2022 Author #6 Posted March 19, 2022 7 hours ago, Edward Page said: Can you edit the grub setting back to normal as hd1 to hd0 and usb first to go in boot menu entries for default because I'm using usb so I not able to bootup @FOXBI If it is executed only once, there is a compressed file with the model name in /home/tc/ESXi_backup. # tar xvfC /home/tc/ESXi_backup/modelname.tar / or # ./rploader.sh clean now # ./rploader.sh download <platform> You will restore the original file. And you can build it manually. Quote
Peter Suh Posted March 20, 2022 #7 Posted March 20, 2022 If possible, it would be better if multiple selection of extension drivers is possible in menu 6. 1 Quote
FOXBI Posted March 21, 2022 Author #8 Posted March 21, 2022 11 hours ago, Peter Suh said: If possible, it would be better if multiple selection of extension drivers is possible in menu 6. sorry. It only helps the progress of rploder.sh, but there is my technical limit to add advanced functions to that extent 😭 1 Quote
FOXBI Posted April 7, 2022 Author #9 Posted April 7, 2022 On 3/21/2022 at 2:52 AM, Peter Suh said: If possible, it would be better if multiple selection of extension drivers is possible in menu 6. It took some time, but the part you requested was reflected in a simpler way than I thought. I was been reflected in version v1.7.0-r01 Thanks for your ideas. Quote
NotHere Posted April 8, 2022 #10 Posted April 8, 2022 HI all. I am super new at this I am sorry for the question if it has been answered or if its just easy.... How can I get this script to load on Proxmox? Quote
FOXBI Posted April 9, 2022 Author #11 Posted April 9, 2022 2 hours ago, NotHere said: How can I get this script to load on Proxmox? This script is a tool that runs on tinycore. I don't know how Proxmox works, but it seems to be available if you run tinycore. Quote
NotHere Posted April 9, 2022 #12 Posted April 9, 2022 (edited) 11 hours ago, FOXBI said: This script is a tool that runs on tinycore. I don't know how Proxmox works, but it seems to be available if you run tinycore. Thanks for this piece of information. I am not sure yet how to get it working but at least I know how to get Tiny Core running so I will work from there to get this script working :). EDIT: I got the script to load. I followed all steps, I think, and everything looked good. However, when it was done, I did the reboot and I am not able to access the DSM install page via IP. I think it was maybe that I dont have the SATA drives correct? I dont know really :(. I also just added the same drivers that you have in your video, dont know if that will cause issues as well. Edited April 9, 2022 by NotHere Quote
FOXBI Posted April 12, 2022 Author #13 Posted April 12, 2022 On 4/9/2022 at 7:47 PM, NotHere said: I think it was maybe that I dont have the SATA drives correct? I dont know really I do not know how to set proxmox, but in ESXi, it is ideal to allocate Tinycore image to SATA 1:0 and Data Disk to SATA 0:1. If a similar setting is possible, please try it. Also, try setting SataportMap to 9 and DiskIdxMap to 0. Quote
pvlier Posted April 14, 2022 #14 Posted April 14, 2022 HI, I'm trying to get a HPE Microserver Gen8 With a G1610T cpu running with DSM 7.1. I've set the internal raidcontroller to AHCI. There are 2 disks present and show at boot. I performed the named steps: - create usb from tinycore 0.46 - boot server to tinycore OS - open shell - run "sudo ./rploader.sh serialgen DS3622xs+ now" (save in configfile) - run "sudo ./rploader.sh identifyusb now" (save in configfile) - run "ifconfig" -> write macadresses to config file (as mac1 and mac2) - change "SataPortMap" to "9", "DiskIdxMap" to "0" in config file - download script : "wget https://github.com/FOXBI/tr_st/raw/main/tr_st.sh" - chmod 755 tr_st.sh - run script: ./tr_st.sh I confirm all steps according to the but it seems there are several downloads repeated and I get questions that aren't in the video or text description. I can see the disks as SDA and SDB when running "fdisk -l". At the end I reboot the server and boot the USB option from the grub menu. I can then load the webpage and view the setupscreen. I choose to install the .pat file but when it completes and reboot I get to the setupscreen again. Installing again files, I have to clear partitions on the disks to continue. (additionally, I get an error now at the setup screen that disks 7,8 and 9 have errors... I only have two disks....) Quote
FOXBI Posted April 14, 2022 Author #15 Posted April 14, 2022 17 minutes ago, pvlier said: I confirm all steps according to the but it seems there are several downloads repeated and I get questions that aren't in the video or text description. I can see the disks as SDA and SDB when running "fdisk -l". At the end I reboot the server and boot the USB option from the grub menu. I can then load the webpage and view the setupscreen. I choose to install the .pat file but when it completes and reboot I get to the setupscreen again. Installing again files, I have to clear partitions on the disks to continue. The script is based on ESXi. Native environment may be different as I haven't tested it yet. After completion of tr_st.sh execution mount /dev/sdb1 and Open /mnt/sdb1/boot/grub/grub.cfg with vi Please try rebooting after changing the three items changed to hd1 to hd0. Quote
pvlier Posted April 15, 2022 #16 Posted April 15, 2022 9 hours ago, FOXBI said: The script is based on ESXi. Native environment may be different as I haven't tested it yet. After completion of tr_st.sh execution mount /dev/sdb1 and Open /mnt/sdb1/boot/grub/grub.cfg with vi Please try rebooting after changing the three items changed to hd1 to hd0. I cannot mount SDB1 as is does not seem to write anything to disk this time? Maybe something got corrupted? It seems al saving is done to /mnt/sdc3 which is the USB drive. I get a message 'clearing local redpill files' and then 'mount: /dev/sdb1: can't find in /etc/fstab'. Then 'sed: can't read /mnt/sdb1/boot/grub/grub/cfg: no such file or directory'. When I did fdisk -l before I saw partitions at sda and sdb, now I only see de drives itself. sda and sdb are the sata drives, sdc is the usb and that show some partitions. Maybe there is something wrong with the satamapping or such? (noob, don't know what it does. I used values 0 and 9 from your examples). Sorry for the dumb questions and thank you for the help! Quote
pvlier Posted April 15, 2022 #17 Posted April 15, 2022 44 minutes ago, pvlier said: I cannot mount SDB1 as is does not seem to write anything to disk this time? Maybe something got corrupted? It seems al saving is done to /mnt/sdc3 which is the USB drive. I get a message 'clearing local redpill files' and then 'mount: /dev/sdb1: can't find in /etc/fstab'. Then 'sed: can't read /mnt/sdb1/boot/grub/grub/cfg: no such file or directory'. When I did fdisk -l before I saw partitions at sda and sdb, now I only see de drives itself. sda and sdb are the sata drives, sdc is the usb and that show some partitions. Maybe there is something wrong with the satamapping or such? (noob, don't know what it does. I used values 0 and 9 from your examples). Sorry for the dumb questions and thank you for the help! I ran everything again, rebooted, installed the pat-file and rebooted again. Now sda and sdb contain 2 devices each from type 'Linux raid autodetect' so it did write to the disks this time. However, When booting it shows the install-screen again and when I click 'information about this device' it shows status 'uninstalled'. I keep getting into this loop. I also had this problem with Jun bootloader before. Any idea what's wrong? Quote
FOXBI Posted April 15, 2022 Author #18 Posted April 15, 2022 6 hours ago, pvlier said: 'mount: /dev/sdb1: can't find in /etc/fstab'. Then 'sed: can't read /mnt/sdb1/boot/grub/grub/cfg: no such file or directory'. As mentioned earlier, variables may occur because it is optimized for ESXi and uses various drives in the case of dedicated. For the mount: /dev/sdb1 error, if you are using USB as sdc, you will need to change mount /dev/sdb1 at the end of the source to mount: /dev/sdc1 . Quote
FOXBI Posted April 15, 2022 Author #19 Posted April 15, 2022 5 hours ago, pvlier said: 'information about this device' it shows status 'uninstalled Most of the problems that occur during DSM installation are affected by the SataportMap and DiskIdxMap values. In particular, I know that the dedicated environment has a greater impact on low values due to the controller, etc. For reference, ESXi is simple. SATAportMap=9 DiskIdxMap=0 Quote
gericb Posted April 15, 2022 #20 Posted April 15, 2022 3 hours ago, FOXBI said: Most of the problems that occur during DSM installation are affected by the SataportMap and DiskIdxMap values. In particular, I know that the dedicated environment has a greater impact on low values due to the controller, etc. For reference, ESXi is simple. SATAportMap=9 DiskIdxMap=0 Just checking here..your new scripted tool is for new both baremetal installs/upgrades, as well as VM/ESXi and not just for the VM environments, correct? Thanks Quote
FOXBI Posted April 16, 2022 Author #21 Posted April 16, 2022 7 hours ago, gericb said: Just checking here..your new scripted tool is for new both baremetal installs/upgrades, as well as VM/ESXi and not just for the VM environments, correct? Thanks It is not made only for the VM environment, but it is true that the script was created for use with ESXi. Dedicated environments are more complex, so there may be a lot of things that can't be done. Thanks Quote
FOXBI Posted April 16, 2022 Author #22 Posted April 16, 2022 17 hours ago, pvlier said: I cannot mount SDB1 I'm sorry for any inconvenience. I didn't think I did it wrong. I re-edited the script to be able to react even if the boot disk changes. ## update Update v2.2.1-r01 - 2022.04.16 - When modifying GRUB, the value fixed to /dev/sdb for the boot partition is modified so that it can be changed automatically depending on the execution environment. Quote
Peter Suh Posted April 18, 2022 #23 Posted April 18, 2022 On 4/7/2022 at 12:34 PM, FOXBI said: It took some time, but the part you requested was reflected in a simpler way than I thought. I was been reflected in version v1.7.0-r01 Thanks for your ideas. Please check my PM in serverforum. I think the multiple choice function of ext that I requested here last time will be very useful. 1 Quote
FOXBI Posted April 18, 2022 Author #24 Posted April 18, 2022 2 hours ago, Peter Suh said: Please check my PM in serverforum. I think the multiple choice function of ext that I requested here last time will be very useful. I replied. You can use it comfortably. That function was created after thinking through your request. Quote
namvan Posted May 16, 2023 #25 Posted May 16, 2023 On 3/17/2022 at 12:47 AM, pocopico said: Nice, i like the idea. I dont know if you've ever seen this but there was at some point an effort to create a menu driven interactive process. Can you have a look ? Maybe you can assist with the interactive.sh development @pocopico Is this interactive.sh still available somewhere? I can't find them in your repo. I supposed I could take a look. No promise though. 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.