From d2de248272b57a7c306fecfaa77bc1da81d18397 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 7 Jan 2013 13:16:59 +0200 Subject: [PATCH] raw.py: remove redundant code Remove code from raw.py which sets the 'bootable' flag to the boot partition, because it is redundant. partitionedfs.py it the file where everything concerning partitions has to be done. And there is code which sets the 'boot' flag to the boot partition. We just need to use the '--active' option for that partition in the ks file. Change-Id: I17fd4e6e8785b8c6b1a48a7af1a2335a056b4d98 Signed-off-by: Artem Bityutskiy --- mic/imager/raw.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/mic/imager/raw.py b/mic/imager/raw.py index 217544d..6f414a4 100644 --- a/mic/imager/raw.py +++ b/mic/imager/raw.py @@ -329,21 +329,6 @@ class RawImageCreator(BaseImageCreator): if rc != 0: raise MountError("Unable to set MBR to %s" % loopdev) - #Set Bootable flag - parted = fs_related.find_binary_path("parted") - rc = runner.quiet([parted, - "-s", - loopdev, - "set", - "%d" % (bootdevnum + 1), - "boot", - "on"]) - #XXX disabled return code check because parted always fails to - #reload part table with loop devices. Annoying because we can't - #distinguish this failure from real partition failures :-( - if rc != 0 and 1 == 0: - raise MountError("Unable to set bootable flag to %sp%d" \ - % (loopdev, (bootdevnum + 1))) #Ensure all data is flushed to disk before doing syslinux install runner.quiet('sync') -- 2.7.4