We need to make sure the device/filesystem is synced, otherwise
syslinux installation might fail with:
| [...]
| Installing default MBR
| Installing syslinux as bootloader
| syslinux: /dev/sdb1: No such file or directory
| Fatal: Error executing syslinux (either try --fat16 or use grub?)
fsync-ing via dd isn't enough, so we need to make it
a full sync.
Closes: #779193
raise Exception("error executing dd (third run)")
del tmpf
raise Exception("error executing dd (third run)")
del tmpf
+ # make sure we sync filesystems before returning
+ proc = subprocess.Popen(["sync"])
+ proc.wait()
+
def is_writeable(device):
"""Check if the device is writeable for the current user
def is_writeable(device):
"""Check if the device is writeable for the current user