summaryrefslogtreecommitdiffstats
path: root/livecd.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2009-03-19 19:00:22 -0400
committerJeremy Katz <katzj@redhat.com>2009-03-19 21:51:00 -0400
commitfea3b2ea04662f87fa4c6d1325be8d062afd4d4f (patch)
tree9decebff3b7b2f4ace5600f8bd7543d1475c865f /livecd.py
parent5f217a04e0bbd1fa749b66bda7837270a17bf33a (diff)
downloadanaconda-fea3b2ea04662f87fa4c6d1325be8d062afd4d4f.tar.gz
anaconda-fea3b2ea04662f87fa4c6d1325be8d062afd4d4f.tar.xz
anaconda-fea3b2ea04662f87fa4c6d1325be8d062afd4d4f.zip
After setting up our random UUID, inform the storage layer
The storage layer keeps track of uuids for filesystems, so we need to update it if we change the uuid
Diffstat (limited to 'livecd.py')
-rw-r--r--livecd.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/livecd.py b/livecd.py
index d05dc7950..96610cd1b 100644
--- a/livecd.py
+++ b/livecd.py
@@ -29,6 +29,7 @@ import stat
import shutil
import time
import subprocess
+import storage
import selinux
@@ -238,6 +239,13 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
stdout="/dev/tty5",
stderr="/dev/tty5",
searchPath = 1)
+ # and now set the uuid in the storage layer
+ storage.udev.udev_settle()
+ rootDevice.updateSysfsPath()
+ iutil.notify_kernel("/sys%s" %rootDevice.sysfsPath)
+ info = storage.udev.udev_get_block_device("/sys%s" % rootDevice.sysfsPath)
+ rootDevice.format.uuid = storage.udev.udev_device_get_uuid(info)
+ log.info("reset the rootdev (%s) to have a uuid of %s" %(rootDevice.sysfsPath, rootDevice.format.uuid))
# for any filesystem that's _not_ on the root, we need to handle
# moving the bits from the livecd -> the real filesystems.