Comment 4 for bug 1523637

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I looked again, and I can confirm there is the code necessary to only wipe the device we've received as a target for grub (provided it's available), and otherwise resort to the first device that pops up from prep-bootdev (which can be any, in whatever order parted decides to hand them over to us).

Could you recreate the issue, but just before the installation of the bootloader, edit /usr/bin/grub-installer to add "set -x" at the top? I'd very much like to see what grub-installer thinks we've passed to it when it gets run, that could explain why we're seeing it find sdr1 rather than sdp from your install.

This also leads to seeing that there's another bug in that code (and I'll fix both together), we can't rely on parted giving us devices that are correctly mapped in /dev it seems, and should guard against the file not existing before running dd.