summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader.py8
-rw-r--r--fsset.py32
-rw-r--r--textw/bootdisk_text.py13
-rw-r--r--upgrade.py37
4 files changed, 10 insertions, 80 deletions
diff --git a/bootloader.py b/bootloader.py
index d5a8f22f6..7e3ebfeb3 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -37,14 +37,6 @@ def bootloaderSetupChoices(dispatch, bl, fsset, diskSet, dir):
if dir == DISPATCH_BACK:
return
- # do not give option to change bootloader if partitionless case
- if fsset.rootOnLoop():
- bl.setUseGrub(0)
- dispatch.skipStep("bootloader")
- dispatch.skipStep("bootloaderpassword")
- dispatch.skipStep("instbootloader")
- return
-
choices = fsset.bootloaderChoices(diskSet, bl)
if not choices:
dispatch.skipStep("instbootloader")
diff --git a/fsset.py b/fsset.py
index f97efa526..7388b0fab 100644
--- a/fsset.py
+++ b/fsset.py
@@ -900,13 +900,6 @@ class FileSystemSet:
f.close()
- def rootOnLoop (self):
- for entry in self.entries:
- if (entry.mountpoint == '/'
- and entry.device.getName() == "LoopbackDevice"):
- return 1
- return 0
-
# return the "boot" devicce
def getBootDev(self):
mntDict = {}
@@ -1245,13 +1238,6 @@ class FileSystemSet:
def hasDirtyFilesystems(self, mountpoint):
ret = []
- if self.rootOnLoop():
- entry = self.getEntryByMountPoint('/')
- mountLoopbackRoot(entry.device.host[5:], skipMount = 1,
- mountpoint = mountpoint)
- dirty = isys.ext2IsDirty("loop1")
- unmountLoopbackRoot(skipMount = 1, mountpoint = mountpoint)
- if dirty: return [ "loop" ]
for entry in self.entries:
# XXX - multifsify, virtualize isdirty per fstype
@@ -1896,23 +1882,6 @@ def allocateLoopback(file):
return dev
return None
-_loopbackRootDevice = None
-def mountLoopbackRoot(device, skipMount=0, mountpoint="/mnt/sysimage"):
- global _loopbackRootDevice
- isys.mount(device, '/mnt/loophost', fstype = "vfat")
- _loopbackRootDevice = allocateLoopback("/mnt/loophost/redhat.img")
- if not skipMount:
- isys.mount(_loopbackRootDevice, mountpoint)
-
-def unmountLoopbackRoot(skipMount=0, mountpoint="/mnt/sysimage"):
- global _loopbackRootDevice
- if not skipMount:
- isys.umount(mountpoint)
- path = '/tmp/' + _loopbackRootDevice
- isys.makeDevInode(_loopbackRootDevice, path)
- isys.unlosetup(path)
- isys.umount('/mnt/loophost')
-
def ext2FormatFilesystem(argList, messageFile, windowCreator, mntpoint):
if windowCreator:
w = windowCreator(_("Formatting"),
@@ -1999,7 +1968,6 @@ if __name__ == "__main__":
fsset = readFstab("fstab")
print fsset.fstab()
- print fsset.rootOnLoop()
sys.exit(0)
fsset = FileSystemSet()
diff --git a/textw/bootdisk_text.py b/textw/bootdisk_text.py
index c5d74f0f3..9afe1e342 100644
--- a/textw/bootdisk_text.py
+++ b/textw/bootdisk_text.py
@@ -19,10 +19,6 @@ from constants import *
class BootDiskWindow:
def __call__(self, screen, dir, disp, fsset):
- if fsset.rootOnLoop():
- disp.skipStep("makebootdisk", skip=0)
- return INSTALL_NOOP
-
buttons = [ _("Yes"), _("No") ]
text = _("A custom boot disk provides a way of booting into your "
"Linux system without depending on the normal boot loader. "
@@ -62,10 +58,7 @@ class BootDiskWindow:
class MakeBootDiskWindow:
def __call__ (self, screen, dir, disp, fsset):
- if fsset.rootOnLoop():
- buttons = [ _("OK") ]
- else:
- buttons = [ _("OK"), _("Skip") ]
+ buttons = [ _("OK"), _("Skip") ]
# This is a bit gross. This lets the first bootdisk screen skip
# this one if the user doesn't want to see it.
@@ -80,10 +73,6 @@ class MakeBootDiskWindow:
"diskette. All data will be ERASED "
"during creation of the boot disk.") % (productName,)
- if fsset.rootOnLoop():
- text = text + _("\n\nA boot disk is REQUIRED to boot a "
- "partitionless install.")
-
rc = ButtonChoiceWindow (screen, _("Boot Disk"),
text, buttons, help="insertbootdisk")
diff --git a/upgrade.py b/upgrade.py
index 09601c92b..28cc16044 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -67,20 +67,14 @@ def mountRootPartition(intf, rootInfo, oldfsset, instPath, allowDirty = 0,
diskset.openDevices()
diskset.startAllRaid()
- if rootFs == "vfat":
- mountLoopbackRoot(root, mountpoint = instPath)
- else:
- isys.mount(root, instPath, rootFs)
+ isys.mount(root, instPath, rootFs)
oldfsset.reset()
newfsset = fsset.readFstab(instPath + '/etc/fstab')
for entry in newfsset.entries:
oldfsset.add(entry)
- if rootFs == "vfat":
- unmountLoopbackRoot(mountpoint = instPath)
- else:
- isys.umount(instPath)
+ isys.umount(instPath)
dirtyDevs = oldfsset.hasDirtyFilesystems(instPath)
if not allowDirty and dirtyDevs != []:
@@ -147,24 +141,14 @@ def upgradeSwapSuggestion(dispatch, id, instPath):
fsList = []
- if id.fsset.rootOnLoop():
- space = isys.pathSpaceAvailable("/mnt/loophost")
-
- for entry in id.fsset.entries:
- if entry.mountpoint != '/' or space <= 16:
+ for entry in id.fsset.entries:
+ if entry.fsystem.getName() in fsset.getUsableLinuxFs():
+ if flags.setupFilesystems and not entry.isMounted():
continue
-
- info = (entry.mountpoint, entry.device.getDevice(), space)
- fsList.append(info)
- else:
- for entry in id.fsset.entries:
- if entry.fsystem.getName() in fsset.getUsableLinuxFs():
- if flags.setupFilesystems and not entry.isMounted():
- continue
- space = isys.pathSpaceAvailable(instPath + entry.mountpoint)
- if space > 16:
- info = (entry.mountpoint, entry.device.getDevice(), space)
- fsList.append(info)
+ space = isys.pathSpaceAvailable(instPath + entry.mountpoint)
+ if space > 16:
+ info = (entry.mountpoint, entry.device.getDevice(), space)
+ fsList.append(info)
suggestion = mem * 2 - swap
if (swap + mem + suggestion) < 192:
@@ -189,9 +173,6 @@ def swapfileExists(swapname):
def createSwapFile(instPath, theFsset, mntPoint, size):
fstabPath = instPath + "/etc/fstab"
prefix = ""
- if theFsset.rootOnLoop():
- instPath = "/mnt/loophost"
- prefix = "/initrd/loopfs"
if mntPoint != "/":
file = mntPoint + "/SWAP"