Jump to content
XPEnology Community

RedPill - the new loader for 6.2.4 - Discussion


Recommended Posts

40 minutes ago, pipsen said:

Hello,

 

something REALLY strange is going on here:

 

Installed DSM 7.0.1 apollolake baremetal

Installed Docker Package

Deployed Debian or Ubuntu docker container

installed openvpn client

executed openvpn via "openvpn --config /full/path/to/file"

=> Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/vpn.conf 

 

The file is DEFINITELY in place. I did EXACTLY the same mit Xpenology 6.3.2 in parallel and it works like a charm. What the hell is wrong here? :-(

Does somebody else have the same issue and any idea, why this is not working any more with DSM7?

 

Thank you!

Try to execute with privilege your container, that's the pb I think. Check the permission of file, and add in ENV PID/GID of your user (dsm)

Link to comment
Share on other sites

24 minutes ago, RedwinX said:

Try to execute with privilege your container, that's the pb I think. Check the permission of file, and add in ENV PID/GID of your user (dsm)

 

Container is executed als privliged container and openvpn is executed as root inside of the container. Config file is created locally inside of the container. I did exactly the same click by click with DSM 6.2.3 and had not problems

Link to comment
Share on other sites

5 hours ago, urundai said:

If it is older (5+ years), you would be surprised how their output drops and not enough depending on the number of things you have going on. 

It is like with every good mariage: you are always doing the same things since years, but suddenly they are wrong 😆 

  • Haha 1
Link to comment
Share on other sites

54 minutes ago, haydibe said:

It is like with every good mariage: you are always doing the same things since years, but suddenly they are wrong 😆 


and as bad marriage sometime something breaks off :D

so i went further and no errors on my drive BUT after plugin directly on hdd and playing with cables. i can see that i can login and access storage manager before it reboots.

 

so imo, cables are culprit. i will give it a try again on thursday when getting my new one.

 

cheers.

Link to comment
Share on other sites

1 hour ago, titoum said:


and as bad marriage sometime something breaks off :D

so i went further and no errors on my drive BUT after plugin directly on hdd and playing with cables. i can see that i can login and access storage manager before it reboots.

 

so imo, cables are culprit. i will give it a try again on thursday when getting my new one.

 

cheers.

Cables can go bad but that's still a rare case. Just to rule out any other issues - if you connect the WD drive to the same broken cable, are you still having issues?

 

Or the other way around, connecting Seagate to good cable and making sure it work?

Link to comment
Share on other sites

22 minutes ago, urundai said:

Or the other way around, connecting Seagate to good cable and making sure it work?

 

i used cables that i had in my pc box...if i switch the drive 5 on cable 4. i was able to stay longer before reboot.

 

so i will replace them all and check.

 

is there a way to delete the partition of dsm so i can install/force it fresh again?

may be something went wrong there or corrupted data because of cable?

Link to comment
Share on other sites

On 10/31/2021 at 12:56 AM, haydibe said:

@titoum: I have some notes to your approach:

  

Instead of doing this:

You can simply download the file from yumkey's repo and put it e.g. in the rp-helper folder, then use the custom_bind_mounts like mentioned earlier.

 

 

 

 The intended approach for rp-helper v0.12 is to create a custom_config.json for your custom configurations ;) There is no need to butcher the global_config.json....

On Linux, you can get the file with `wget -L https://raw.githubusercontent.com/jumkey/redpill-load/develop/bundled-exts.json -o bundled-exts.json`  in your rp-helper folder and use a custom_config.json like this:

 


