VeNoM Posted August 28, 2013 Share #1 Posted August 28, 2013 1. the same kernel patch applies 2. I got it working on linux kvm with a small problem. when it starts, some service (probably scemd) deletes all /dev/sd* and you can't do anything with it. Quote Link to comment Share on other sites More sharing options...
jokies Posted August 29, 2013 Share #2 Posted August 29, 2013 Can you teach us how to apply the patch and where to obtain it? Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 29, 2013 Author Share #3 Posted August 29, 2013 https://github.com/andy928/xpenology/commits/master Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 29, 2013 Author Share #4 Posted August 29, 2013 After some checking it appers that the kernel is somehow discarding virtual /dev/sd*. Synology did some modification to the ./drivers/ata section of the kernel. Can somebody help ? Quote Link to comment Share on other sites More sharing options...
Trantor Posted August 29, 2013 Share #5 Posted August 29, 2013 Yes same here I test my "pre" 4.3 build on 2 platform : intel (asus pk5pl-am se which use ata_piix driver) and amd (zotac AD01 minipc)Test with blank disk and with 4.2-3211 on it : same issue (install ok reboot syno assistant happy, log into DSM all is working exept this volume/disk error) No error on screen neither in logs Compiled modules (like ethernet/raid) loads and work. I have try to just repack originals files with just pacthed synobios. But even if I include sata driver as module in rd.gz, I'm unable to install because no disk detected The idea is to test with original kernel and modules if it working. I will post it if you want to test To build 4.3 : - Tool Chains (DSM 4.3 ) / Intel x86 Linux 3.2.40 (Bromolow) x64 - Kernel source from Synology GPL / 3776branch (synogpl-3776-bromolow.tbz) with patch from andy's git EDIT: This build is not working and it's for debug and testing purpose only Here it is : 4.3 Test Build EDIT2: fdisk -l return nothing... When DSM is started, I plug USB drive, it's mounted and available (fdisk see it) but after 10-15sec it's unmouted (fdisk return nothing). It seem something is running and auto unmout drive. It's very strange because USB drive are still mounted in /volumeUSB* but not in DSM. I will try to kill some main DSM services to see if I can remount volume. Maybe Kanedo can do his "voodoo magic" and compare source code from 3.2.30 and 3.2.40 kernel ? In /var/log/message I get: Aug 29 12:53:06 DiskStation dnsdsm: Check failed. Aug 29 12:53:07 DiskStation initdata.cgi: disk_info_get.c:76 Failed to open /dev/sda, errno=No such file or directory Aug 29 12:53:07 DiskStation initdata.cgi: disk_info_enum.c:42 Failed to get disk information sda Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 29, 2013 Author Share #6 Posted August 29, 2013 It was about time Synology put in some protection Quote Link to comment Share on other sites More sharing options...
Trantor Posted August 29, 2013 Share #7 Posted August 29, 2013 It was about time Synology put in some protection Yes I agree ^^ Quote Link to comment Share on other sites More sharing options...
Kanedo Posted August 29, 2013 Share #8 Posted August 29, 2013 Trantor, Unfortunately, I can't get network up and running using your 4.3 test build. I have Nvidia NIC. Did you add support for that in .config? Thanks. Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 29, 2013 Author Share #9 Posted August 29, 2013 ./drivers/ata/libata-eh.c case -ENOENT: /* IDENTIFY was issued to non-existent * device. No need to reset. Just * thaw and ignore the device. */ ata_eh_thaw_port(ap); #ifdef MY_ABC_HERE ata_link_err(link, "Issued IDENTIFY to non-existent device ?!\n"); goto err; #endif I get this error during booting. Quote Link to comment Share on other sites More sharing options...
Trantor Posted August 29, 2013 Share #10 Posted August 29, 2013 Trantor, Unfortunately, I can't get network up and running using your 4.3 test build. I have Nvidia NIC. Did you add support for that in .config? Thanks. My bad. Forgot to add network drivers ^^ Kernel with lot of network drivers (as usal replace it on your USB stick) Yes VeNoM this part of code is not present in 4.2 (especially goto err;). I start to compare sources file between 4.2 and 4.3, but got massive headache... I will try to built 4.3 kernel without this part of code later Quote Link to comment Share on other sites More sharing options...
Akhlan Posted August 29, 2013 Share #11 Posted August 29, 2013 Trantor President Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 30, 2013 Author Share #12 Posted August 30, 2013 The problem is in rc = sata_pmp_attach(dev). This function returns -ENOENT if (dev->class == ATA_DEV_PMP) rc = sata_pmp_attach(dev); else rc = ata_dev_read_id(dev, &dev->class, readid_flags, dev->id); /* read_id might have changed class, store and reset */ ehc->classes[dev->devno] = dev->class; dev->class = ATA_DEV_UNKNOWN; switch (rc) { case 0: /* clear error info accumulated during probe */ ata_ering_clear(&dev->ering); new_mask |= 1 << dev->devno; break; case -ENOENT: /* IDENTIFY was issued to non-existent * device. No need to reset. Just * thaw and ignore the device. */ ata_eh_thaw_port(ap); #ifdef MY_ABC_HERE ata_link_err(link, "Issued IDENTIFY to non-existent device ?!\n"); goto err; #endif break; default: goto err; Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 30, 2013 Author Share #13 Posted August 30, 2013 I manualy create /dev/sda[12], open the storage manager, then /dev/sda[12] is deleted and the folowing message gets logged. Aug 30 10:44:00 DiskStation43 dnsdsm: Check failed. Aug 30 10:44:01 DiskStation43 dnsdsm: Check failed. Aug 30 10:44:01 DiskStation43 storagehandler.cgi: disk_info_get.c:76 Failed to open /dev/sda, errno=No such file or directory Aug 30 10:44:01 DiskStation43 storagehandler.cgi: disk_info_enum.c:42 Failed to get disk information sda Aug 30 10:44:01 DiskStation43 storagehandler.cgi: storagehandler.cpp:474 CszBuf't get the current buzzer bitmap Aug 30 10:44:30 DiskStation43 SystemInfo.cgi: disk_info_get.c:76 Failed to open /dev/sda, errno=No such file or directory Aug 30 10:44:30 DiskStation43 SystemInfo.cgi: disk_info_enum.c:42 Failed to get disk information sda Aug 30 10:44:30 DiskStation43 SystemInfo.cgi: disk_info_get.c:76 Failed to open /dev/sda, errno=No such file or directory Aug 30 10:44:30 DiskStation43 SystemInfo.cgi: disk_info_enum.c:42 Failed to get disk information sda Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 30, 2013 Author Share #14 Posted August 30, 2013 DiskStation43> cat /usr/syno/etc/dnsdsm -----BEGIN CERTIFICATE----- MIIDezCCAmOgAwIBAgIJAIY9NwFRheo8MA0GCSqGSIb3DQEBBQUAMFQxCzAJBgNV BAYTAlRXMQ8wDQYDVQQIDAZUYWl3YW4xDzANBgNVBAcMBlRhaXBlaTEVMBMGA1UE CgwMU3lub2xvZ3kgSW5jMQwwCgYDVQQLDANTUEcwHhcNMTMwNjExMDIyOTU2WhcN MTMwNzExMDIyOTU2WjBUMQswCQYDVQQGEwJUVzEPMA0GA1UECAwGVGFpd2FuMQ8w DQYDVQQHDAZUYWlwZWkxFTATBgNVBAoMDFN5bm9sb2d5IEluYzEMMAoGA1UECwwD U1BHMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxJFKG83WbbHHLxKF M4xoVp1iYuwpp0pNF0y/brNQsNEEq/aqGgzO48RDBm919mvVgqtzBPM/aPfJZvza G1bIyh3koBtPEIrrJSw3hbYLWbTcDwP+/CwCGYKvquqsEo74c5ydCzJMZnfR+nWV BjbWAl8LFbfAueA5+BtvjGrf4Ne7l1Zc1oLNkNyVwx3Q7WAhwBp4uJ9RoWCbA3/l y6t91PXr2z7/iRvys1xLkIyq9Q31jfz87jPT2vtSAlCa2ccPk88/w0lHlKKA+/hW whIK2WW7kyVzH/aZiY/uLkz5K0C00j04SCl5pB59c2PUWPbAgfWxycB57QvsUoOx wP4C1wIDAQABo1AwTjAdBgNVHQ4EFgQUC54wSyS1sKhJvqbuFORt5O1yKKkwHwYD VR0jBBgwFoAUC54wSyS1sKhJvqbuFORt5O1yKKkwDAYDVR0TBAUwAwEB/zANBgkq hkiG9w0BAQUFAAOCAQEAtdvdeWHnOCg9wsZK4NYpf9hijWSDJXVeomvFCZAJrPkm 8YO8fT3SmOpiRQ7hljYn6i1oNM4PTBqHga0REB8FIrlx1dWSxs5ZbYcBcFGHsdBu ntPmTXjwcy8wIC73piSXN8FsL2P5Kh0nclsRFOpgpeE/sd1wvqwzgteJVzCf7oNH RhUF+2eSytF2Ge1VEl99AUPwxY7/+4h0INZ1Z0aXbXnmvHoMNT9x71z75Eni7ZIU m0gxAA05VWPQk75ahESwqUvGPsF7Q5Fa0iPaKUwG+hWJevXnWN9r4YL5pu0Q67l3 1qWRC83iqaTTjEsaQnsRDPHVBJpyy6QjZwn7HCuNzA== -----END CERTIFICATE----- Quote Link to comment Share on other sites More sharing options...
fonix232 Posted August 30, 2013 Share #15 Posted August 30, 2013 Is the DNSDSM service even relevant? I think all it does is to register the device to a (D)DNS service, and it fails the check, irrelevant to the disks inserted. Though I might be wrong. What I think is, that the devices are dismounted because of a different check, possibly made by synobios, and it instructs the SATA controller to drop all devices. Quote Link to comment Share on other sites More sharing options...
VeNoM Posted August 30, 2013 Author Share #16 Posted August 30, 2013 Well, the problem is in /usr/syno/webman. I just replaced the 4.2 webman in the 4.3 firmware and the /dev/sda[12] doesn't get deleted. So Synology implemented a security check on the interface in the .cgi binaries. later edit: On restart the dev/sda[12] are deleted. Quote Link to comment Share on other sites More sharing options...
colombodk Posted August 30, 2013 Share #17 Posted August 30, 2013 Supposedly, there is a new security check for 3rd party applications... it has effected the SynoBox.fr.nf app; perhaps it also effects XPEnology? Read about it on http://synobox.fr.nf/ Quote Link to comment Share on other sites More sharing options...
Trantor Posted September 1, 2013 Share #18 Posted September 1, 2013 Just little feedback: I manage to boot system without scemd nor /usr/syno/etc.defaults/rc.d/* scripts but fdisk still empty. When booting with blank drive, log directly on xpenology console, fdisk detect all drives EDIT: Build kernel with libata-eh.c pacthed (removed the new part of code), same issue. The problem is in rc = sata_pmp_attach(dev). This function returns -ENOENT Where do you find this ? /etc/rc ? Quote Link to comment Share on other sites More sharing options...
fonix232 Posted September 1, 2013 Share #19 Posted September 1, 2013 EDIT: Build kernel with libata-eh.c pacthed (removed the new part of code), same issue. The problem is in rc = sata_pmp_attach(dev). This function returns -ENOENT Where do you find this ? /etc/rc ? It is in libata-eh, but more extended. Quote Link to comment Share on other sites More sharing options...
VeNoM Posted September 2, 2013 Author Share #20 Posted September 2, 2013 Just little feedback:I manage to boot system without scemd nor /usr/syno/etc.defaults/rc.d/* scripts but fdisk still empty. When booting with blank drive, log directly on xpenology console, fdisk detect all drives EDIT: Build kernel with libata-eh.c pacthed (removed the new part of code), same issue. The problem is in rc = sata_pmp_attach(dev). This function returns -ENOENT Where do you find this ? /etc/rc ? The kernel in ./drivers/ata/libata-eh.c Quote Link to comment Share on other sites More sharing options...
k3dt Posted September 2, 2013 Share #21 Posted September 2, 2013 If you want debug.. DiskStation> cat /proc/partitions major minor #blocks name 8 0 8388608 sda 8 1 2490240 sda1 8 2 2097152 sda2 9 0 2490176 md0 9 1 2097088 md1 DiskStation> mknod /dev/sda b 8 0 DiskStation> Now after few secs /dev/sda dissapears. We need figure out why this happens. Quote Link to comment Share on other sites More sharing options...
VeNoM Posted September 2, 2013 Author Share #22 Posted September 2, 2013 It disappears only when you use the web interface or on reboot. Quote Link to comment Share on other sites More sharing options...
k3dt Posted September 2, 2013 Share #23 Posted September 2, 2013 Yep... i tried "killall httpd" and /dev/sda is still here.. will look at .cgi files with dissasambler. Quote Link to comment Share on other sites More sharing options...
tsygam Posted September 2, 2013 Share #24 Posted September 2, 2013 seems that for qnoligy vortex is using another synobios mod: at the offset 00002A26, 75 C4 0F BE 04 24 is replaced with 90 B8 36 00 00 00, so assuming that 36 is model ID for DS1511, for 3612 shouldn't it be 90 B8 42 00 00 00 at 0002626? synobios.zip Quote Link to comment Share on other sites More sharing options...
Trantor Posted September 2, 2013 Share #25 Posted September 2, 2013 k3dt synobios's patched file (this file in use in 4.3 test build): .text:00000000000025C8 loc_25C8: ; CODE XREF: SetMicropId+3Aj .text:00000000000025C8 mov rsi, offset aR ; "R" .text:00000000000025CF mov rdx, rsp .text:00000000000025D2 mov ecx, 8 .text:00000000000025D7 mov rdi, rsi .text:00000000000025DA call ReadUart .text:00000000000025DF test eax, eax .text:00000000000025E1 mov edx, 0FFFFFFFFh .text:00000000000025E6 xor rax, rax .text:00000000000025E9 mov al, 42h ; 'B' .text:00000000000025EB nop .text:00000000000025EC xor edx, edx .text:00000000000025EE mov cs:MpId_20839, eax .text:00000000000025F4 jmp short loc_25AC .text:00000000000025F4 SetMicropId endp synobios file from 1511+ qnology (here or here. Thanks google trad ^^) .text:00000000000029C8 loc_29C8: ; CODE XREF: SetMicropId+3Aj .text:00000000000029C8 mov rsi, offset aR ; "R" .text:00000000000029CF mov rdx, rsp .text:00000000000029D2 mov ecx, 8 .text:00000000000029D7 mov rdi, rsi .text:00000000000029DA call ReadUart .text:00000000000029DF test eax, eax .text:00000000000029E1 mov edx, 0FFFFFFFFh .text:00000000000029E6 nop .text:00000000000029E7 mov eax, 36h ; '6' .text:00000000000029EC xor edx, edx .text:00000000000029EE mov cs:MpId_20839, eax .text:00000000000029F4 jmp short loc_29AC .text:00000000000029F4 SetMicropId endp Some differences in registers and operations... And yes as tsygam mention 36 is MicroID for 1511+: MICROP_ID_710p = 0x31, /* '1' */ MICROP_ID_411p = 0x33, /* '3' 411+II is the same*/ MICROP_ID_1010p = 0x32, /* '2' */ MICROP_ID_1511p = 0x36, /* '6' */ MICROP_ID_810p = 0x35, /* '5' */ MICROP_ID_810rp = 0x34, /* '4' */ MICROP_ID_2211p = 0x37, /* '7' */ MICROP_ID_2211rp = 0x38, /* '8' */ MICROP_ID_2411p = 0x39, /* '9' */ MICROP_ID_3411xs = 0x43, /* 'C' 3412xs is the same */ MICROP_ID_3411rpxs = 0x41, /* 'A' 3412rpxs is the same */ MICROP_ID_3611xs = 0x42, /* 'B' 3612xs is the same*/ MICROP_ID_712p = 0x44, /* 'D' */ MICROP_ID_412p = 0x45, /* 'E' */ MICROP_ID_1512p = 0x47, /* 'G' */ MICROP_ID_1812p = 0x46, /* 'F' */ MICROP_ID_812p = 0x48, /* 'H' */ MICROP_ID_812rp = 0x49, /* 'I' */ MICROP_ID_2212p = 0x4A, /* 'J' */ MICROP_ID_2212rp = 0x4B, /* 'K' */ MICROP_ID_2413p = 0x4C, /* 'L' */ MICROP_ID_10613xsp = 0x4d, /* 'M' */ MICROP_ID_3413xsp = 0x4e, /* 'N' */ MICROP_ID_713p = 0x50, /* 'P' */ MICROP_ID_1513p = 0x51, /* 'Q' */ MICROP_ID_1813p = 0x52, /* 'R' */ MICROP_ID_RS2414p = 0x53, /* 'S' */ MICROP_ID_RS2414rpp = 0x54, /* 'T' */ MICROP_ID_RS814p = 0x55, /* 'U' */ MICROP_ID_RS814rpp = 0x56, /* 'V' */ MICROP_ID_RS3614xsp = 0x57, /* 'W' RS3614xsp */ MICROP_ID_RS3614xs = 0x57, /* 'W' RS3614xs */ MICROP_ID_RS3614rpxs = 0x57, /* 'W' RS3614rpxs */ MICROP_ID_1814p = 0x58, /* 'X' */ MICROP_ID_UNKNOW = 0xFF, Quote Link to comment Share on other sites More sharing options...
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.