Tell me how not using the hdrarm program to find out the names (models) of hard drives connected to a PC and their serial numbers?

  • and other packages can not be installed? - Senior Pomidor

2 answers 2

A model is simply the contents of the /sys/block/sda/device/model pseudo file for the sda disk, respectively.

The serial number is somehow more problematic. In sysfs did not find it. You can pull out of the file name in /dev/disk/by-id/* , it seems that this name is formed just from the model and serial number.

You can still through udevadm , which is usually already installed:

 udevadm info --query=all --name=/dev/sda | grep ID_SERIAL 

    Well, if smartctl can not use smartctl , then look in dmesg