Jump to content
XPEnology Community

TinyCore RedPill Loader (TCRP)


pocopico

Recommended Posts

13 minutes ago, RedCat said:

Yes I know vmware network card is working. I think this card emulation is not the best way under proxmox. Emulating an emulated card in another system is not the best solution...

And in my host has 2.5 GB ethernet card + 10 GB switch. I want to use more than 1 GB lan speed with nas. This way I need e1000 or virtio driver too.

 

920+ I tired virtual and real hdd also, but dont detect.

 

Maybe the devices that can be auto-detected are passed-through devices?

 

Anyway, I will distribute "myv.sh" as FOXBI allows.

 

Whether tc automatically finds ext or the user manually adds ext, I will match the user's free will.

Link to comment
Share on other sites

38 minutes ago, Peter Suh said:

 

Maybe the devices that can be auto-detected are passed-through devices?

 

Anyway, I will distribute "myv.sh" as FOXBI allows.

 

Whether tc automatically finds ext or the user manually adds ext, I will match the user's free will.

I tired and install 2 new VM system on proxmox. All hardware are same (4 cpu, 4 GB ram, sata0=redpill, sata1= 100GB virtual disk and Virtio lan card)

VM1: 918+ 7.0.1 The Redpill auto detect Virtio lan card, build loader, 7.0.1 starting, no need any extension

VM2: 918+ 7.1.0 The Redpill dont "see" the Virtio lan card, build loader, boot, but the loader dont has IP address, I cant access the DSM

 

Why, and what happend?

Link to comment
Share on other sites

On 4/17/2022 at 1:51 PM, Peter Suh said:

Here I introduce TSU build process of another method excluding DSM 7.0.1 loader build process.

 

If you forcefully create an auxfiles folder for pat file processing and ignore the process of creating a custom-module link, an error occurs during 7.1 build.

@pocopico decided to check this part further and improve it.

Other platforms can be used in the same way.

 

In particular, in the case of ds920+ and ds1621+, the dtc(device-tree-compiler) method is used instead of sataportmap, and tc automatically finds and maps the related setting values.

In ds920+ and ds1621+, ignore sataportmap and don't care.

 

[DS920+]

 

./rploader.sh update now

./rploader.sh fullupgrade now

 

./rploader.sh serialgen DS920+

./rploader.sh identifyusb now

 

(run if custom-module -> /mnt/sdb3/auxfiles is missing, Users who use TC for the first time do not originally have this directory and link.)

mkdir /mnt/"$(mount | grep -i optional | grep cde | awk -F / '{print $3}' | uniq | cut -c 1-3)3"/auxfiles; sudo ln -s /mnt/"$(mount | grep -i optional | grep cde | awk -F / '{print $3}' | uniq | cut -c 1-3)3"/auxfiles /home/tc/custom-module;

 

./rploader.sh build geminilake-7.1.0-42661

 

rm -rf /home/tc/oldpat.tar.gz;./rploader.sh clean now;  rm -rf /mnt/"$(mount | grep -i optional | grep cde | awk -F / '{print $3}' | uniq | cut -c 1-3)3"/auxfiles;  rm -rf /home/tc/custom-module;  ./rploader.sh backup now;

 

( I referenced the Pocopico script to dynamically find the third partition of the USB stick. )

Thanks for this, tried in ESX 7.0 U3 with VMNET3 and VMDK disks and works perfectly, everything is detected and works 100%.

 

I have a small question in relation to the DS920+ and the dtc which you referenced.  When creating a VM with this model, the drive number starts at 1, where-as with other models such as the DS3622xs+ the drive number starts at 2, with the loader being drive number 1.  Are there plans to bring the dtc functionality to other models in the future ? (specifically the DS3622xs+ as this is my primary model).  I really like the loader drive being hidden in DSM and drives starting from number 1.  Thanks for the work you and @pocopico have done here, it's made the process simple on both virtualized and baremetal installs.

Edited by irishj
Link to comment
Share on other sites

1 hour ago, RedCat said:

