Jump to content
XPEnology Community

Tinycore Redpill Support Tool (tr_st v2.9.0-r02)


FOXBI

Recommended Posts

 

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

image.png.63a242578644fd659fcd36ff75590bb3.png

 

# 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

image.png.7a589f8e0b1927290eb6be2da400595b.png

 

# 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

image.png.0891e064c14f75b254bb2bae759c5205.png

 

 

After setting to all case an error occurs when entering Tinycore.

image.png.43bfa601a74c991ef887d4fa9e2e1cc0.png

enter 'e' Edit GRUB menu 

 

change image.png.13d1fd582b095ab4897939a3843a7180.png  to image.png.dd21cba13fca3c02c98db3f25750a63b.png

 

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)

 

image.png.cfc58bc06b97c3196459cc76547a8c27.png

 

 

 

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.

image.png.feaa1cc85de13c2b64e3f2c95927b483.png

 

2. Choose how to proceed.(add 7.1.0-42621 install progress)

image.thumb.png.772212de981bcc0b0932057d64c6850d.png

 

image.png.7f085b01aed82109f17e1e256ba9c6a3.png

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,

image.png.559c9285c01f451c61cad79a92f0698e.png

if you choose n proceed the new way.

image.thumb.png.eedfd5fd11ea8e8b194cc23292dd805b.png

 

4. choose DSM Version

image.png.cb8f60d451f49019328497218d18d6c7.png

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.

image.png.8d369bfbec18e7465ea66165af4b95ea.png

 

The old method selects the DSM version after selecting the Platform.

image.thumb.png.496255d51efb3a00bc3404a9a0853d47.png

 

normal progress

image.png.50988c81e98183b2d7cc82d63c566d91.png

 

if you select 7.1.0-42621 progress, guide in red letters.

image.png.3d83395cc761aa83fcf4e698565e0ef5.png

 

6. Modify the boot order configuration file and change the GRUB order SATA to be the first

image.png.33b6b949acc88514485fbbb97a64b439.png

 

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)

image.png.9ca99ac7c9f0b35a4be832451d0a0d9d.png

 

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.

image.thumb.png.f3a4ee017a8e078d495d913fbdb4b631.png

 

9. You can see that GRUB and (hd0 -> hd1) boot order have been changed so that SATA goes first.

    and Backup config

image.thumb.png.cccb40eaa359823a2f10ced7379fe2e5.png

 

10 Completed Rebooting 

image.png.2f6e6023264c4579c0a980e6ab58cd98.png

 

 

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)

image.png.f642b74e45ade9a0093848364894d186.png

 

installed DSM version Check

image.thumb.png.c4a1855d55674d95e21621a3e8bcbc2a.png

 

custom.gz overwrite

image.png.3e7c9bf67cbb94e5a60e7d7a38a5c570.png

 

- tc user excute enable

 

- GRUB change (support 7.1.0-42621)

image.png.34e9a3f88d5f83c62e190a3a6fbd9814.png

 

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 by FOXBI
new version update
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

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>

  • Like 1
Link to comment
Share on other sites

2 hours ago, pocopico said:

and then just run 

 

./rploader.sh interactive <platform>

 

WOW !!! COOL !!!

 

image.png.953a9d4b8441ab82b0f7aa6849d8c56b.png

 

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"

 

 

Link to comment
Share on other sites

48 minutes ago, FOXBI said:

 

WOW !!! COOL !!!

 

image.png.953a9d4b8441ab82b0f7aa6849d8c56b.png

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 😭

  • Sad 1
Link to comment
Share on other sites

  • FOXBI changed the title to Tinycore Redpill Support Tool (tr_st v1.7.0-r01)
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. :)

Link to comment
Share on other sites

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. 

 

image.thumb.png.8e7178c75d67dd427de6d1f50766b3c2.png

Edited by NotHere
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • FOXBI changed the title to Tinycore Redpill Support Tool (tr_st v2.2.0-r01)

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....)

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

  • FOXBI changed the title to Tinycore Redpill Support Tool (tr_st v2.2.1-r01)
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.

  • Thanks 1
Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

  • FOXBI changed the title to Tinycore Redpill Support Tool (tr_st v2.9.0-r02)
  • 1 year later...
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...