[PATCH] Force mkswap to do it's job.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's some broken hueristic in mkswap that leads it to sometimes
mistake a logical volume for a disk and hence refuse to format it,
citing something about bootblocks. Nonsense.
---
 storage/devicelibs/swap.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/storage/devicelibs/swap.py b/storage/devicelibs/swap.py
index 1afd209..bd07f19 100644
--- a/storage/devicelibs/swap.py
+++ b/storage/devicelibs/swap.py
@@ -32,7 +32,9 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
 
 
 def mkswap(device, label=''):
-    argv = []
+    # We use -f to force since mkswap tends to refuse creation on lvs with
+    # a message about erasing bootbits sectors on whole disks. Bah.
+    argv = ["-f"]
     if label:
         argv.extend(["-L", label])
     argv.append(device)
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux