jun

DSM 6.1.x Loader

Recommended Posts

WRT the "improper shutdown" issue..

 

I've been digging around in some logfiles and config files via SSH..

 

It looks like there is a little script that checks for the presence of some files..

If there is a file called var/.NormalShutdown present, the error message (improper shutdown) does not appear. I have tested this by creating the file, shutting the box down and then starting it up again. With the file present, I don't get the error..

If this file is not present, the script creates another file called tmp/.ImproperShutdown

The presence of this file - checked by another script - determines that an 'improper shutdown' has occured - and we get the error message..

 

It looks to me that the shutdown process (I haven't looked into that) is either in error (and it's not creating that .NormalShutdown file - even though there are no logs that I can find that suggest it is in an error state)

OR

The shutdown process is fine but there is a bug (and the file simply isn't being created)..

 

Thoughts??

 

edit.. Thanks FiberInternetUser for the info.. Yeah, I noticed those earlier, when looking at my logs.

How do I disable TTY please?

 

#H

Share this post


Link to post
Share on other sites

I am using the Hybrid UEFI/BIOS baremetal image is ok to boot up the dsm,

the usb vid/pid should be edited before you boot up.

 

6Ak9bwd.jpg

 

Also i using the btrfs format on single disk, will try to build up with RAID1 on btrfs later.

No any error when the DSM update to newest vision 6.0.2.8451 update1.

 

KQFK7O5.jpg

 

My Testing Computer Spec:

-i5 2500K

-ASUS P8B75M

-16GB

-Onboard LAN and SATA

 

 

Sorry with my poorest english. :oops::oops:

Share this post


Link to post
Share on other sites
WRT the "improper shutdown" issue..

 

I've been digging around in some logfiles and config files via SSH..

 

It looks like there is a little script that checks for the presence of some files..

If there is a file called var/.NormalShutdown present, the error message (improper shutdown) does not appear. I have tested this by creating the file, shutting the box down and then starting it up again. With the file present, I don't get the error..

If this file is not present, the script creates another file called tmp/.ImproperShutdown

The presence of this file - checked by another script - determines that an 'improper shutdown' has occured - and we get the error message..

 

It looks to me that the shutdown process (I haven't looked into that) is either in error (and it's not creating that .NormalShutdown file - even though there are no logs that I can find that suggest it is in an error state)

OR

The shutdown process is fine but there is a bug (and the file simply isn't being created)..

 

Thoughts??

 

edit.. Thanks FiberInternetUser for the info.. Yeah, I noticed those earlier, when looking at my logs.

How do I disable TTY please?

 

#H

 

To Hostilian: What I did to disable the tty service was to rename the tty.conf file in /etc/init .. the command I used was "mv /etc/init/tty.conf /etc/init/tty.conf.not .. then do a restart and check again with dmesg | grep tty. Thanks for info about .NormalShutdown file.

 

YMMV

Share this post


Link to post
Share on other sites
Just rename the file? Nice one! :smile:

 

I can confirm that simply renaming the file seems to do the trick. No more spam. :razz:

Share this post


Link to post
Share on other sites

I’ve finally managed to free up the remaining hard drives from the old 5.2 box and properly setup RAID 10 on this one.

Everything is still working even after multiple restarts, namely:

- BTRFS as RAID-10

- Packages install

- DSM Updates

- QuickConnect

- Recognizes my APC UPS

- USB 3.0 working

 

A few people have mentioned that they were getting improper shutdown messages but luckily I am not seeing that on my end.

Just to summarize the steps, here is what I did:

- Got the image from Setsunakawa (Big thanks again!)

- Mounted the image with Passmark OSFMount and edited grub\grub.cfg file by changing vid, pid, serial, mac, and adding rmmod=ata_piix (I didn’t have to add SataPortMap= )

- Wrote the edited image to USB stick using Win32 Disk Imager

- In the BIOS I left AHCI and serial port enabled and everything else as default

- Once I booted the box from USB and it got to the screen telling me there are no suitable video devices, I used Synology Assistant from another computer to find it and right-clicked on the device and selected “Install”

- Downloaded the latest PAT file for DS3615xs from Synology and pointed the installer to it

- Accepted all default settings and even setup QuickConnect

- After installation was complete, I updated DSM to the latest version and installed couple of packages

- Then I built RAID 10 and 1 volume using BRTFS

 

The only thing that I have noticed out of ordinary so far is that it’s showing i3 CPU with 2 Cores and I have i5 with 4 cores. Do you think this could affect the performance? Also, for the RAID it shows disk 1, 2, 3, 5 are occupied. Not sure why it would skip disk 4? I only have 4 sata ports.

 

Below are my specs:

- Intel Core i5 3570S 3.1 GHz

- 8GB RAM DDR3 SDRAM - non-ECC 1600 MHz PC3-12800 unbuffered

- HP OEM motherboard with Intel Q77 Express (Ivy Bridge)

- IDE Controller: Standard SATA AHCI Controller

- Network Adapter: Intel 82579LM Gigabit Network Connection

- Four 4TB NAS HDD SATA III w/ 64MB Cache

Edited by Guest

Share this post


Link to post
Share on other sites
that it’s showing i3 CPU with 2 Cores and I have i5 with 4 cores

Known issue.. I'm sure your system really sees i5 and 4 cores.. :smile:

You can check with SSH - look for the commands in this thread!

Share this post


Link to post
Share on other sites
Hi Jun.

 

Would it be possible to make a RS18016xs+ Version? This one have SAS Support, and should support the LSI-9211 card.

 

Is it easy to change this my self?

I tried changing DS3615xs to RS18016xs+ in the grub.cfg file, but no luck.

 

Thank you very much for this great boot image.

I believe you have to replace the image as the rackmounts have a different image which needs to run. I'm going to have a play later with redoing the bootloader using the image from the RS as if the kernel patch works for the DS series it should also work for the RS with the right files. This will not only give native LSI SAS support but also proper drive numbering using the LSI SAS cards too which you can't do right now due to the way LSI work.

Share this post


Link to post
Share on other sites
Hi Jun.

 

Would it be possible to make a RS18016xs+ Version? This one have SAS Support, and should support the LSI-9211 card.

 

Is it easy to change this my self?

I tried changing DS3615xs to RS18016xs+ in the grub.cfg file, but no luck.

 

Thank you very much for this great boot image.

I believe you have to replace the image as the rackmounts have a different image which needs to run. I'm going to have a play later with redoing the bootloader using the image from the RS as if the kernel patch works for the DS series it should also work for the RS with the right files. This will not only give native LSI SAS support but also proper drive numbering using the LSI SAS cards too which you can't do right now due to the way LSI work.

 

That would be great !!!

 

Just fyi, it's not all the RS versions that are sas compatible, as far as I can find on synology's page, it's only these: RS18016xs+, RC18015xs+ and RS10613xs+, where the RS18016xs+ is the most up-to-date one.

Is it possible to find these files on the web, or do we need some one with access to a RS18016xs+?

 

Thanks.

Share this post


Link to post
Share on other sites

That would be great !!!

 

Just fyi, it's not all the RS versions that are sas compatible, as far as I can find on synology's page, it's only these: RS18016xs+, RC18015xs+ and RS10613xs+, where the RS18016xs+ is the most up-to-date one.

Is it possible to find these files on the web, or do we need some one with access to a RS18016xs+?

 

Thanks.

Yup the PAT file does actually contain the BIOS files required, I know that Trantor was playing around with creating a bootloader using the RS18016xs+ (I started looking at the files and it seemed to get Trantor intrigued) but at the time it was based on the DS kernel patches. If Juns bootloader can patch anything and not just the DS series, then it should be a matter of simply extracting the right images from the RS PAT file, re-compacting in to the image for the bootloader and edit grub like you did.

 

In fact, you might be able to use the image trantor created, search either for my name or the RS18016xs+ and it should pull up my thread... he posted an image in there and it contains the modified zimage for the RS; that might work now with this new loader... Not sure if you need to merge it or extract, replace the core bits... I'm not sure!

Share this post


Link to post
Share on other sites

Yup the PAT file does actually contain the BIOS files required, I know that Trantor was playing around with creating a bootloader using the RS18016xs+ (I started looking at the files and it seemed to get Trantor intrigued) but at the time it was based on the DS kernel patches. If Juns bootloader can patch anything and not just the DS series, then it should be a matter of simply extracting the right images from the RS PAT file, re-compacting in to the image for the bootloader and edit grub like you did.

 

In fact, you might be able to use the image trantor created, search either for my name or the RS18016xs+ and it should pull up my thread... he posted an image in there and it contains the modified zimage for the RS; that might work now with this new loader... Not sure if you need to merge it or extract, replace the core bits... I'm not sure!

 

That sounds great, thank you. I'll try and give that a go tomorrow.

Share this post


Link to post
Share on other sites

Not too worried, maybe, but I presume an unclean shutdown will result in DSM starting a 'parity check' each time, which may take 2 days or so, putting a lot of extra stress on your array for the duration! (Even when it's just 'read', like maybe half the stress of a full rebuild?)

 

So, while I applaud the OP's brilliant (and most hopeful, so far) initiative, if at all possible, I'd like the 'unclean shutdown' thing resolved too, please.

Not that I've seen..

Disks and CPU are zero % after booting up - every time - after seeing this message about the improper shutdown. I don't think it's doing a parity check - or anything, really.

 

My box was powered down using either the power option on the console, the shutdown or poweroff commands (at a SSH terminal), so it was 'going down properly'.. It didn't suddenly switch itself off and reboot..

Personally, I think it's a bug (and there have been previous notifications on 'actual' synology devices about this bug) but it would be nice to resolve it..

 

#H

After testing the dual UEFI/Legacy build (bare metal) on motherboards with/without a physical serial port, I don't see the errors with motherboards that have a physical serial port. No errors are displayed or logged after a reboot or a shutdown/restart. I do see the errors with motherboards that don't have a physical serial port.

 

After doing some research on some of the Synology NAS models, it appears some models do have a physical serial port. This is not exposed to the user. I have read articles where some owners have opened their Synology NAS's to physically connect up the serial comm port. The main reason for doing this was to recover from a "Bricked Unit". On reboot or shutdown/restart the following is logged in the "messages" logs for motherboards without a physical serial port.

 

2016-10-02T19:34:23-04:00 Test-NAS60 synoscgi_SYNO.Core.System_1_shutdown[12971]: system_sys_init.c:90 synopoweroff: System is going to poweroff
2016-10-02T19:34:23-04:00 Test-NAS60 [  320.740657] init: synonetd main process (4969) killed by TERM signal
2016-10-02T19:34:23-04:00 Test-NAS60 [  320.741148] init: synostoraged main process (9548) terminated with status 15
2016-10-02T19:34:23-04:00 Test-NAS60 [  320.742680] init: hotplugd main process (11016) killed by TERM signal
2016-10-02T19:34:23-04:00 Test-NAS60 [  320.743111] init: smbd main process (11382) killed by TERM signal
2016-10-02T19:34:23-04:00 Test-NAS60 [  320.835177] init: syno_poweroff_task main process (13011) terminated with status 1

 

Logs from motherboard with physical serial port

 

2016-09-27T20:18:29-05:00 Test-NAS48 [ 1373.178048] init: synonetd main process (5536) killed by TERM signal
2016-09-27T20:18:29-05:00 Test-NAS48 [ 1373.178468] init: synostoraged main process (10964) terminated with status 15
2016-09-27T20:18:29-05:00 Test-NAS48 [ 1373.179553] init: hotplugd main process (12425) killed by TERM signal
2016-09-27T20:18:29-05:00 Test-NAS48 [ 1373.184887] init: smbd main process (12631) killed by TERM signal
2016-09-27T20:18:29-05:00 Test-NAS48 syno_poweroff_task: System is acting poweroff.

 

Also, as stated in the post from jun on Page 1, if your motherboard does not have a physical serial port the logs will fill up with the following, if you don't stop/disable the tty service:

 

2016-10-02T19:33:46-04:00 Test-NAS60 [  283.376096] init: tty main process ended, respawning
2016-10-02T19:33:56-04:00 Test-NAS60 [  293.377424] init: tty main process (12828) terminated with status 1
2016-10-02T19:33:56-04:00 Test-NAS60 [  293.377449] init: tty main process ended, respawning
2016-10-02T19:34:06-04:00 Test-NAS60 [  303.378699] init: tty main process (12846) terminated with status 1

 

To see if you are getting the tty errors, you can check your logs. SSH in, use the following command "dmesg | grep tty"

 

Hope this information is helpful.

 

Right, this is another issue of missing console, I am thinking about a proper (out of box) workaround.

 

root@test:~# grep -r "^console output$" /usr/ 2> /dev/null
/usr/share/init/syno_poweroff_task.conf:console output
/usr/share/init/burnin_loader.conf:console output
/usr/share/init/udevtrigger.conf:console output
/usr/share/init/bs-poweroff.conf:console output
/usr/share/init/udevd.conf:console output

 

Notice that above service want to output to a console, so they will failed to start for the unlucky guys :smile: .

Simply change "console output" to "console none" should work.

 

I thought most board had a serial port, even if not populated, could always be seen by software if enabled, it is a standard part of PC, is that not the case?

In my case, all of my boards have serial headers, I just need to enable it somewhere in BIOS. OK, my boards are mainly Asrock ones, so maybe my observation is biased. :grin:

For debugging purpose, I add a DB9 connector to the serial header, but that is not required for normal users.

Share this post


Link to post
Share on other sites

Thanks for feedback jun. I changed the console output on the following service only ... /usr/share/init/syno_poweroff_task.conf:console output ... from "console output" to "console none". After reboot the error of "improper shutdown" is gone.

Share this post


Link to post
Share on other sites

 

Right, this is another issue of missing console, I am thinking about a proper (out of box) workaround.

 

root@test:~# grep -r "^console output$" /usr/ 2> /dev/null
/usr/share/init/syno_poweroff_task.conf:console output
/usr/share/init/burnin_loader.conf:console output
/usr/share/init/udevtrigger.conf:console output
/usr/share/init/bs-poweroff.conf:console output
/usr/share/init/udevd.conf:console output

 

Notice that above service want to output to a console, so they will failed to start for the unlucky guys :smile: .

Simply change "console output" to "console none" should work.

 

I thought most board had a serial port, even if not populated, could always be seen by software if enabled, it is a standard part of PC, is that not the case?

In my case, all of my boards have serial headers, I just need to enable it somewhere in BIOS. OK, my boards are mainly Asrock ones, so maybe my observation is biased. :grin:

For debugging purpose, I add a DB9 connector to the serial header, but that is not required for normal users.

 

I also have an ASROCK, but unfortunately mine doesn't have a serial port.

 

Anyway, I edited those files and the "improper shutdown" notice is gone.

Share this post


Link to post
Share on other sites
Thanks for feedback jun. I changed the console output on the following service only ... /usr/share/init/syno_poweroff_task.conf:console output ... from "console output" to "console none". After reboot the error of "improper shutdown" is gone.

 

^^ Brilliant work! Thank you! :smile:

Share this post


Link to post
Share on other sites

No luck getting the baremetal install to work on my Asrock ITX Board with an LSI 9211 in IT Mode.

 

Modified the .cfg and it says it can't detect any hard drives.

 

Clearly I'm missing something here.....

 

serial --port=0x3F8 --speed=115200
terminal_input serial console
terminal_output serial console
set default='0'
set timeout='1'
set fallback='0'

menuentry 'Synology DS3615xs' --class os {
insmod	fat
linux	/image/DS3615xs/zImage root=/dev/md0 syno_hdd_powerup_seq=0 netif_num=1 HddHotplug=0 rmmod=ata_piix syno_hw_version=DS3615xs vender_format_version=2 vid=0x0781 pid=0x5571 console=uart,io,0x3f8,115200n8 sn=C7D31L32CMNK mac1=408D5C0C6DB7 withefi elevator=your_magic_elevator quiet
initrd	/image/DS3615xs/ramdisk.lzma
}

 

Suggestions?

Share this post


Link to post
Share on other sites

The DS series DOES NOT have support for any SAS based HBA. There is specific code in the PAT files for those models that disregards any SAS HBA detected drives; you need to patch that out like team did originally so it detects as SATA and not SAS.

 

I'm going to take a look at the rackstation models that support SAS as I'm hoping that the new bootloader can patch those too, in which case we can have two different bootloaders, one for pure SATA systems and one for SAS based systems.

Share this post


Link to post
Share on other sites
The DS series DOES NOT have support for any SAS based HBA. There is specific code in the PAT files for those models that disregards any SAS HBA detected drives; you need to patch that out like team did originally so it detects as SATA and not SAS.

 

I'm going to take a look at the rackstation models that support SAS as I'm hoping that the new bootloader can patch those too, in which case we can have two different bootloaders, one for pure SATA systems and one for SAS based systems.

After reviewing the RS3617xs vs RS18016 models for SAS and HBA's, I think the RS3617xs model is best suited to go after. It also has mp2tsas and mpt3sas drivers compiled for it out of the box. Not to mention it is their current flagship that won't dissappear for a while.

 

Sent from my SM-N930T using Tapatalk

Share this post


Link to post
Share on other sites

Many thanks to the devs, your hardwork is appreciated!

Playing around with the esxi version, everything has been up and running for days now.. not a single issue thus far. BTFRS, Hyperbackup and a few other apps working flawlessly.

Extremely excited for the 9211 card support to be implemented, so I can pass my big arrays through. =)

 

Thanks again, devs.

Share this post


Link to post
Share on other sites
Has anyone been able to update dsm 5 to dsm 6 with this loader while keeping all settings and apps. So far all my attempts end up requiring that I do an install/migration because supposedly my drives came from another 3615xs machine.

 

Anyone?

Edited by Guest

Share this post


Link to post
Share on other sites
The DS series DOES NOT have support for any SAS based HBA. There is specific code in the PAT files for those models that disregards any SAS HBA detected drives; you need to patch that out like team did originally so it detects as SATA and not SAS.

 

I'm going to take a look at the rackstation models that support SAS as I'm hoping that the new bootloader can patch those too, in which case we can have two different bootloaders, one for pure SATA systems and one for SAS based systems.

After reviewing the RS3617xs vs RS18016 models for SAS and HBA's, I think the RS3617xs model is best suited to go after. It also has mp2tsas and mpt3sas drivers compiled for it out of the box. Not to mention it is their current flagship that won't dissappear for a while.

 

Sent from my SM-N930T using Tapatalk

Ah yes, I had forgot that they had released a new model! I'm not sure what Jun has done with the bootloader but has your experience with it so far indicated that it should be ok? The RS PAT files contain all they need so we just need the loader to be able to patch the kernel.

Share this post


Link to post
Share on other sites
The DS series DOES NOT have support for any SAS based HBA. There is specific code in the PAT files for those models that disregards any SAS HBA detected drives; you need to patch that out like team did originally so it detects as SATA and not SAS.

 

I'm going to take a look at the rackstation models that support SAS as I'm hoping that the new bootloader can patch those too, in which case we can have two different bootloaders, one for pure SATA systems and one for SAS based systems.

After reviewing the RS3617xs vs RS18016 models for SAS and HBA's, I think the RS3617xs model is best suited to go after. It also has mp2tsas and mpt3sas drivers compiled for it out of the box. Not to mention it is their current flagship that won't dissappear for a while.

 

Sent from my SM-N930T using Tapatalk

 

I'm nut sure that I agree that the RS3617xs is the one to user for native SAS support.

Just to be clear, I have no idea about the code, or if they have mp2tsas drivers :smile: but on Synology's comparability guide, it's only RS18016xs+, RC18015xs+ and RS10613xs+ that supports SAS.

The RS3617xs might be newer, but the RS18016xs+ costs twice as much. They both use the same CPU.

Share this post


Link to post
Share on other sites

So Jun has confirmed that we need to establish the PCI devices in the model we wish to run in order to then modify the patcher to run correctly.

Share this post


Link to post
Share on other sites
Has anyone been able to update dsm 5 to dsm 6 with this loader while keeping all settings and apps. So far all my attempts end up requiring that I do an install/migration because supposedly my drives came from another 3615xs machine.

 

Anyone?

 

 

Sent from my iPhone using Tapatalk

 

Yesterday I updated with migration on two servers in my signature: the first with DSM6.0.1-7393 to DSM6.0.2;

second with DSM5.2-last to DSM6.0.2 - Update OK, all data and applications remain. Then DSM6.0.2 asked to upgrade some applications (for use in DSM6.0.2). Website with virtual hosts works fine, too.

 

I changed - VID, PID, SN and MAC addresses

I replaced the ramdisk.lzma file on the USB drive with the one in Jun's image (second link above) at \image\DS3615xs (in the post, a few pages earlier: viewtopic.php?f=2&t=20216&start=110#p73472)

 

my grub.cfg - 1 server

 

set default='0'
set timeout='2'
set fallback='0'

menuentry 'Synology DS3615xs' --class os {
  insmod   fat
  linux   /image/DS3615xs/zImage root=/dev/md0 syno_hdd_powerup_seq=0 netif_num=1 HddHotplug=0 SataPortMap=2 syno_hw_version=DS3615xs vid=0x**** pid=0x**** console=uart,io,0x3f8,115200n8 sn=********** mac1=********** withefi elevator=your_magic_elevator quiet
  initrd   /image/DS3615xs/ramdisk.lzma
}

 

my grub.cfg - 2 server

set default='0'
set timeout='2'
set fallback='0'

menuentry 'Synology DS3615xs' --class os {
  insmod   fat
  linux   /image/DS3615xs/zImage root=/dev/md0 syno_hdd_powerup_seq=0 netif_num=1 HddHotplug=0 SataPortMap=5 syno_hw_version=DS3615xs vid=0x**** pid=0x**** console=uart,io,0x3f8,115200n8 sn=********** mac1=********** withefi elevator=your_magic_elevator quiet
  initrd   /image/DS3615xs/ramdisk.lzma
}

Edited by Guest

Share this post


Link to post
Share on other sites
So Jun has confirmed that we need to establish the PCI devices in the model we wish to run in order to then modify the patcher to run correctly.

 

Can you elaborate a bit on that, what do you mean by "establish the PCI" ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now