Jump to content
XPEnology Community

TinyCore RedPill loader (TCRP) - Development release 0.9


Recommended Posts

Hi @pocopico, I'm just having a look at the developer train of TCRP now and starting to familiarise myself with TCRP Friend. I have a couple of questions relating to what is likely a very rare/niche use case:

- does TCRP Friend need internet/network access to operate?

- if so, is/would it be possible to use a config file to provide statically configured NIC settings rather than relying on DHCP?

 

The reason I ask is that a couple of my production servers live on a datacenter network that has no DHCP, by design. All devices connected to this network must be statically configured. TCRP works as I can manually configure it each time I boot into the graphical environment using System Tools->Control Panel->Network, although it would admittedly be really useful to have a permanent network config file for TCRP use, too.

Edited by WiteWulf
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, WiteWulf said:

Hi @pocopico, I'm just having a look at the developer train of TCRP now and starting to familiarise myself with TCRP Friend. I have a couple of questions relating to what is likely a very rare/niche use case:

- does TCRP Friend need internet/network access to operate?

- if so, is/would it be possible to use a config file to provide statically configured NIC settings rather than relying on DHCP?

 

The reason I ask is that a couple of my production servers live on a datacenter network that has no DHCP, by design. All devices connected to this network must be statically configured. TCRP works as I can manually configure it each time I boot into the graphical environment using System Tools->Control Panel->Network, although it would admittedly be really useful to have a permanent network config file for TCRP use, too.

 

Yes ! Thats actually a very valid enhancement request  ! Its entering the todo list ;)  

 

EDIT : Although the TCRP Friend does not rely internet for normal operation, it is checking for TCRP Friend upgrades while starting.

 

What settings you think are essential for your operation ? 

 

Edited by pocopico
  • Like 1
Link to comment
Share on other sites

45 minutes ago, pocopico said:

 

Yes ! Thats actually a very valid enhancement request  ! Its entering the todo list ;)  

 

EDIT : Although the TCRP Friend does rely internet for normal operation, it is checking for TCRP Friend upgrades while starting.

 

What settings you think are essential for your operation ? 

 

 

Don't you need an IP address, gateway, subnet mask, and DNS server that are usually used for static IP settings on the NIC?

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, WiteWulf said:

Peter's got most of it. The only other one I can think of (for network environments that are even more locked down than mine) is a http proxy, but that would also need to be supported by the scripts and tools, so may be outside the scope of this.

 

The proxy requirement was the intention of my question. So i think with these you should be OK right ? 

 

"ipsettings" : {
    "ipset": "static",
    "ipaddr":"xx.xx.xx.x/yy",            
    "ipgw" : "xx.xx.xx.xx",
    "ipdns": "xx.xx.xx.xx",
    "ipproxy" : "xx.xx.xx.xx:xxxx"
},
 

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, WiteWulf said:

Peter's got most of it. The only other one I can think of (for network environments that are even more locked down than mine) is a http proxy, but that would also need to be supported by the scripts and tools, so may be outside the scope of this.

 

@WiteWulf so you would normally boot TCRP and set the network using the network GUI tool and then once network is set you would start the build right ?

 

Latest rploader.sh should set the static configuation to your user_config.json now to be available for TCRP Friend. Once TCRP Friend starts the DSM boot process it will read the ipsettings block of the user_config.json that is stored in /mnt/tcrp and will use that to setup the network. 

 

If proxy is not set on shell environment then it will not be set and you would have to stop the boot process and edit the user_config.json manually. 

 

The table that the user_config.json will altered with is :

 

"ipsettings" : {
    "ipset": "static",
    "ipaddr":"xx.xx.xx.x/yy",            
    "ipgw" : "xx.xx.xx.xx",
    "ipdns": "xx.xx.xx.xx",
    "ipproxy" : "xx.xx.xx.xx:xxxx"
},

 

 

Can you please test ? 

 

 

Link to comment
Share on other sites

FYI , the following has been implemented and tested. 

 

If for some reason you want to stop at TCRP Friend while you are running DSM e.g. to edit your user_config.json you can run the following and after the DSM reboot the TCRP Friend will be instructed to stop and wait until the next user issued reboot. 

 

While on DSM 

 

sudo -s 

cd /dev && mount synoboot3 /mnt

touch /mnt/stopatfriend

umount /mnt

 

On next reboot if TCRP Friend finds the stopatfriend file it will stop there and will remove the stopatfriend file for next reboot. 

 

You can then SSH to TCRP Friend as user root and perform any changes. 

 

 

 

Edited by pocopico
  • Like 1
Link to comment
Share on other sites

3 hours ago, pocopico said:

 

The proxy requirement was the intention of my question. So i think with these you should be OK right ? 

 

"ipsettings" : {
    "ipset": "static",
    "ipaddr":"xx.xx.xx.x/yy",            
    "ipgw" : "xx.xx.xx.xx",
    "ipdns": "xx.xx.xx.xx",
    "ipproxy" : "xx.xx.xx.xx:xxxx"
},
 

 

Yes, that looks good. I take it you're inferring broadcast address from the netmask specified in ipaddr? They don't always align, but that's an even more niche case :D

 

I'll give this a try tomorrow when I'm back on-site where this is required 👍

  • Like 1
Link to comment
Share on other sites

6 hours ago, WiteWulf said:

Yes, that looks good. I take it you're inferring broadcast address from the netmask specified in ipaddr? They don't always align, but that's an even more niche case :D

 

I'll give this a try tomorrow when I'm back on-site where this is required 👍

 

It is shared for users who are not familiar with converting SUBNET MASK to /yy PREFIX (LENGTH) .

 

In most homes, 255.255.255.0 -> /24 will usually be used.

 

SUBNET MASK

SUBNET MASK LENTGH

255.255.255.254

/31

255.255.255.252

/30

255.255.255.248

/29

255.255.255.240

/28

255.255.255.224

/27

255.255.255.192

/26

255.255.255.128

/25

255.255.255.0

/24

 

  • Like 1
Link to comment
Share on other sites

11 hours ago, pocopico said:

 

@WiteWulf so you would normally boot TCRP and set the network using the network GUI tool and then once network is set you would start the build right ?

 

Latest rploader.sh should set the static configuation to your user_config.json now to be available for TCRP Friend. Once TCRP Friend starts the DSM boot process it will read the ipsettings block of the user_config.json that is stored in /mnt/tcrp and will use that to setup the network. 

 

If proxy is not set on shell environment then it will not be set and you would have to stop the boot process and edit the user_config.json manually. 

 

The table that the user_config.json will altered with is :

 

"ipsettings" : {
    "ipset": "static",
    "ipaddr":"xx.xx.xx.x/yy",            
    "ipgw" : "xx.xx.xx.xx",
    "ipdns": "xx.xx.xx.xx",
    "ipproxy" : "xx.xx.xx.xx:xxxx"
},

 

 

Can you please test ? 

 

 

 

@pocopico


One thing, it seems that there will be no confusion if there is a prior sharing or preparation before the distribution of this function.


If I do not want to use a static IP and want to use DHCP as it is,


If these ipsettings are not included in user_config.json, will it have no effect?


Or If I want to switch back to DHCP after using user_config.json which already contains ipsettings,


For example, is it possible to set it up like below?

 

"ipsettings" : {
     "ipset": "dynamic"
}

 

P.S : I checked the deployment status 11 hours ago.
If it's not static, any character seems to work with dhcp.

Edited by Peter Suh
Link to comment
Share on other sites

Hi !

I tested TCRP Friend to switch from DSM 7.1-42661 Update 4 to DSM 7.1.1-42962 and it works very well, it's impressive, great job!

However, I have a problem with the mac address.

In the config.json I specified a mac address. When TCRP Friend boots it displays "Setting MAC from (the real mac) to (the mac I entered)". The IP Address line is correct according to my DHCP.

But once the NAS is started, it no longer uses these informations.

DSM starts using the real mac address and therefore my DHCP no longer gives it the correct address.

In DSM control panel, the real mac address is shown.

(sorry for my google translate english...)

Link to comment
Share on other sites

41 minutes ago, Biocef said:

Hi !

I tested TCRP Friend to switch from DSM 7.1-42661 Update 4 to DSM 7.1.1-42962 and it works very well, it's impressive, great job!

However, I have a problem with the mac address.

In the config.json I specified a mac address. When TCRP Friend boots it displays "Setting MAC from (the real mac) to (the mac I entered)". The IP Address line is correct according to my DHCP.

But once the NAS is started, it no longer uses these informations.

DSM starts using the real mac address and therefore my DHCP no longer gives it the correct address.

In DSM control panel, the real mac address is shown.

(sorry for my google translate english...)

 

How many LAN interfaces do you have ? 

Link to comment
Share on other sites

3 hours ago, Peter Suh said:

 

@pocopico


One thing, it seems that there will be no confusion if there is a prior sharing or preparation before the distribution of this function.


If I do not want to use a static IP and want to use DHCP as it is,


If these ipsettings are not included in user_config.json, will it have no effect?


Or If I want to switch back to DHCP after using user_config.json which already contains ipsettings,


For example, is it possible to set it up like below?

 

"ipsettings" : {
     "ipset": "dynamic"
}

 

P.S : I checked the deployment status 11 hours ago.
If it's not static, any character seems to work with dhcp.

 

TCRP Friend will only use the static information if the ipset is set to static otherwise and even if its missing it will use DHCP. 

Link to comment
Share on other sites

@pocopico re. static IP config, I'm not sure what I'm doing wrong here.

 

I've booted into a fresh VM with a newly downloaded (five minutes ago) tinycore-redpill.v0.9.2.7.vmdk.gz. I can see the new ipsettings stanza in user_config.json, and I've edited it to have my settings, but when I reboot the settings are lost and the VM still has no networking.

 

Do I still need to manually configure TCRP's network settings, and these only affect TCRPFriend and "normal" booting of the xpenology system?

Link to comment
Share on other sites

2 minutes ago, WiteWulf said:

@pocopico re. static IP config, I'm not sure what I'm doing wrong here.

 