Yes I know vmware network card is working. I think this card emulation is not the best way under proxmox. Emulating an emulated card in another system is not the best solution...

And in my host has 2.5 GB ethernet card + 10 GB switch. I want to use more than 1 GB lan speed with nas. This way I need e1000 or virtio driver too.

 

920+ I tired virtual and real hdd also, but dont detect.

I understand. The only way now then is to run e1000/virtio extensions before build, after all this is just one line extra.

I added to my script a vi user_config.json line also, to stop the process and check/add/or modify "mac" addresses. 

 

To be frank I do not understand why serialgen creates random mac value. I think for both, BareMetal and VM mac setup should correspond to network adapter mac, isn't it?

Link to comment
Share on other sites

4 minutes ago, TomY said:

I understand. The only way now then is to run e1000/virtio extensions before build, after all this is just one line extra.

I added to my script a vi user_config.json line also, to stop the process and check/add/or modify "mac" addresses. 

 

To be frank I do not understand why serialgen creates random mac value. I think for both, BareMetal and VM mac setup should correspond to network adapter mac, isn't it?

Yes, I dont understand too. After serialgen command, I edit the config file, and delete generated mac address, and I write into manualy the mac address of my VM lan card.

Link to comment
Share on other sites

6 hours ago, hendry said:

can i request to add this recipe ext for build 42661 ?

@Peter Suh

@pocopico

 


{
  "mod_version": "v1",

  "files": [
    {
      "name": "v9fs-3.10.108.tgz",
      "url": "https://raw.githubusercontent.com/pocopico/rp-ext/master/v9fs/releases/v9fs-3.10.108.tgz",
      "sha256": "71b7053bc1f2a71c9d9c5a8b929cb8c3ccb607a78c4ea2771cbeb3e9823ba31f",
      "packed": true
    },
    {
      "name": "9pnet_virtio.ko",
      "url": "https://github.com/pocopico/3.10.108-modules/raw/main/9pnet_virtio.ko",
      "sha256": "02ce3f9d6ba416a0fca995fad1c3ded400a2611de4182b333ad48b76f9ccfaf9",
      "packed": false
    },
    {
      "name": "virtio-3.10.108.tgz",
      "url": "https://github.com/RedPill-TTG/redpill-virtio/releases/download/v1.0.0/virtio-3.10.108.tgz",
      "sha256": "f1bdb3aeede66a6f0e2b383911c1306e56159574f3aa2f78645691bb6bde7ac0",
      "packed": true
    },
    {
      "name": "check-virtio.sh",
      "url": "https://raw.githubusercontent.com/RedPill-TTG/redpill-virtio/master/src/check-virtio.sh",
      "sha256": "cedced0bf29ff691ab6b4a7e2001efa40b2cc5fd31e3a9834d210a4b3408ded8",
      "packed": false
    }
  ],

  "kmods": {
    "virtio.ko": "",
    "virtio_ring.ko": "",
    "virtio_mmio.ko": "",
    "virtio_pci.ko": "",
    "virtio_blk.ko": "",
    "virtio_net.ko": "",
    "virtio_scsi.ko": "",
    "9pnet.ko": "",
    "9pnet_virtio.ko": "",
    "9p.ko": ""
  },

    "scripts": {
    "check_kmod": "check-virtio.sh"
  }
}

 

i really need this.. 

thanks..

 

 

i think, there are already these two different extensions that can cover your needs

 

https://github.com/pocopico/redpill-load/raw/master/redpill-virtio/rpext-index.json

and 

https://github.com/pocopico/rp-ext/raw/main/v9fs/rpext-index.json

Link to comment
Share on other sites

I saw that pocopico/rp-ext repo has been updated 2 days ago, so I thought it may also fix the loader build issue with e1000. This however still does not happened and loader uses e1000e extension files instead of e1000:

 

