Linutronix / elbe

Embedded Linux Build Environment
https://elbe-rfs.org
GNU General Public License v3.0
170 stars 59 forks source link

* Fix the orphaned loop dev created by kpartx -u #398

Closed fmg-stephen-martin closed 7 months ago

fmg-stephen-martin commented 9 months ago

Since updating to 14.9.3 from 14.9.0, we've had issues with an orphaned loop device (and a number of superfluous drive mounts) being left behind after each OS build. This issue only occurred when a project installed grub on a hardrive. I.e. <grub-install />

We've tracked the issue down to the losetup method in the grubinstaller_base class:

Instead, calling kpartx -u against the loop device already attached to file image fixes this issue.

t-8ch commented 9 months ago

Thanks for the patch!

Couldn't we add --partscan to the initial call to losetup for the same effect? That would feel nicer to me.

t-8ch commented 8 months ago

Hi @fmg-stephen-martin any feedback to the proposed approach?

t-8ch commented 7 months ago

This should be fixed by 1330249e6d02691134d98a3c5509c60f74710cae .