Jump to content
XPEnology Community

jun

Developer
  • Posts

    64
  • Joined

  • Last visited

  • Days Won

    32

Posts posted by jun

  1. @Jun Can you share the steps to recompile your patched kernel zImage? I can recompile the kernel with Hyper-V support, but it seems still not work, so I guess I missed the proper patch for DSM6.0.2?

    Since there are considerable difference between beta source and the release version, I write and compile kernel modules instead, even the AMD kernel is a combination of the original kernel and the AMD support code compiled as module (sort of). I compile beta src kernel only to aid debugging, itself does not work properly, lacking required symbol etc, and I do not bother to fix it.

    can you provide a quick writeup on how you added LSI support as an example so that some of us can work on doing the same for other drivers?

    most drivers has nothing special, and for special drivers, better to wait for proper kernel source. For LSI hba, I use existing driver, patch the kernel to make it has proper device name, from sas* to sd*

  2. @Jun Can you share the steps to recompile your patched kernel zImage? I can recompile the kernel with Hyper-V support, but it seems still not work, so I guess I missed the proper patch for DSM6.0.2?

    Since there are considerable difference between beta source and the release version, I write and compile kernel modules instead, even the AMD kernel is a combination of the original kernel and the AMD support code compiled as module (sort of). I compile beta src kernel only to aid debugging, itself does not work properly, lacking required symbol etc, and I do not bother to fix it.

  3. Some Info for N54L users (AMD based)

    I burned the newest 1.01 Image on my USB Stick, adjusted PID, VID, SNR and MAC but still ran into "Booting the Kernel" without finding the NAS in my network.

     

    After i adjusted the timeout to '5' i had the chance to see the grub menu, where i could choose the AMD entry, which did the trick :smile:

     

    Thanks for the hard work :smile:

     

    I thought one second is enough :grin:

  4. I am currently running this on a QNAP NAS using its 'Virtualisation Station" which is a version of KVM.

     

    I've set up the synoboot.img as an IDE drive, but had to convert is to q2cows first, but apart from that it boots and works fine.

     

    The VM boots fine, I can find the diskstation via the synology assistant and the web page.

    I can start the PAT installation and it goes through OK until I hit the Error 13, which I know and understand is caused by mis-matched vid/pid, but how do I find the VID/PID for a IDE drive?

     

    I've also set this up using VMware and it boots, installs and works perfectly. The only difference I can see here between my Vmware install and my KVM is that the synoboot.img on the KVM is IDE and the VMware is SATA.

     

    My question is how did you find the PID/VID of the SATA drive on VMWare, as it's not booting from a USB disk? I'm 100% sure it will work in the KVM if I have any idea what VID/PID to use (BTW I did try using the same VID/PID given earlier for the Proxmox KVM, but this setup was using an emulated USB boot (Which is not available on the QNAP KVM) and not IDE/SATA.

     

    Any help or hints would be appreciated.

    you can try to attach the img as a sata disk, you can also use a already installed disk image to skip installation step.

  5. using "jun-amd-baremetal-hybrid-uefibios-arcao-v2.img" on a N54L and everything seems to work very well !

     

    However 2 "issues" to report :

    1) Processor is indicated to be a core i3

    2)security issue :

    tf6b.png

     

    Thank you Jun, Arcao & everyone making this possible !!! :smile:

    oops, so it is indeed better to not replace existing files, maybe I should provide a bugfix v1.01 to fix it

     

    The security issue was already reported to me on the French section and it was with Arcao's v.2 hybrid uefi/bios loader.

    normally this message can be ignored, since this just means some drivers are updated, but it's a bit annoying, so I will fix it when I have time

  6. Tested with new loader 28/10 CPU AMD by jun V1.0 ( 29/10 )

     

    I use only one HDD installed on motherboards INTEL running fine

     

    ---

    Motherboard is by HP Pegatron - M2N7B-LA and AMD X4-630

    CPU supported : Socket type: AM3 :

    AMD Phenom II X4 9xx/9xxe/8xx Quad-Core / AMD Phenom II X3 7xx/7xxe Triple-Core / AMD Phenom II X2 5xx / AMD Athlon X4 6xx/6xxe / AMD Athlon X3 4xx/4xxe / AMD Athlon X2 2xx/2xxe

    Problem : Diskstation not detected

    ---

     

    Motherboard Gigabyte GA-M61PME

    CPU supported : Socket AM3/ AM2+/ AM2 processors:

    AMD Phenom™ FX / AMD Phenom™ X4 / AMD Phenom™ X3 / AMD Athlon™ X2 / AMD Athlon™ / AMD Sempron™ X2 / AMD Sempron™

    Problem : Diskstation not detected

     

    I have no idea at the moment, any additonal info, logs?

    And any other AMD user could help?

    Maybe compile a kernel with graphic console will aid debugging

  7. BTW, how can i hide my IDE drive with loader from DSM?

    Adding

    set extra_args_3615='rmmod=ata_piix'

    doesn't work for me =(

     

    oops, good news is ata_piix works,

    bad news is seems not everyone loves it :smile:

    =) yeap.

    so is it possible to disable ata_piix?

     

    PS Thanks a lot for your work :wink:

    you can't at the memoent.

    if you intention is to move the ide drives out of the way,

    then DiskIdxMap boot paramenter will help, excerpt from source code comment

    /**

    * Modify disk name sequence. Each two characters define the start disk

    * index of the sata host. This argument is a hex string.

    *

    * Detail information:

    * http://synowiki.synology.com/MediaWiki/ ... _DiskIdMap

    *

    * For example, use DiskIdxMap=030600 will get the following result.

    * Disks of the 1st host: sdd, sde, sdf

    * Disks of the 2nd host: sdg, sdh, sdi

    * Disks of the 3rd host: sda, sdb, sdc

    */

     

    If in addition you do not want ide disk to be show up anywhere, there is a libata.force boot parameter to disable it.

    this option works on sata disks too, but it still occupies the corresponding /dev/sdx name, so should be used with above option together

    for example,

    if you have a boot log like this, and you want disable ata2 & ata3, boot parameter should be libata.force=2:disable,3:disable

    [ 2.886833] ata2: PATA max UDMA/33 cmd 0x1f0 ctl 0x3f6 bmdma 0x2110 irq 14

    [ 2.886836] ata3: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0x2118 irq 15

  8. using "jun-amd-baremetal-hybrid-uefibios-arcao-v2.img" on a N54L and everything seems to work very well !

     

    However 2 "issues" to report :

    1) Processor is indicated to be a core i3

    2)security issue :

    tf6b.png

     

    Thank you Jun, Arcao & everyone making this possible !!! :smile:

    oops, so it is indeed better to not replace existing files, maybe I should provide a bugfix v1.01 to fix it

  9. This was on existing xpenology VM, but I've created this VM manually a month ago. I think that it is possible to create a new VM (with serial port), upload and attach your disk image (vmdk + img files). My guest OS type is: Other 3.x or later Linux (64-bit).

    this version try to detect boot partition automatically, so manually built vm can work without change some magic numbers, but this feature is not fully tested

  10. I can't import OVF to ESXI 6.0 because I'm getting this error:

    Opening OVF source: d:\server\xpenology\ovf\ds3615.ovf
    Enter login information for target vi://10.11.11.1/
    Username: root
    Password: ********
    Error: Host name (root) resolve failed
    Warning:
    - No manifest file found.
    - Wrong file size specified in OVF descriptor for 'synoboot.vmdk' (specified: 0, actual 432).
    Completed with errors

    I'm using ovftool - what am I doing wrong?

    Sorry, I dont test ovf import, only try on VMware.

    What I think maybe go wrong is the file name and extension, try this

    first make sure you did not throw away synoboot.img, it is the real content, synoboot.vmdk is just a description file, if you did, put it back and try again.

    otherwise rename synoboot.img to synoboot-flat.vmdk

    open synoboot.vmdk with a text editor, make the same change to the line contains synoboot.img

    then try again

  11. It is saved in /grub/grubenv file, so it is permanent, but in a seperate file, this is the grub's way.

     

    Could there be any conflict if one would use the command line once thus editing /grub/grubenv and then edit the grub.cfg file manually with different data?

     

    Normally grub.cfg stores default configurations, and customization through grub command line interface will take precedence.

  12.  

    10/29:

    It's time to release a loader with a proper version number now.

    Here is my loader v1.0

    https://mega.nz/#F!18kB1BTB!1ft3N5Hnrcnqsneu0aQUkA

     

    New features & fix:

     

    Support bios & uefi boot & VMware & ESXI

    Fix cmos reset issue( at least on bios mode VMware workstation)

    most configurations can be done via grub command line now.

    Remember last boot entry.

    Autodetect synoboot partitions, not extensively tested. It is still recommended to set correct vid/pid.

    AMD CPU support, not extensively tested, there are a few positive report on the forum.

    Add grub menu for reinstallation.

    Add grub menu to force installation when interrupted due to "Disks Disabled" message, not extensively tested

    Automatically apply workaround for boards without serial port.

    Fix SATA disk order remap, and allow to set SAS disk starting no, but disk order are still not deterministic between SAS disks.

    Fix SAS disk naming, not extensively tested, only with one SAS2008 based HBA and synology provided mpt2sas driver.

    Add ata_piix support, tested on VMware and it does not crash, only complain about "Read current link speed fail", so I

    assume it works :smile:, this driver requires a bit of patching to the kernel, so I include it in the package.

     

    Integrate up-to-date network drivers compiled by Arcao and Trantor.

     

     

    Known issue:

    When runing on a slow single core machine, there is a race condition causes the patcher loading too late.

    the most obvious sign is console not working properly. I don't expected this to happen normally,

    the only example is a VM on my laptop when running on battery. If anyone believes have this issue,

    please send me a message.

     

    Some ethernet drivers crash when set MTU above about 4096(Jumbo frame), I've not identified the culprit yet.

     

     

    How to install:

     

    find the vid/pid of your usb drive

    Burn the image to the drive, optionally edit grub.cfg to set vid/pid and boot entry, OR

    connect monitor/keyboard/serial console to your Box.

    Press C during Grub boot menu to enter command line

    vid 0xXXXX
    pid 0xYYYY
    

    to configure pid and vid ("pid" and "vid" are command, and "XXXX", "YYYY" are you usb drive's vid,pid)

    (There are a few other options can be config this way, you can read grub.cfg to know more detail.)

    Press Esc to go back to boot menu

    Select baremeta/baremetal AMD entry, press enter to boot.

    If your encounter the "disk port disabled" error during installation, try the force install menu entry.

    if both option does not work, you have to fallback to SataPortMap method,

    type this line in grub command line, replace XX with appropriate value.

    append SataPortMap=XX

     

    Jun,

     

    Does configuring grub (vid/pid, SataPortMAp=) through command line apply changes to grub.cfg file permanently?

    It is saved in /grub/grubenv file, so it is permanent, but in a seperate file, this is the grub's way.

  13. BTW, how can i hide my IDE drive with loader from DSM?

    Adding

    set extra_args_3615='rmmod=ata_piix'

    doesn't work for me =(

     

    oops, good news is ata_piix works,

    bad news is seems not everyone loves it :smile:

  14. Hello!

     

    I tried a new install DSM 6 in my HP Gen8.

     

    I used Arcao latest image V2.

     

    1. Make bootable usb.

    2. Edite grub.cfg with valid VID+PID and gen8 mac address, with original serial.

    3. Boot

    4. I found the nas with web assistant.

    5. I tried install and i received the 13 error message.

     

    The Vid and PID is OK. Somebody has an idea what's the problem?

     

    Do you have a valid MAC-SN combination in your grub.cfg (matching with your real MAC)?

    I think MAC and SN are not used during installation, in fact, I am not aware that MAC/SN has any particular relationship between each other.

  15. I have some questions.

     

    1. I have a Xpeno Nas DSM 5.2 currently running on bare metal AMD PC. Can I migrate to DSM 6.0?

    2. I saw your instruction how to setup SataPortMap. It's useful.

    I'm however just confused how we call which one is controller 1, 2, 3, blah..blah... :oops:

    let say I have a mobo that has 3 sata ports. I attached 2 more sata cards that has 2 ports and the other 4 ports to build my 9 HDDs nas. So, in this case, which one should I setup for SataPortMap?

    It should be SataPortMap=234, SataPortMap=243, SataPortMap=324, SataPortMap=342, SataPortMap=432, or SataPortMap=423?

    An extra question. What if I set it wrong?

    3. What's wrong if I use Windows Notepad instead of Notepad++ to edit grub.cfg?

    4. Because the value "console=ttyS0,115200n8" is unique, people don't have to change console=uart,io,0x3f8,115200n8 to console=ttyS0,115200n8 if you originally changed and posted?

     

    Finally, thank you very much for the tutorial. It helps me as a newbie a lot.

     

    I've uploaded a patched kernel for AMD users on the original post, but its not tested at the moment, you could have a try if you are brave enough :grin:

  16. Yeah, there is bug in loading kernel modules in Jun's modification. At first DISK_MODULES are loaded from ramdisk in /linuxrc.syno, that's ok. In /sbin/post.init are EXTRA_MODULES copied to hdd only when they are not exist and they are then loaded after chroot from hdd (in hdd's /etc.default/rc). So:

    • The installation step replace kernel modules (e.g. e1000e) with their version from pat file that cause not loading our updated kernel modules from ramdisk. Thus we have to replace these bad modules after reboot with version from ramdisk.
    • Also rc.modules file is not updated after first copy in the installation step. Thus when is updated from Jun's original ramdisk to my ramdisk v1, added kernel modules are not loaded. This explain why my network card didn't work with Trantor's r8169 module because the important r8168 wasn't loaded.

     

    I will fix both in my v2 ramdisk.

    I dont think this is a bug on my part, but your are welcome to make any change you see fit.

  17. nope, it just not exported.

    That is not a big problem, comment out any usage to make it compile, its only function is reordering disk numbers, and we can live without it.

    The real problem is some kernel structures have extra fields in synology kernel, disble this option just cause more mismatches.

  18. Hi,

     

    I tried to install on bare-metal MSI N3150I ECO ITX board (celeron N3150), but installer always fails at 58% with error "Failed to install the file. The file is probably corrupted. (13)". On same setup i have installed latest 5.2 XPEnoboot without any problems. Any insights on this problem ?

     

    maybe you did not change the vid/pid, so the installation process can not find the synoboot partitions.

     

    I should make it clear that you need to change vid/pid BEFORE installation.

     

    PS: DS716/916 should have better compatibility with your hardware, I'll release a DS916 version later when I can test it properly.

     

     

    A newbie here, thanks Jun and thanks all of you pay effort that made this awesome things happened!!

     

    I was wonder if there is any possible to port this loader for DS716 version?

     

    Since I have a bare machine with N3150 chips, and would be so great if I can have hardware encoding option :smile:

     

    I used modified DS916+ on a J3160 board, hw transcoding seems work.

  19. Hi! How did you make it work. I got almost the same Mobo only without DC. I made a boot flash, it offered me to migrate. and after uploading 8451.pat it shows error 13 (file corruption).

    I tried to download last firmware from migrating tool and directly from my computer. nothing hepled.

     

    I used Jun's bare metal UEFI DSM 6 bootloader from OP (opening post) and updated grub.cfg:

    serial --port=0x3F8 --speed=115200
    terminal_input serial
    terminal_output serial
    set default='0'
    set timeout='1'
    set fallback='0'
    insmod part_msdos
    insmod part_gpt
    
    set locale_dir=$prefix/locale
    set lang=en_US
    
    menuentry 'Synology DS3615xs' --class os {
    insmod fat
           set img=$prefix/../image/DS3615xs
    linux $img/zImage root=/dev/md0 syno_hdd_powerup_seq=0 netif_num=1 HddHotplug=0 syno_hw_version=DS3615xs vender_format_version=2 vid=0x0781 pid=0x5583 console=ttyS0,115200n8 sn=xxxxxxx mac1=xxxxxxx withefi elevator=your_magic_elevator quiet
    initrd $img/ramdisk.lzma
    } 
    

     

    Replace VID, PID, sn and mac1 with yours.

     

    Make sure you have enabled COM port in UEFI BIOS, also switch to UEFI boot. Then boot up and open browser to find.synology.com. There click on Install latest DSM button (no need to select any pat, it will download correct one automatically). After restart you will have NAS updated to DSM 6.0.2-8451. Don't forget to perform update to DSM 6.0.2-8451 Update 2 via Control panel.

    Thanks for response.

    I've made everything as you described, but it's not working.

    I have ASRock J3160TIX. updated UFI to v1.3

    Made a clear CMOS, Enabled(by default) COM Port to address 3F8h/IRQ4

    advanced\USB Support\ Switched to UEFI setup only

    Tried to change HDD to new one.

    Booted from 1st efi partition, and the second UEFI and had the same result - > Failed to install the file. The file is probably corrupted (13)

     

    Could you write all uefi settings that you have?

    Do you use PCIe sata or using ASMedia sata3?

    J3160ITX is one of my test boards, so it is expected to work out of box, if you set VID/PID to match your usb drive.

    Edit:

    [spoiler=]one thing I forget to mention, you'd better plug your usb stick in a USB2 port, usb3 port has some issue duration installation if I recall correctly.

     

    It turn out that my impression was wrong, please ignore this.

  20. Is it possible to use isolinux to boot the kernel and ramdisk?

    I put the provided zImage and ramdisk.lzm(a) and use isolinux to generated iso with syslinux.cfg something like below:

    LABEL install

     

    MENU LABEL XPEnology DSM 6.0.2-8451 Install/Upgrade

     

    KERNEL ../zImage

     

    INITRD ../ramdisk.lzm

    APPEND root=/dev/md0 ihd_num=0 netif_num=4 syno_hw_version=DS3615xs sn=xxxxxxx console=ttyS0,115200 mac1=xxxxxxxxx vid=0x0EA0 pid=0x2168 loglevel=0 syno_hdd_powerup_seq=0 HddHotplug=0 vender_format_version=2 upgrade=6.0.2-8451

     

    In hyper-V it boots and I can see VM screen:

    Loading ../zImage... ok

    Loading ../ramdisk.lzm... ok

    Decompressing Linux... Parsing ELF... done.

    Booting the kernel.

     

    Then nothing else, and find.synology.me cannot connect in browser.

     

    Anyone can help and figure out the reason? Is that so the kernel and ramdisk has to be booted using EFI way?

     

    I dont know anything specific about Hyper-V, but in general, is is not possible to install this version with ISO only, but use ISO to load an installed version should be fine.

    The reason is DSM installer expect writable synoboot1/synoboot2 partitions, and I dont attemp to change this part of logic.

  21. Might be worth putting a big notice in the original thread so N54L/AMD users know this as originally people suspected that it was just due to missing network card drivers as opposed to the system not booting,

    To my surprise, I've seen report that AMD E-350 box works.

  22. I can't post a log as there is no SSH access however the N54L appears to freeze during/after PCI enumeration which would explain why nobody can find the device on Synology Assistant or on their network.

     

    I was looking for a core dump or something to pinpoint where it was failing but nothing obvious stood out, the below is all I found out.

     

    Last messages in the boot process are similar to the below:

     

    [ 0.193677] NET: Registered protocol family 2

    [ 0.194016] TCP established hash table entries: 65536 (order: 7, 524288 bytes)

    [ 0.194303] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)

    [ 0.194726] TCP: Hash tables configured (established 65536 bind 65536)

    [ 0.194791] TCP: reno registered

    [ 0.194799] UDP hash table entries: 4096 (order: 5, 131072 bytes)

    [ 0.194869] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)

    [ 0.194985] NET: Registered protocol family 1

     

    Prints a couple lines like:

     

    [ 0.193611] pci_bus 0000:02: resource 0 [io 0xc000-0xcfff]

    [ 0.193612] pci_bus 0000:02: resource 1 [mem 0xfe600000-0xfe7fffff]

    [ 0.193613] pci_bus 0000:02: resource 2 [mem 0xfe000000-0xfe1fffff 64bit pref]

     

    then freezes

    The synology kernel do not have AMD CPU support compiled in, so it is expected that AMD box can not run properly.

    Adding support requires a full recompilation from source or some non-trivial patch to the synology kernel, both solution has its own difficulties.

    I personally does not have the hardware, so It may be a long wait before something positive happens.

  23. I tried

     

    I'm not familiar with linux but willing to try; I was thinking that I could mount the image and then edit the file from winscp, but can't. I'll look for another editor

     

    edit:

    edited and saved with vi editor, still has the old sn after restarting the vm.

     

    winscp is fine, but it maybe not easily be connected as root user.

    so you need change the above mount line as something like this, to give non-root use full access to the boot partition.

    mount -o umask=0 /dev/synoboot1 /mnt

     

     

    there are a few possible reasons cause it not got saved:

    1. your boot disk is set to non-persistence

    2. you did not properly umount the disk after editing.

    3. vi is not really beginner friendly.

  24. My pc restarts (win10) when I try to disconnect the vmdk, nothing saved; VMware® Workstation 12 Pro (12.5.0 build-4352439)

     

    if you are comfortable with shell, just ssh into DSM, type

     

    echo 1 > /proc/sys/kernel/syno_install_flag

    mount /dev/synoboot1 /mnt

    /mnt/grub/grub.cfg

    umount /mnt

×
×
  • Create New...