11

I'm trying to identify an embedded Linux distribution. Here are the commands I have typed so far:

$ uname -a
Linux LIN-SRV-EMB01 3.10.105 #25556 SMP Sat Aug 28 02:14:22 CST 2021 x86_64 GNU/Linux synology_bromolow_rs3412rpxs

$ lsb_release
-sh: lsb_release: command not found

$ ls /usr/lib/os-release
ls: cannot access /usr/lib/os-release: No such file or directory

$ cat /proc/version
Linux version 3.10.105 (root@build1) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25556 SMP Sat Aug 28 02:14:22 CST 2021

$ cat /proc/cmdline
root=/dev/md0 netif_seq=2130 ahci=0 SataPortMap=34443 DiskIdxMap=03060e0a00 SataLedSpecial=1 ihd_num=0 netif_num=4 syno_hw_version=RS3412rpxs  macs=001132109b1e,001132109b1f,001132109b20,001132109b21 sn=LDKKN90098

$ dmesg | grep "Linux version"
[    0.000000] Linux version 3.10.105 (root@build1) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25556 SMP Sat Aug 28 02:14:22 CST 2021
[  342.396803] Loading modules backported from Linux version v3.18.1-0-g39ca484

$ python -m platform
Linux-3.10.105-x86_64-with-glibc2.2.5

$ which python2 && python2 -c "import platform;print platform.linux_distribution()[0]"
/bin/python2

$ which python3 && python3 -c "import distro;print(distro.name())"

$ more /etc/issue /etc/*release /etc/*version /boot/config*
more: stat of /etc/issue failed: No such file or directory
more: stat of /etc/*release failed: No such file or directory
more: stat of /etc/*version failed: No such file or directory
more: stat of /boot/config* failed: No such file or directory

$ zcat /proc/config.gz /usr/src/linux/config.gz | more
gzip: /proc/config.gz: No such file or directory
gzip: /usr/src/linux/config.gz: No such file or directory

$ which dpkg apt apt-get rpm urpmi yum dnf zypper
/bin/dpkg

$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/md0        2.3G  1.1G  1.1G  50% /

$ sudo parted /dev/md0 print
Password:
Model: Linux Software RAID Array (md)
Disk /dev/md0: 2550MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  2550MB  2550MB  ext4

$ sudo mdadm -Q /dev/md0
/dev/md0: 2.37GiB raid1 10 devices, 0 spares. Use mdadm --detail for more detail.

$ which lsblk lscsci lshw lspci dmidecode
/bin/lspci
/sbin/dmidecode

EDIT0: Tried two more commands :

$ strings $(ps -p 1 -o cmd= | cut -d" " -f1) | egrep -i "ubuntu|debian|centos|redhat" -o | sort -u
-sh: strings: command not found
[remoteserver] $ ssh embedded-linux 'cat $(ps -p 1 -o cmd= | cut -d" " -f1)' | strings | egrep -i "ubuntu|debian|centos|redhat" -o | sort -u
ubuntu

EDIT1: Tried three more commands :

$ which initctl && initctl --version
/sbin/initctl
initctl (upstart 1.13.2)
Copyright (C) 2006-2014 Canonical Ltd., 2011 Scott James Remnant

This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ which systemctl && systemctl --version
$ cat /sys/class/dmi/id/product_name
To be filled by O.E.M.
$

EDIT2: Tried one more command (specific to Synology) :

$ grep productversion /etc/VERSION
productversion="6.2.4"

EDIT3: Just in case one wants to identify the hardware :

$ uname -u # Specific to Synology ?
synology_bromolow_rs3412rpxs

$ sudo dmidecode -t system | grep Product
        Product Name: To be filled by O.E.M.
$

$ cat /sys/devices/virtual/dmi/id/product_name
To be filled by O.E.M.
$

EDIT4 : On another Synology, I get :

$ uname -u
synology_broadwell_rs3618xs

I guess it's based on Ubuntu+upstart.

What other commands can I use to look a little deeper?

11
  • 3
    It seems to be a Synology device, but presumably you’re aware of that; the distribution would be DiskStation Manager. Are you only trying to determine the distribution, or do you have a further goal in mind? Aug 24, 2022 at 16:21
  • @StephenKitt I need to be able to administer from the command line.
    – SebMa
    Aug 24, 2022 at 17:28
  • @SebMa, what exactly you want to administer? Do not forget this is appliance and some of your actions from command line can void warranty. Aug 24, 2022 at 17:42
  • What makes you think that is possible? Most devices with an embedded Linux aren't meant to be administrated. Aug 24, 2022 at 17:45
  • Found this : kb.synology.com/en-ph/… provided by Synology
    – SebMa
    Aug 24, 2022 at 17:50

2 Answers 2

17

The uname -a output identifies this as a Synology device. Such devices run Synology DiskStation Manager. This is Linux-based, but it is not managed like a typical Linux system running a “traditional” Linux distribution. It has its own package manager, synopkg, for which third-party packages are made available by SynoCommunity. The DiskStation CLI guide describes a few administration tools available in DSM.

If you’re interested in automating administrative tasks on such devices, you might find Synology’s Central Management System useful.

0
0

Also my "two cents":

$ cat /etc/*release*

Sometimes there is no dashes in release-related file names.

This outputs to stdout contents of all files under /etc directory containing release word in file name.

2
  • cat: /etc/*release*: No such file or directory
    – SebMa
    Aug 25, 2022 at 13:25
  • Looks like this Linux distribution doesn't have release description files. That's strange. Well, at least, this is consistent with $ more /etc/issue /etc/*release /etc/*version /boot/config* output.
    – yaromir
    Aug 25, 2022 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .