Mentions légales du service

Skip to content

[ohai/disk] fix getting disk from /proc/cmdline for UUID

Alexandre MERLIN requested to merge disk-from-proc-cmdline into master

The root partition in /proc/cmdline can be specify with as path (eg: "root=/dev/sda3") or with an UUID (eg: "root=UUID=5a2413c7-985..."). This commit translate the second case to a path we can give to the parted command. Also, the logic for getting the disk by removing the last digit of the partition is replaced by using "lsblk -o pkname" which also work for nvme (eg: partition: nvme1n1p1, disk: nvme1n1)

Merge request reports