0

I'm a little confused, because I can't find a solution to the problem with simple methods or tools.

Situation: I need to identify the disk-device (not a partition) where the system is booted from (or the disk-device (not a partition) where there is a partition with the flag EFI from which the OS is booted).

It would be great if you could do this in grub Or how to pinpoint the partition the OS was booted from.

I tried to use grub:

  • search for a marker file (e.g: search --file --set=root /.disk/info breaks the logic if using a disk clone on one computer)
  • search for a disk by falsbel (e.g: search --no-floppy --label EFIx --set efipart breaks logic if using a clone disk on one computer)

On linux lsblk, lshw, blkid does not give a clear answer

cat /proc/cmdline 

can show root=UUID="...." but it is root, boot could be on a different disk

0 Answers0