Use pyparted to check for bootflag [Closes: issue1248]
authorMichael Prokop <mika@grml.org>
Wed, 25 Sep 2013 12:54:06 +0000 (14:54 +0200)
committerEvgeni Golov <evgeni@golov.de>
Tue, 7 Oct 2014 05:40:39 +0000 (07:40 +0200)
commit2b2c97afc1aae8c4a38c31921b21638d27638240
treecaca4a499d29781f815fbc38f81f0ea3eb346f5c
parent9b80cb522166a3e05aa6942c538b4dbc9aac9f05
Use pyparted to check for bootflag [Closes: issue1248]

The approach to check the 7th field in the MBR for the
bootable flag being set isn't enough. This fails to detect
bootable partitions if they aren't the first primary ones.

pyparted provides a way to check whether the specified
partition really has the boot flag set, so let's use this
approach, iff pyparted is available.

The check can also be completely skipped using the
--skip-bootflag parameter.

Took the get_partition_for_path function from Evgeni Golov's
https://github.com/evgeni/grml2usb/tree/pyparted with his
permission.
debian/control
grml2usb