summaryrefslogtreecommitdiffstats
path: root/livecd.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-03-16 09:13:23 -0400
committerJeremy Katz <katzj@redhat.com>2008-03-16 09:19:12 -0400
commitf6d89169ca6a331b058dd3373d630b3627a94e9c (patch)
tree67f1a5ab3b6f0e38bbe2051bf07f5be17aba4a6c /livecd.py
parentdec5f892fc682856bbf93c9ab50e61f121a19727 (diff)
downloadanaconda-f6d89169ca6a331b058dd3373d630b3627a94e9c.tar.gz
anaconda-f6d89169ca6a331b058dd3373d630b3627a94e9c.tar.xz
anaconda-f6d89169ca6a331b058dd3373d630b3627a94e9c.zip
Ensure the UUID for the rootfs is random and not the same for every live image
Diffstat (limited to 'livecd.py')
-rw-r--r--livecd.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/livecd.py b/livecd.py
index 3473c1131..8c87c80be 100644
--- a/livecd.py
+++ b/livecd.py
@@ -209,9 +209,14 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
# remount filesystems
anaconda.id.fsset.mountFilesystems(anaconda)
- # restore the label of / to what we think it is (XXX: UUID?)
+ # restore the label of / to what we think it is
r = anaconda.id.fsset.getEntryByMountPoint("/")
anaconda.id.fsset.labelEntry(r, anaconda.rootPath, True)
+ # ensure we have a random UUID on the rootfs
+ # FIXME: this should be abstracted per filesystem type
+ iutil.execWithRedirect("tune2fs", ["-U", "random", r.device.getDevice],
+ stdout="/dev/tty5", stderr="/dev/tty5",
+ searchPath = 1)
# for any filesystem that's _not_ on the root, we need to handle
# moving the bits from the livecd -> the real filesystems.