......
[#] ========================================== pocopico.e1000e ==========================================
[#] Extension name: e1000e
[#] Description: Adds Intel(R) PRO/1000 Network Driver Support
[#] To get help visit: <todo>
[#] Extension preparer/packer: https://github.com/pocopico/rp-ext/tree/main/e1000e
[#] Software author: https://github.com/pocopico
[#] Update URL: https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000e/rpext-index.json
[#] Platforms supported: ds1621p_42218 ds918p_41890 dva3221_42661 ds3617xs_42621 ds3617xs_42218 ds920p_42661 ds918p_42661 ds1621p_42661 ds918p_25556 dva3221_42218 ds3615xs_42661 ds3622xsp_42661 ds3622xsp_42218 dva3221_42621 ds3615xs_41222 ds918p_42621 ds3617xs_42661 ds3615xs_25556 ds920p_42218 ds920p_42621 ds918p_42218 ds1621p_42621 ds3615xs_42621 ds3615xs_42218 ds3622xsp_42621 
[#] =======================================================================================

Found Ethernet Interface : pciid 8086d0000100e Required Extension : e1000
Searching for matching extension for e1000
Found matching extension : 
"https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000e/rpext-index.json"
------------------------------------------------------------------------------------------------
Starting loader creation 
....  

due to this, the DSM instance can't be detected..

 

therefore for Proxmox user with e1000 this line still has to be added before build (pick one related to your build):

./rploader.sh ext apollolake-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json #DS918+
./rploader.sh ext geminilake-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json #DS920+
./rploader.sh ext broadwellnk-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json #DS3622+
./rploader.sh ext denverton-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json #DVA3221
#./rploader.sh ext <generation-of-your-choice>-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json

or add it to @Peter Suh m.sh/my.sh/myv.sh scripts:

./rploader.sh ext ${TARGET_PLATFORM}-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json

before:

./rploader.sh build ${TARGET_PLATFORM}-7.1.0-42661 
#or replace ${TARGET_PLATFORM} with Generation of your choice.

 

At least up to the moment loader script is updated

Link to comment
Share on other sites

On 4/15/2022 at 8:12 PM, billat29 said:

You can add this to user_config.json:


{
  "extra_cmdline": {
    "pid": "0x4200",
    "vid": "0x13fe",
    "sn": "xxxxxxxxx",
    "mac1": "xxxxxxxx",
    "SataPortMap": "42",
    "DiskIdxMap": "0002",
    "disable_mtrr_trim": null
}

This worked on my N54L

I've asked the question about reserved RAM a fair few times, on here and on other places, and have been met with radio silence.  So I'm well pleased that someone else with the same issue was able to get a response as it means I can now move forwards.  Thanks for this, it worked on my N54L too!

Link to comment
Share on other sites

On 4/17/2022 at 8:53 PM, Peter Suh said:

The last modification I asked @pocopico was not completed yet

Deploy to use this shell script instead.

This is a shell script that performs 15 first guided "Tinycore DSM 7.1 Build" commands at once.

For the instructions on how to use the attached file, you can copy this file into TC LINUX's /home/tc and do it as below.


./my.sh DS918+

./my.sh DS3617xs

./my.sh DS3615xs

./my.sh DS3622xs+

./my.sh DVA3221

./my.sh DS920+

./my.sh DS1621+
 

 

on tc Linux

 

wget https://github.com/PeterSuh-Q3/tinycore-redpill/raw/main/m.sh.gz; tar -zxvf m.sh.gz;

wget https://github.com/PeterSuh-Q3/tinycore-redpill/raw/main/my.sh.gz; tar -zxvf my.sh.gz;

 

 

 

On 4/17/2022 at 9:42 PM, TomY said:

Good idea with scripts. 

For some (VM) users a prompt to replace mac1 to own value would be a welcomed script optimization (before build).

And perhaps mac2 line could be added, with manual entry of mac address (some users use >1 physical nic or virtual nic with own mac address).

 

For Proxmox users a script line before build line would be also recommended (I've noticed that e1000e standard script does not work, at least for me):


./rploader.sh ext ${TARGET_PLATFORM}-7.1.0-42661 add https://raw.githubusercontent.com/pocopico/rp-ext/master/e1000/rpext-index.json

 

Thanks everybody for the great work.

I am using VM to test the shell script you provided for Tinycore DSM 7.1 Build.

With your permission "Peter Suh", I did a little testing modifying  it to setup different versions of the DS and for VM there is a choice of adding extensions for "e1000" network.

Attached are three modified scripts.

To setup V-7.0.1-42218, use script file "my0.sh".

To setup V-7.1.0-42621, use script file "my1.sh".

To setup  V-7.1.0-42661, use script file "my2.sh".

 

Again, thank you for the great work.

my0.sh my1.sh my2.sh

Link to comment
Share on other sites

Thank you again Pocopico and everyone else that has contributed to this!
Quick note for those using proxmox with a DS3622xs+ build and want to get "better" hard drive performance from your SATA drives.
I've been playing around with drive configs and I'm getting much better performance attaching the storage drives in Proxmox as SCSI rather than SATA.

This is kind of a duh moment... but I didn't realize the 3622xs+ would recognize a SCSI storage drive and I didn't realized the performance would increase that dramatically. 
My hardware is a pretty generic gigabyte motherboard with a Ryzen 3 3200G, 2 WD Red 4TB Drives in ZFS connected to the integrated SATA controller.
I built the Proxmox vm using DS3622xs+, Processor Type = host, Storage Drives initially = SATA.

 

Running drive stress test as follows on my storage drives attached as SATA:

dd bs=1M count=2048 if=/dev/zero of=/volume1/downloads/testx conv=fdatasync
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 40.42 s, 53.1 MB/s

 

^^Terrible^^

I powered off the VM, detached the storage drives, and reattached as SCSI.

 

New stress test:
dd bs=1M count=2048 if=/dev/zero of=/volume1/downloads/testx conv=fdatasync
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 12.7126 s, 169 MB/s

 

^^Much better.^^

 

Note that doing this, your storage drives will show up as drive 13, 14, 15, etc and will not display in the storage manager overview graphic.  I'm assuming this is because the 3266xs+ uses SATA for the front slots disk 1 - 12.

Note that this is only for your storage drives and not the boot drive.

Link to comment
Share on other sites

Has anyone been successful in setting up as a VM using Virtual Machine Manager (VMM)?

 

I've had 6.2.3 running bare metal on my Microserver Gen8 for some time, and have also added a couple of 6.2.3 inside VMM so I can use Surveillance Station inside those, and link them with CMS to run 2+2+2 cameras.

 

I've successfully upgraded my Microserver Gen8 using broadwellnk-7.0.1, but the older version of SS in those 6.2.3 VMs and the new SS on the 7.0.1 install aren't compatible to link with CMS. I tried using TinyCore Redpill, importing the img file to run as SATA drive, etc., seem to get same issue as @THDJ with the "Failed to install DSM. Failed to install the file. The file is probably corrupted." at 55% 56%

 

 

I recall when I was trying to get 6.2.3 to work inside VMM, the message about initializing disks 1 and 2, that it may overwrite the synoboot image. Is what what may be happening?

 

Just learned about DVA3221 which would meet my Surveillance Station needs, unfortunately I don't have the hardware to support.

 

Any help is greatly appreciated. Thanks!

 

 

 

Link to comment
Share on other sites

5 hours ago, pocopico said:

 

i think, there are already these two different extensions that can cover your needs

 

https://github.com/pocopico/redpill-load/raw/master/redpill-virtio/rpext-index.json

and 

https://github.com/pocopico/rp-ext/raw/main/v9fs/rpext-index.json

these 2 ext does not have 9pnet_virtio.ko drivers, unless u just add it. the others .ko drivers has on these ext.

Link to comment
Share on other sites

Deploy scripts that you can leverage if you need to add a separate ext manually for VM users.

It includes the ability to add exts created by @FOXBI with multiple selections like capture.


The way to use it is existing same as my.sh.
Where y is unnecessarily asked, it automatically responds.

 

./myv.sh DS918+

 

./myv.sh DS3617xs

./myv.sh DS3615xs

./myv.sh DS3622xs+

./myv.sh DVA3221

./myv.sh DS920+

./myv.sh DS1621+
 

 

In TC Linux, you can download and decompress as below and use it in /home/tc.

 

wget https://github.com/PeterSuh-Q3/tinycore-redpill/raw/main/myv.sh.gz; tar -zxvf myv.sh.gz;

 

CAUTION) Not all exts correspond to 7.1.0-42661.
Please check @pocopico's ext GITHUB in advance and use it.
We do not respond to errors caused by unsupported revisions.

 

511448452_2022-04-199_54_07.thumb.png.2bff9a99eee400fc70b90fa2266af0a7.png

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

Downloading dtc binary
############################################################################################# 100.0%
dts file for ds920p not found, trying to download
############################################################################################# 100.0%
Found 1 disks and 0 nvme
Collecting disk paths
Found local disk sda with path 00:1f.2, adding into internal_slot 1 with portnumber
NO NVME disks found, returning
Patching USB to include your loader. Loader found in 3-2 port
Converting dts file : ds920p.dts to dtb file : >ds920p.dtb
Error: ds920p.dts:66.14-15 syntax error
FATAL ERROR: Unable to parse input tree
Copying patched dtb file ds920p.dtb to /home/tc/redpill-load/custom/extensions/redpill-dtb/ds920p_42661/model_ds920p.dtb -> OK ! File copied and verified !

 

 


        ahci {
pcie_root = "00:1f.2";
ata_port = <0x>;  ---- error
        };

        led_green {
            led_name = "syno_led0";
        };

        led_orange {
            led_name = "syno_led1";
        };
    };

 

Link to comment
Share on other sites

18 minutes ago, use-nas said:

Downloading dtc binary
############################################################################################# 100.0%
dts file for ds920p not found, trying to download
############################################################################################# 100.0%
Found 1 disks and 0 nvme
Collecting disk paths
Found local disk sda with path 00:1f.2, adding into internal_slot 1 with portnumber
NO NVME disks found, returning
Patching USB to include your loader. Loader found in 3-2 port
Converting dts file : ds920p.dts to dtb file : >ds920p.dtb
Error: ds920p.dts:66.14-15 syntax error
FATAL ERROR: Unable to parse input tree
Copying patched dtb file ds920p.dtb to /home/tc/redpill-load/custom/extensions/redpill-dtb/ds920p_42661/model_ds920p.dtb -> OK ! File copied and verified !

 

 


        ahci {
pcie_root = "00:1f.2";
ata_port = <0x>;  ---- error
        };

        led_green {
            led_name = "syno_led0";
        };

        led_orange {
            led_name = "syno_led1";
        };
    };

 

 

 

Is it a bare metal environment? It is a function that automatically finds ata_port in the patchdtc function,

 

a new function that @pocopico added about 6 hours ago.

 

@pocopico , Can you check this out?

 

Success reports continue to appear on VM, but bare metal is not.

Edited by Peter Suh
Link to comment
Share on other sites

20 minutes ago, use-nas said:

The chipset supports 6 sata, there are no 4, 3 and 4 on the board

 

@pocopico

 

I found the location of the problem. LINE 763, 764

 

 

In your script, you're looking for the eighth "/"

In my bare metal, the target is found at the seventh "/".

I don't know why, but is this position different between VM and bare metal?

 

udevadm info --query path --name sdb | awk -F "\/" '{print $8  }' | awk -F: '{print $1}' | cut -c 1-6

 

tc@box:~$ udevadm info --query path --name sdb
/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sdb
tc@box:~$ udevadm info --query path --name sdb | awk -F "\/" '{print $7  }' | awk -F: '{print $1}' | cut -c 1-6
target
tc@box:~$ 

Edited by Peter Suh
Link to comment
Share on other sites

20 hours ago, Peter Suh said:

 

If you can access the DSM installation request screen with ttyd as below,

Then send me the log with the command you see.

 

http://<youripaddr>:7681/

id : root / pw : ( no password )

 

cat /var/log/junior_reason

 

cat /var/log/*rc*

 


SynologyNAS login:
SynologyNAS login: root

Synology strongly advises you not to run commands as the root user, who has
the highest privileges on the system. Doing so may cause major damages
to the system. Please note that if you choose to proceed, all consequences are
at your own risk.

BusyBox v1.30.1 () built-in shell (ash)

SynologyNAS> cat /var/log/junior_reason
Exit on error [99] rp ext init exec failure...
SynologyNAS> cat /var/log/*rc*
START /linuxrc.syno.impl
Insert Marvell 1475 SATA controller driver
Insert basic USB modules...
:: Loading module usb-common ... [  OK  ]
:: Loading module usbcore ... [  OK  ]
:: Loading module ehci-hcd ... [  OK  ]
:: Loading module ehci-pci ... [  OK  ]
:: Loading module xhci-hcd ... [  OK  ]
:: Loading module xhci-pci ... [  OK  ]
:: Loading module usb-storage ... [  OK  ]
:: Loading kernel modules from extensions ...
Loading kmod #0 "dca.ko" for pocopico.igb (args: )
Loading kmod #1 "igb.ko" for pocopico.igb (args: )
Loading kmod #0 "udp_tunnel.ko" for pocopico.ixgbe (args: )
Loading kmod #1 "ip6_udp_tunnel.ko" for pocopico.ixgbe (args: )
Loading kmod #2 "dca.ko" for pocopico.ixgbe (args: )
insmod: can't insert 'dca.ko': File exists
ERROR: kernel extensions "dca.ko" from pocopico.ixgbe failed to load
Exit on error [99] rp ext init exec failure...
Tue Apr 19 05:51:45 UTC 2022
none /sys/kernel/debug debugfs rw,relatime 0 0
SynologyNAS>
 

Thanks for your help

Link to comment
Share on other sites

16 minutes ago, menace said:


SynologyNAS login:
SynologyNAS login: root

Synology strongly advises you not to run commands as the root user, who has
the highest privileges on the system. Doing so may cause major damages
to the system. Please note that if you choose to proceed, all consequences are
at your own risk.

BusyBox v1.30.1 () built-in shell (ash)

SynologyNAS> cat /var/log/junior_reason
Exit on error [99] rp ext init exec failure...
SynologyNAS> cat /var/log/*rc*
START /linuxrc.syno.impl
Insert Marvell 1475 SATA controller driver
Insert basic USB modules...
:: Loading module usb-common ... [  OK  ]
:: Loading module usbcore ... [  OK  ]
:: Loading module ehci-hcd ... [  OK  ]
:: Loading module ehci-pci ... [  OK  ]
:: Loading module xhci-hcd ... [  OK  ]
:: Loading module xhci-pci ... [  OK  ]
:: Loading module usb-storage ... [  OK  ]
:: Loading kernel modules from extensions ...
Loading kmod #0 "dca.ko" for pocopico.igb (args: )
Loading kmod #1 "igb.ko" for pocopico.igb (args: )
Loading kmod #0 "udp_tunnel.ko" for pocopico.ixgbe (args: )
Loading kmod #1 "ip6_udp_tunnel.ko" for pocopico.ixgbe (args: )
Loading kmod #2 "dca.ko" for pocopico.ixgbe (args: )
insmod: can't insert 'dca.ko': File exists
ERROR: kernel extensions "dca.ko" from pocopico.ixgbe failed to load
Exit on error [99] rp ext init exec failure...
Tue Apr 19 05:51:45 UTC 2022
none /sys/kernel/debug debugfs rw,relatime 0 0
SynologyNAS>
 

Thanks for your help

 

As in the log
It appears that ixgbe ext has a problem.
Isn't this 10GB Ethernet card an additional NIC?

If you can remove it and boot to another NIC, please use it like that.
If you have a NIC built-in, disable it in the BIOS.


For errors in "ixgbe ext", take this log now
I think it would be better to contact the topic "Redfill-extension driver/modules request" separately.

Edited by Peter Suh
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...