1

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/sda
N: sda
S: disk/by-id/ata-VBOX_HARDDISK_VB8cef94cd-f15e891d
E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VB8cef94cd-f15e891d
E: DEVNAME=/dev/sda
E: DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=VBOX_HARDDISK
E: 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\x20
E: ID_PART_TABLE_TYPE=dos
E: ID_REVISION=1.0
E: ID_SERIAL=VBOX_HARDDISK_VB8cef94cd-f15e891d
E: ID_SERIAL_SHORT=VB8cef94cd-f15e891d
E: ID_TYPE=disk
E: MAJOR=8
E: MINOR=0
E: MPATH_SBIN_PATH=/sbin
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=18821

But 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/sda
N: sda
E: DEVNAME=/dev/sda
E: DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
E: DEVTYPE=disk
E: MAJOR=8
E: MINOR=0
E: SUBSYSTEM=block

I mounted the following folders into jail:

sudo mount -t proc /proc/ /target/proc
sudo mount -t sysfs /sys/ /target/sys
sudo mount --bind /dev/ /target/dev

What am I missing, to get all needed information about my hard disk /dev/sda?

2

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) = 3

This is an ASCII file:

/run/udev/data/b8:0: ASCII text

Containing 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.