I've booted into a fresh VM with a newly downloaded (five minutes ago) tinycore-redpill.v0.9.2.7.vmdk.gz. I can see the new ipsettings stanza in user_config.json, and I've edited it to have my settings, but when I reboot the settings are lost and the VM still has no networking.

 

Do I still need to manually configure TCRP's network settings, and these only affect TCRPFriend and "normal" booting of the xpenology system?

 

Yes these network settings will only be used for TCRP friend. if you backup after modifying the network settings on TCRP the network settings are backed up also and will be used again on next TCRP reboot.

Edited by pocopico
Link to comment
Share on other sites

Okay, I understand. I was expecting TCRP to use them to, but if TCRPFriend works properly I guess I shouldn't need to boot into TCRP again (and it's not a big deal to manually configure it when necessary). TCRPFriend was the really important part, to facilitate automatic upgrades, so that's looking good. I'm just about to upgrade this test machine, I'll let you know how it goes.

  • Thanks 1
Link to comment
Share on other sites

Okay, I installed a test DS920+ on my big ESXi host. Setting up a Synology server in an environment with no DHCP is still a PITA, with lots of having to go to the Synology Assistant on a device on the same LAN to force an IP configuration to it (I had to do this two or three times during setup, iirc). But I got 7.1.0-42661-4 installed with a bare configuration, then installed 7.1.1-42692 and rebooted.

 

TCRPFriend seems to have worked, as the server is up and running with the target DSM version, but the console output at boot time is confusing as it says "ERROR Could not get IP" and lists no IP address(es) for the NIC (see screenshot).

 

This behaviour persists through subsequent reboots but, strangely, when booting into TCRP (rather than TCRPFriend) it has the correct configuration. I thought you said TCRP needed to be manually configured each time?

 

I booted into TCRP to check and see if user_config.json still had my network settings in it, and they're gone, it's blank again. Did the upgrade to 7.1.1-42692 wipe them out?

 

Screenshot 2022-10-04 at 11.08.55.png

Edited by WiteWulf
  • Like 1
Link to comment
Share on other sites

8 minutes ago, WiteWulf said:

Okay, I installed a test DS920+ on my big ESXi host. Setting up a Synology server in an environment with no DHCP is still a PITA, with lots of having to go to the Synology Assistant on a device on the same LAN to force an IP configuration to it (I had to do this two or three times during setup, iirc). But I got 7.1.0-42661-4 installed with a bare configuration, then installed 7.1.1-42692 and rebooted.

 

TCRPFriend seems to have worked, as the server is up and running with the target DSM version, but the console output at boot time is confusing as it says "ERROR Could not get IP" and lists no IP address(es) for the NIC (see screenshot).

 

This behaviour persists through subsequent reboots but, strangely, when booting into TCRP (rather than TCRPFriend) it has the correct configuration. I thought you said TCRP needed to be manually configured each time?

 

I booted into TCRP to check and see if user_config.json still had my network settings in it, and they're gone, it's blank again. Did the upgrade to 7.1.1-42692 wipe them out?

 

Screenshot 2022-10-04 at 11.08.55.png

 

Need to check ..  @WiteWulf do you remember the actions you performed ? I'm only modifying the user_config.json on /mnt/sdx3 and not the one in /home/tc directory 

 

Edited by pocopico
Link to comment
Share on other sites

21 minutes ago, WiteWulf said:

FYI, after the initial install of 7.1.0-42661 TCRPFriend definitely displayed the configured IP address at boot time. It was only lost after installation of the 7.1.1-42692 update

 

Ok found the reason for the no IP message, pushing the changes. I'm also testing for the missing values after the upgrade issue 

Link to comment
Share on other sites

Cool...

 

I also noticed this on first boot (when I was looking more closely):

<screengrab removed as it has my IP address in it>

 

The check for a new version of Friend seems to fail, even though it thinks it's configured...

 

Network settings are set to static [....]

Checking for latest friend [...] No IP yet to check for latest friend

 

Then it shows the IP address later on in the output

Edited by WiteWulf
Link to comment
Share on other sites

40 minutes ago, pocopico said:

 

Need to check ..  @WiteWulf do you remember the actions you performed ? I'm only modifying the user_config.json on /mnt/sdx3 and not the one in /home/tc directory 

 

I ran through the procedure a second time and the settings appear to have persisted this time (although still saying No IP when Friend is loaded and failing to check for update).

 

One other strange thing I noted: when doing the first install I used the PAT file listed on archive.synology.com as "7.1-42661 (with Update 1)", but after the install is complete Control Panel states that "DSM 7.1.0-42661 Update 4" is installed. I wasn't sure if I'd installed U4 and not made a note of it the first time around, so I built the server again and it did the same.

 

 


Has Synology bundled U4 into this without telling anyone, or is something going wrong in TCRP?

image.png

 

I'm happy to do another install of 7.1.0 and update to 7.1.1 with a complete list of actions and screen grabs if you want, let me know.

Edited by WiteWulf
Link to comment
Share on other sites

  • Polanskiman changed the title to TinyCore RedPill loader (TCRP) - Development release 0.9

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