Back up synoboot after each DSM update so you can recover from a corrupt USBDOM or EEPROM

  • Ab sofort steht euch hier im Forum die neue Add-on Verwaltung zur Verfügung – eine zentrale Plattform für alles rund um Erweiterungen und Add-ons für den DSM.

    Damit haben wir einen Ort, an dem Lösungen von Nutzern mit der Community geteilt werden können. Über die Team Funktion können Projekte auch gemeinsam gepflegt werden.

    Was die Add-on Verwaltung kann und wie es funktioniert findet Ihr hier

    Hier geht es zu den Add-ons

Very interesting, thanks for the insides and details. I could reproduce what you are describing.

DS423+
Code:
cat /proc/sys/kernel/syno_hw_version
DS423+
"synogetkeyvalue /etc/synoinfo.conf pushservice_dsserial" delivers the serial-number as does "cat /proc/sys/kernel/syno_serial" etc.

DS214+
Code:
cat /proc/sys/kernel/syno_hw_version
DS214+-j

ls /dev | grep -E 'syno|boot'
synobios

cat /dev/mtd
cat: /dev/mtd: No such file or directory

dmidecode -s system-serial-number
-ash: dmidecode: command not found

There are /dev/mtd0, /dev/mtd1, ... but these output some binary stuff. "synogetkeyvalue /etc/synoinfo.conf pushservice_dsserial" delivers the serial-number as does "cat /proc/sys/kernel/syno_serial"
 
  • Like
Reaktionen: Adama
On some devices /proc/cmdline contains key/value pairs for the model number, serial number, and the MAC addresse(s): e.g. syno_hw_version=DS1817+, sn=###..., macs=001132######,001132######,...
but I have read that this is not general.
 
  • Like
Reaktionen: dil88
DSM mounts the USBDOM at boot as /dev/synoboot. It mounts the 2 partitions on the USBDOM as synotboot1 and synoboot2.

For those 2 and 4 bay Synology models that don't have /dev/synoboot I assume it's because the smaller, cheaper, models don't have a USBDOM.
Try "cat /proc/sys/kernel/syno_serial".
Works on 7.2.2, too...
Nice.

Does cat /proc/sys/kernel/syno_hw_version[/CODE] return the correct model?

EDIT never mind. I see you already answered this in a previous comment.
 
Code:
cat /proc/sys/kernel/syno_hw_version

On my DS918+ I get DS918+

On my DS420+ I get DS420+

On my DS413 I get DS413-j
 
  • Like
Reaktionen: DaveR und dil88
DS214+
Code:
dmidecode -s system-serial-number
-ash: dmidecode: command not found
I just remembered that my scripts don't use dmidecode because DSM 6 does not have dmidecode.
 
I use DSM 7.1.1 on my DS214+ and that doesn't provide dmidecode, too.
 
  • Like
Reaktionen: DaveR
And even on 7.2.2 it's not really usable:

Code:
root@GalacticaNAS1:~# dmidecode -s system-serial-number
123456789
 
  • Like
Reaktionen: DaveR
I just checked DSM 7.2.1 and out of the 117 NAS models that can use DSM 7.2.1 only 87 of them have dmidecode. I don't know why that is, and I probably won't bother investigating as dmidecode is not usable for this topic.
 
v1.0.1
- Bug fix for not getting the serial number in some situations.
- Bug fix for some models returning extra characters after the model.

https://github.com/007revad/Synoboot_backup/releases

I'm still trying to find how to backup the DOM or EEPROM on models that don't have /dev/synoboot (which I assume is because they don't have a USBDOM).
 
  • Like
Reaktionen: ctrlaltdelete
Thanks for your great work!

I have a few questions regarding this script:
  • Do you know which models have a USBDOM? / EEPROM? (I have a DS920+) Is it determined by the existence of the file under /dev/synoboot?
  • How can you detect if the USBDOM / EEPROM is corrupted? So what is the case that this backup will be needed?
  • How can you restore a backed‑up synoboot in case of a failure?
 

Additional post fields

 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat