When I print out all information about a disk /dev/sda on my host system, then I get this sort of information (I got this information with command udevadm info --query=all --name=/dev/sda):P: /devices/pci0000:00/0000:00:0d.0/ata1/host0/target0:0:0/0:0:0:0/block/sdaN: sdaS: disk/by-id/ata-VBOX_HARDDISK_VB8cef94cd-f15e891dE: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VB8cef94cd-f15e891dE: DEVNAME=/dev/sdaE: DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata1/host0/target0:0:0/0:0:0:0/block/sdaE: DEVTYPE=diskE: ID_ATA=1E: ID_ATA_FEATURE_SET_PM=1E: ID_ATA_FEATURE_SET_PM_ENABLED=1E: ID_ATA_SATA=1E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1E: ID_ATA_WRITE_CACHE=1E: ID_ATA_WRITE_CACHE_ENABLED=1E: ID_BUS=ataE: ID_MODEL=VBOX_HARDDISKE: ID_MODEL_ENC=VBOX\x20HARDDISK\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20E: ID_PART_TABLE_TYPE=dosE: ID_REVISION=1.0E: ID_SERIAL=VBOX_HARDDISK_VB8cef94cd-f15e891dE: ID_SERIAL_SHORT=VB8cef94cd-f15e891dE: ID_TYPE=diskE: MAJOR=8E: MINOR=0E: MPATH_SBIN_PATH=/sbinE: SUBSYSTEM=blockE: TAGS=:systemd:E: USEC_INITIALIZED=18821But in chroot / jail, typing the same command, I get:P: /devices/pci0000:00/0000:00:0d.0/ata1/host0/target0:0:0/0:0:0:0/block/sdaN: sdaE: DEVNAME=/dev/sdaE: DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata1/host0/target0:0:0/0:0:0:0/block/sdaE: DEVTYPE=diskE: MAJOR=8E: MINOR=0E: SUBSYSTEM=blockI mounted the following folders into jail:sudo mount -t proc /proc/ /target/procsudo mount -t sysfs /sys/ /target/syssudo mount --bind /dev/ /target/devWhat am I missing, to get all needed information about my hard disk /dev/sda?
Disk ID in chroot / jail
hard disk;udev;chroot
Using strace udevadm info --query=all --name=/dev/sda I could see that /run/udev/data/b8:0 is also read:open(/run/udev/data/b8:0, O_RDONLY|O_CLOEXEC) = 3This is an ASCII file:/run/udev/data/b8:0: ASCII textContaining the information you want to see.In your case it is necessary to have /run/udev/data available in your chroot environment aswell to run the udevadm command