{
    "docker": {
        "use_custom_bind_mounts": "true",
        "custom_bind_mounts": [
            {
                "host_path": "bundled-exts.json",
                "container_path" :"/opt/redpill-load/bundled-exts.json"
            }
        ]
    },
    "build_configs": [
        {
            "id": "bromolow-7.0.1-42218",
            "platform_version": "bromolow-7.0.1-42218",
            "user_config_json": "bromolow_user_config.json",
            "redpill_lkm_make_target": "test-v7",
            "docker_base_image": "debian:8-slim",
            "compile_with": "toolkit_dev",
            "downloads": {
                "kernel": {
                    "url": "https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/25426branch/bromolow-source/linux-3.10.x.txz/download",
                    "sha256": "18aecead760526d652a731121d5b8eae5d6e45087efede0da057413af0b489ed"
                },
                "toolkit_dev": {
                    "url": "https://sourceforge.net/projects/dsgpl/files/toolkit/DSM7.0/ds.bromolow-7.0.dev.txz/download",
                    "sha256": "a5fbc3019ae8787988c2e64191549bfc665a5a9a4cdddb5ee44c10a48ff96cdd"
                }
            },
            "redpill_lkm": {
                "source_url": "https://github.com/RedPill-TTG/redpill-lkm.git",
                "branch": "master"
            },
            "redpill_load": {
                "source_url": "https://github.com/jimmyGALLAND/redpill-load.git",
                "branch": "develop"
            }
        }
    ]
}

 

Afterwards you can use the auto action for this build config without manual steps required...

 

I use this custom_config.json to build.

and bromolow_user_config.json is below:

{
  "extra_cmdline": {
    "vid": "0x46f4",
    "pid": "0x0001",
    "sn": "xxxxxxxxxxxxxxx",
    "mac1": "xxxxxxxxxxxxxx",
    "DiskIdxMap": "0400",
    "SataPortMap": "44",
    "SasIdxMap": "0"
  },
  "synoinfo": {},
  "ramdisk_copy": {}
}

 

in DSM serial0 console, sdh(256G nvme SSD passthrough from unraid) is exist

DiskStation> fdisk -l
Disk /dev/sdh: 238 GB, 256060514304 bytes, 500118192 sectors
31130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdh1    0,32,33     310,37,47         2048    4982527    4980480 2431M fd Linux raid autodetect
/dev/sdh2    310,37,48   571,58,63      4982528    9176831    4194304 2048M fd Linux raid autodetect
/dev/sdh3    587,111,37  1023,254,63    9437184  499913375  490476192  233G fd Linux raid autodetect
Disk /dev/md1: 2047 MB, 2147418112 bytes, 4194176 sectors
524272 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/sdu: 128 MB, 134217728 bytes, 262144 sectors
1008 cylinders, 5 heads, 52 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdu1    0,32,33     6,62,56           2048     100351      98304 48.0M 83 Linux
Partition 1 has different physical/logical start (non-Linux?):
     phys=(0,32,33) logical=(7,4,21)
Partition 1 has different physical/logical end:
     phys=(6,62,56) logical=(385,4,44)
/dev/sdu2    6,62,57     15,205,62       100352     253951     153600 75.0M 83 Linux
Partition 2 has different physical/logical start (non-Linux?):
     phys=(6,62,57) logical=(385,4,45)
Partition 2 has different physical/logical end:
     phys=(15,205,62) logical=(976,3,36)
/dev/sdu3    15,205,63   16,81,1         253952     262143       8192 4096K 83 Linux
Partition 3 has different physical/logical start (non-Linux?):
     phys=(15,205,63) logical=(976,3,37)
Partition 3 has different physical/logical end:
     phys=(16,81,1) logical=(1008,1,12)

 

But after install and reboot, DSM install web assistant show again, seen that can't find the disk.

With another bootloader from someone, it can start normally.

Can you give some idea? Thank you.

Link to comment
Share on other sites

2 hours ago, seanone said:

 

I use this custom_config.json to build.

and bromolow_user_config.json is below:


{
  "extra_cmdline": {
    "vid": "0x46f4",
    "pid": "0x0001",
    "sn": "xxxxxxxxxxxxxxx",
    "mac1": "xxxxxxxxxxxxxx",
    "DiskIdxMap": "0400",
    "SataPortMap": "44",
    "SasIdxMap": "0"
  },
  "synoinfo": {},
  "ramdisk_copy": {}
}

 

in DSM serial0 console, sdh(256G nvme SSD passthrough from unraid) is exist


