[Fedora-livecd-list] [PATCH] don't need to checkMBR() for loop devices

Martin Dengler martin at martindengler.com
Tue Jun 23 20:59:16 UTC 2009


livecd-iso-to-disk.sh doesn't do the right thing w.r.t. loop devices
and MBR detection.  I don't think this is intentional, but it
currently requires loop devices to start with an MBR, by virtue of
getdisk() being a NOOP for loop devices and checkMBR assuming that the
disk must need an MBR.  checkMBR() should just ignore loop devices
like other key functions do.
---
 livecd-iso-to-disk.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/livecd-iso-to-disk.sh b/livecd-iso-to-disk.sh
index 672e6db..0efef58 100755
--- a/livecd-iso-to-disk.sh
+++ b/livecd-iso-to-disk.sh
@@ -93,6 +93,9 @@ resetMBR() {
 }
 
 checkMBR() {
+    if [[ "$DEV" =~ "/dev/loop*" ]]; then
+       return 0
+    fi
     getdisk $1
 
     bs=$(mktemp /tmp/bs.XXXXXX)
-- 
1.6.0.6




More information about the Fedora-livecd-list mailing list