diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-02-07 16:28:49 -0500 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-02-07 16:28:55 -0500 |
commit | 548597bbff4a2df845f1f967b4107416367a4e14 (patch) | |
tree | 8348d7d5d037cec6de3600f8712cb949b2a956b1 /livecd.py | |
parent | 8948d8fa93c7cfe90f5576cb71390f421f62e7c8 (diff) | |
download | anaconda-548597bbff4a2df845f1f967b4107416367a4e14.tar.gz anaconda-548597bbff4a2df845f1f967b4107416367a4e14.tar.xz anaconda-548597bbff4a2df845f1f967b4107416367a4e14.zip |
Check the fstype of the live image
Need to make sure that the filesystem type of / matches what the live
image is set up with as its rootfs
Diffstat (limited to 'livecd.py')
-rw-r--r-- | livecd.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -40,6 +40,7 @@ from constants import * import backend import isys import iutil +import fsset import packages @@ -112,7 +113,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend): sys.exit(0) def _getLiveBlockDevice(self): - return self.osimg + return os.path.normpath(self.osimg) def _getLiveSizeMB(self): def parseField(output, field): @@ -173,6 +174,13 @@ class LiveCDCopyBackend(backend.AnacondaBackend): rootfs = r.device.getDevice() rootfd = os.open("/dev/" + rootfs, os.O_WRONLY) + # set the rootfs to have the right type. this lets things work + # given ext2 or ext3 (and in the future, ext4) + # FIXME: should we try to migrate if there isn't a match? + roottype = isys.readFSType(osimg) + if roottype is not None: + r.fsystem = fsset.fileSystemTypeGet(roottype) + readamt = 1024 * 1024 * 8 # 8 megs at a time size = float(self._getLiveSizeMB() * 1024 * 1024) copied = 0 |