DiskStation> fdisk -l
Disk /dev/sdh: 238 GB, 256060514304 bytes, 500118192 sectors
31130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdh1    0,32,33     310,37,47         2048    4982527    4980480 2431M fd Linux raid autodetect
/dev/sdh2    310,37,48   571,58,63      4982528    9176831    4194304 2048M fd Linux raid autodetect
/dev/sdh3    587,111,37  1023,254,63    9437184  499913375  490476192  233G fd Linux raid autodetect
Disk /dev/md1: 2047 MB, 2147418112 bytes, 4194176 sectors
524272 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/sdu: 128 MB, 134217728 bytes, 262144 sectors
1008 cylinders, 5 heads, 52 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sdu1    0,32,33     6,62,56           2048     100351      98304 48.0M 83 Linux
Partition 1 has different physical/logical start (non-Linux?):
     phys=(0,32,33) logical=(7,4,21)
Partition 1 has different physical/logical end:
     phys=(6,62,56) logical=(385,4,44)
/dev/sdu2    6,62,57     15,205,62       100352     253951     153600 75.0M 83 Linux
Partition 2 has different physical/logical start (non-Linux?):
     phys=(6,62,57) logical=(385,4,45)
Partition 2 has different physical/logical end:
     phys=(15,205,62) logical=(976,3,36)
/dev/sdu3    15,205,63   16,81,1         253952     262143       8192 4096K 83 Linux
Partition 3 has different physical/logical start (non-Linux?):
     phys=(15,205,63) logical=(976,3,37)
Partition 3 has different physical/logical end:
     phys=(16,81,1) logical=(1008,1,12)

 

But after install and reboot, DSM install web assistant show again, seen that can't find the disk.

With another bootloader from someone, it can start normally.

Can you give some idea? Thank you.

Can you try with DiskIdxMap of 1000 and SataPortMap of 1?

Link to comment
Share on other sites

@seanone the output of `fdisk -l` lis missing the device /dev/synoboot with its three partitions.

How are you booting from the bootloader image? boot from sata? boot from usb stick? boot from virtual usb device?

 

You might want to check the logs on serial port 0. 

 

I use Proxmox using a virtual usb device. The pid an vid you use match those default values used with Proxmox. Not sure if unraid uses the same.

If you use an usb stick, you must identify and use the vid/pid of the actualy stick. If you use sata dom boot, the vid/pid should be irrelvant, but you need to make sure that you specificly pick the sata boot entry in grub, when starting the vm.  

 

 

Edited by haydibe
Link to comment
Share on other sites

3 hours ago, urundai said:

Can you try with DiskIdxMap of 1000 and SataPortMap of 1?

 

Try with "DiskIdxMap": "1000" "SataPortMap": "1",

Web assistant said there's no disk in 3615xs, and in dsm bootloader console(serial0), "fdisk -l" has no disk except bootloader usb. 

 

After add 3th sata controller as below, it's work now, disk is at 4th disk location.

"DiskIdxMap": "00040C " "SataPortMap": "484"

 

When I try "00050D" and "583", that disk is still at 4th disk location, maybe bootloader has fixed disk location map?

 

This is lspci DSM, It means 5 sata controllers?

0000:00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
0000:00:01.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 05)
0000:00:02.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
0000:00:02.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
0000:00:02.2 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
0000:00:02.3 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
0000:00:07.0 USB controller: Red Hat, Inc. QEMU XHCI Host Controller (rev 01)
0000:00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
0000:00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
0000:00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
0000:01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
0000:02:00.0 Communication controller: Red Hat, Inc. Virtio console (rev 01)
0000:03:00.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon (rev 01)
0001:07:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)
0001:08:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)
0001:09:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)
0001:0a:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)

 

 

 

 

Edited by seanone
Link to comment
Share on other sites

1 hour ago, haydibe said:

@seanone the output of `fdisk -l` lis missing the device /dev/synoboot with its three partitions.

How are you booting from the bootloader image? boot from sata? boot from usb stick? boot from virtual usb device?

 

You might want to check the logs on serial port 0. 

 

I use Proxmox using a virtual usb device. The pid an vid you use match those default values used with Proxmox. Not sure if unraid uses the same.

If you use an usb stick, you must identify and use the vid/pid of the actualy stick. If you use sata dom boot, the vid/pid should be irrelvant, but you need to make sure that you specificly pick the sata boot entry in grub, when starting the vm.  

 

 

 

I use virtual usb in unraid.

