Thanks for digging into this and finding your root cause!
I'm really wondering what is causing this additional \r on that variable compared to a standard installation, with multiple kernels and initrds, which doesn't get this \r. Do you have any specific grub configuration in /etc/default/grub* or anything in /boot which can lead to this? Could be mirror-related, where grub_probe --target device returns this \r. What's the value of $initrd_device?
The reason is that I would like to add this case to the testsuite to ensure we don't regress it in the future and so, trying to find the root cause (we can mock grub_probe in our testsuite to return what you got exactly).
Thanks for digging into this and finding your root cause!
I'm really wondering what is causing this additional \r on that variable compared to a standard installation, with multiple kernels and initrds, which doesn't get this \r. Do you have any specific grub configuration in /etc/default/grub* or anything in /boot which can lead to this? Could be mirror-related, where grub_probe --target device returns this \r. What's the value of $initrd_device?
The reason is that I would like to add this case to the testsuite to ensure we don't regress it in the future and so, trying to find the root cause (we can mock grub_probe in our testsuite to return what you got exactly).