Maybe system is still in bootloader mode, so fdisk just list /dev/sdu instead of /dev/synoboot

Link to comment
Share on other sites

 

ok so i dont know what happen but i changed cables and tried different thing and still reboot...

 

so big issue, big solution.... i have started without hdd 5 and clean up the pool then plugged in hdd 5...no reboot anymore. (wtf)

 

so i have tested hdd 5 smart and no errors according to dsm 👺

 

so i have clean up everything and created a new pool. i hope this wont happen again.

 

Link to comment
Share on other sites

Is there anyway to load the loader from IPXE boot?  I'm booting the loader with IPXE sanboot.  It looked like the loader was trying to write sector 0xc28x to 'hd0' and failed.  The Synology Assistant can still find it but installation failed at about 10%.  Is there anyway to make boot loader working with IPXE boot?

 

:synology
sanboot --no-describe /iso/synoboot_ds3615xs.img || go failed
goto start
 

 

synboot.jpg

synboot2.jpg

Edited by weikai
Link to comment
Share on other sites

4 hours ago, weikai said:

Is there anyway to load the loader from IPXE boot?  I'm booting the loader with IPXE sanboot.  It looked like the loader was trying to write sector 0xc28x to 'hd0' and failed.  The Synology Assistant can still find it but installation failed at about 10%.  Is there anyway to make boot loader working with IPXE boot?

 

:synology
sanboot --no-describe /iso/synoboot_ds3615xs.img || go failed
goto start
 

 

synboot.jpg

synboot2.jpg


Two different errors, first one comes from GRUB when GRUB tries to save default boot entry, not very important. 
 

The second one is probably because sataboot is not recognized and and not shimmed. You can verify after this message, if you telnet to the system and do an fdisk -l

Link to comment
Share on other sites

ok so

  • restore is done
  • plex installed
  • hamatv plugin done
  • photo installed
  • mobile backup on going + plex refresh

2121426773_Screenshot2021-11-04132145.thumb.png.a67af640bc6c4641bf704306f4bd8cd5.png

 

i dont see any heavy usage @WiteWulf so far.

 

my bet is defect cable and something that went wrong with the update.

i will let it run and see how it goes. syno log is pretty much empty. i dont know if there is a place in the linux itself to see system log that would provide more info about how it is going.

 

Link to comment
Share on other sites

6 hours ago, pocopico said:


Two different errors, first one comes from GRUB when GRUB tries to save default boot entry, not very important. 
 

The second one is probably because sataboot is not recognized and and not shimmed. You can verify after this message, if you telnet to the system and do an fdisk -l

 

The installation was actually failed after 40%.  The fdisk shows the following information.    I'm not sure if the problem is on /dev/md1 that doesn't contain a valid partition table.

 

DiskStation> fdisk -l
Disk /dev/sda: 500 GB, 536870912000 bytes, 1048576000 sectors
65270 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1    0,32,33     310,37,47         2048    4982527    4980480 2431M fd Linux raid autodetect
/dev/sda2    310,37,48   571,58,63      4982528    9176831    4194304 2048M fd Linux raid autodetect
Disk /dev/md0: 2431 MB, 2549940224 bytes, 4980352 sectors
622544 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 2047 MB, 2147418112 bytes, 4194176 sectors
524272 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md1 doesn't contain a valid partition table
 

Link to comment
Share on other sites

ok so all went fine BUT the photo program seems to be ******* compared to dsm 6.x

 

1612337095_Screenshot2021-11-04194920.thumb.png.88292ea6301d67c8a2d286ede71a35bb.png

 

why the hell would it try to convert my mp4 video!?

 

Also, i had java i/o exception on my mobile to upload and cpu usage around 10% when uploading files...this is nuts.

 

i hope that all will works smoothly now and wont update for a while.

Link to comment
Share on other sites

5 hours ago, weikai said:

 

The installation was actually failed after 40%.  The fdisk shows the following information.    I'm not sure if the problem is on /dev/md1 that doesn't contain a valid partition table.

 

DiskStation> fdisk -l
Disk /dev/sda: 500 GB, 536870912000 bytes, 1048576000 sectors
65270 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1    0,32,33     310,37,47         2048    4982527    4980480 2431M fd Linux raid autodetect
/dev/sda2    310,37,48   571,58,63      4982528    9176831    4194304 2048M fd Linux raid autodetect
Disk /dev/md0: 2431 MB, 2549940224 bytes, 4980352 sectors
622544 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 2047 MB, 2147418112 bytes, 4194176 sectors
524272 cylinders, 2 heads, 4 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/md1 doesn't contain a valid partition table
 

 

Hi, 

 

/dev/md0 holds the root partition data which is mirrored across all configured disks. 

/dev/md1 is the swap partition and like root partition is mirrored across all configured disks.

 

The /dev/md0 is created and mounted at the time of installation for obvious reasons. /dev/md1 is only activated once you have the system normally booted and not on install mode.

 

Actually a very clever implementation that makes sure that the system will always boot as long as you have at least one disk available. If you dont have a disk, or if the system fails to find root it will fail back to install mode.

 

The synoboot disk should always be present in order for DSM to function properly and thats the reason why RP shims that. If you dont have synoboot it will fail to install reporting a corrupted image. Even if you install and then you fail to shim synoboot (according to Jun), it will time bomb at some point.

 

# fdisk -l /dev/synoboot

Disk /dev/synoboot: 3.7 GiB, 3969220608 bytes, 7752384 sectors
Disk model: SanDisk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf110ee87

Device         Boot  Start    End Sectors Size Id Type
/dev/synoboot1        2048 100351   98304  48M 83 Linux
/dev/synoboot2      100352 253951  153600  75M 83 Linux
/dev/synoboot3      253952 262143    8192   4M 83 Linux
 

 

 

Link to comment
Share on other sites

1 hour ago, pocopico said:

 

Hi, 

 

/dev/md0 holds the root partition data which is mirrored across all configured disks. 

/dev/md1 is the swap partition and like root partition is mirrored across all configured disks.

 

The /dev/md0 is created and mounted at the time of installation for obvious reasons. /dev/md1 is only activated once you have the system normally booted and not on install mode.

 

Actually a very clever implementation that makes sure that the system will always boot as long as you have at least one disk available. If you dont have a disk, or if the system fails to find root it will fail back to install mode.

 

The synoboot disk should always be present in order for DSM to function properly and thats the reason why RP shims that. If you dont have synoboot it will fail to install reporting a corrupted image. Even if you install and then you fail to shim synoboot (according to Jun), it will time bomb at some point.

 

# fdisk -l /dev/synoboot

Disk /dev/synoboot: 3.7 GiB, 3969220608 bytes, 7752384 sectors
Disk model: SanDisk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf110ee87

Device         Boot  Start    End Sectors Size Id Type
/dev/synoboot1        2048 100351   98304  48M 83 Linux
/dev/synoboot2      100352 253951  153600  75M 83 Linux
/dev/synoboot3      253952 262143    8192   4M 83 Linux
 

 

 

 

Thank you for the explanation.  My MiniPC is at a not easy access location and I wish I can configure the loader to boot from the network without physically update the USB drive to run upgrades.  It looks like it's not possible at this moment.

Link to comment
Share on other sites

On 10/25/2021 at 4:13 AM, haydibe said:

This update of the redpill_tool_chain helper is long overdue.  From now on the name will be redpill-helper, as it realy is just a helper for redpill-lkm and redpill-load.

You can find the redpill-helper v0.12 attached to this post.

 

It now supports an "ext" action, which delegates the commands to the ext-manager.sh script inside a container.

The extensions are cached on the host, thus extensions need to be added only once and will apply for all build profiles!

This should put an end to the need to modify the script or to use the run action and add the extensions everytime a bootload image is build.

 

Additionaly a custom_config.json is introduced, which is the place to store your custom configurations - it needs to be created by yourself and won't be overriden by any future updates of the rp-helper. 

 

Please read the README.md for usage instructions.

 

Thanks at Pocopico, WiteWulf and Orphée for testing it thoroughly! Special thanks to WiteWulf for helping me to transform the README.md to a usefull document :)

 

redpill-helper-v0.12.zip 12.41 kB · 346 downloads

Why not open source the redpill-helper to github? It would be more convenient for developing and publish.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...