summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-06-23 19:02:38 +0000
committerJeremy Katz <katzj@redhat.com>2003-06-23 19:02:38 +0000
commitc8c0190205336f69c1a94f890a28a3e040565a97 (patch)
treee14cbf45307c02955d4e358dfb7e584026346953
parentd1636e475e29facfa7c08db38d4845a9bfe682e7 (diff)
downloadanaconda-c8c0190205336f69c1a94f890a28a3e040565a97.tar.gz
anaconda-c8c0190205336f69c1a94f890a28a3e040565a97.tar.xz
anaconda-c8c0190205336f69c1a94f890a28a3e040565a97.zip
merge from taroon. highlights of this time around
* ppc boot constraints * md5 endianness * don't prompt to save tracebacks to a floppy without a floppy * autopart for kickstart * network configuration in the loader if vnc/display case
-rwxr-xr-xanaconda1
-rw-r--r--autopart.py67
-rw-r--r--bootdisk/i386/general.msg5
-rw-r--r--bootdisk/i386/options.msg2
-rw-r--r--fsset.py12
-rwxr-xr-xgui.py8
-rw-r--r--hdrlist.py4
-rw-r--r--installclass.py20
-rw-r--r--installclasses/custom.py15
-rw-r--r--installclasses/personal_desktop.py16
-rw-r--r--installclasses/server.py16
-rw-r--r--isomd5sum/md5.c27
-rw-r--r--isomd5sum/md5.h1
-rw-r--r--isys/vio.c8
-rw-r--r--iutil.py2
-rw-r--r--iw/network_gui.py8
-rw-r--r--iw/partition_gui.py11
-rw-r--r--kickstart.py29
-rw-r--r--loader2/hdinstall.c1
-rw-r--r--loader2/lang.c18
-rw-r--r--loader2/linuxrc.s39068
-rw-r--r--loader2/loader.c118
-rw-r--r--loader2/loader.h13
-rw-r--r--loader2/nfsinstall.c49
-rw-r--r--loader2/urlinstall.c44
-rw-r--r--lvm.py12
-rw-r--r--packages.py14
-rw-r--r--partitions.py111
-rwxr-xr-xscripts/buildinstall3
-rw-r--r--scripts/mk-images.s3902
-rwxr-xr-xscripts/pkgorder4
-rw-r--r--scripts/splittree.py3
-rw-r--r--text.py8
-rw-r--r--textw/partition_text.py7
34 files changed, 374 insertions, 353 deletions
diff --git a/anaconda b/anaconda
index e0bd44f6b..963f181b1 100755
--- a/anaconda
+++ b/anaconda
@@ -614,6 +614,7 @@ if traceOnly:
import whiteout
import findpackageset
import libxml2
+ import cmdline
installclass.availableClasses()
diff --git a/autopart.py b/autopart.py
index be397d492..b43df5b47 100644
--- a/autopart.py
+++ b/autopart.py
@@ -35,20 +35,21 @@ BOOT_ABOVE_1024 = -1
BOOTEFI_NOT_VFAT = -2
BOOTALPHA_NOT_BSD = -3
BOOTALPHA_NO_RESERVED_SPACE = -4
-BOOTPSERIES_NOT_PREP = -5
-# XXX TODO: check for PReP partitions > 4 MiB and starting over 4096M.
-BOOTPSERIES_LARGER_THAN_4M = -6
-BOOTPSERIES_ABOVE_4096M = -7
+BOOTIPSERIES_TOO_HIGH = -5
DEBUG_LVM_GROW = 0
# check that our "boot" partition meets necessary constraints unless
# the request has its ignore flag set
def bootRequestCheck(requests, diskset):
- dev = requests.getBootableRequest()
- if not dev or not dev.device or dev.ignoreBootConstraints:
+ reqs = requests.getBootableRequest()
+ if not reqs:
return PARTITION_SUCCESS
- part = partedUtils.get_partition_by_name(diskset.disks, dev.device)
+ for req in reqs:
+ if not req.device or req.ignoreBootConstraints:
+ return PARTITION_SUCCESS
+ # side effect: dev is left as the last in devs
+ part = partedUtils.get_partition_by_name(diskset.disks, req.device)
if not part:
return PARTITION_SUCCESS
@@ -65,10 +66,11 @@ def bootRequestCheck(requests, diskset):
return bootAlphaCheckRequirements(part, diskset)
elif (iutil.getPPCMachine() == "pSeries" or
iutil.getPPCMachine() == "iSeries"):
- # FIXME: does this also have to be at the beginning of the disk
-## if part.native_type != 0x41:
-## return BOOTPSERIES_NOT_PREP
- log("FIXME: unable to check suitability of boot partition on pseries right now")
+ for req in reqs:
+ part = partedUtils.get_partition_by_name(diskset.disks, req.device)
+ if part and ((part.geom.end * part.geom.dev.sector_size /
+ (1024.0 * 1024)) > 4096):
+ return BOOTIPSERIES_TOO_HIGH
return PARTITION_SUCCESS
@@ -180,14 +182,12 @@ class partlist:
# partitions with a specific start and end cylinder requested are
# placed where they were asked to go
def fitConstrained(diskset, requests, primOnly=0, newParts = None):
- bootreq = requests.getBootableRequest()
-
for request in requests.requests:
if request.type != REQUEST_NEW:
continue
if request.device:
continue
- if primOnly and not request.primary and request != bootreq:
+ if primOnly and not request.primary and not requests.isBootable(request):
continue
if request.drive and (request.start != None):
if not request.end and not request.size:
@@ -283,18 +283,20 @@ def getDriveList(request, diskset):
# into the freespace
def fitSized(diskset, requests, primOnly = 0, newParts = None):
todo = {}
- bootreq = requests.getBootableRequest()
for request in requests.requests:
if request.type != REQUEST_NEW:
continue
if request.device:
continue
- if primOnly and not request.primary and request != bootreq:
+ if primOnly and not request.primary and not requests.isBootable(request):
continue
- if request == bootreq:
+ if requests.isBootable(request):
drives = getDriveList(request, diskset)
numDrives = 0 # allocate bootable requests first
+ # FIXME: this is a hack to make sure prep boot is even more first
+ if request.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
+ numDrives = -1
else:
drives = getDriveList(request, diskset)
numDrives = len(drives)
@@ -309,7 +311,7 @@ def fitSized(diskset, requests, primOnly = 0, newParts = None):
for num in number:
for request in todo[num]:
-## print "\nInserting ->",request
+# print "\nInserting ->",request
if requests.isBootable(request):
isBoot = 1
else:
@@ -990,16 +992,16 @@ def doPartitioning(diskset, requests, doRefresh = 1):
ret = bootRequestCheck(requests, diskset)
if ret == BOOTALPHA_NOT_BSD:
- raise PartitioningWarning, _("Boot partition %s doesn't belong to a BSD disk label. SRM won't be able to boot from this paritition. Use a partition belonging to a BSD disk label or change this device disk label to BSD.") %(requests.getBootableRequest().mountpoint)
+ raise PartitioningWarning, _("Boot partition %s doesn't belong to a BSD disk label. SRM won't be able to boot from this paritition. Use a partition belonging to a BSD disk label or change this device disk label to BSD.") %(requests.getBootableRequest()[0].mountpoint,)
elif ret == BOOTALPHA_NO_RESERVED_SPACE:
- raise PartitioningWarning, _("Boot partition %s doesn't belong to a disk with enough free space at its beginning for the bootloader to live on. Make sure that there's at least 5MB of free space at the beginning of the disk that contains /boot") %(requests.getBootableRequest().mountpoint)
+ raise PartitioningWarning, _("Boot partition %s doesn't belong to a disk with enough free space at its beginning for the bootloader to live on. Make sure that there's at least 5MB of free space at the beginning of the disk that contains /boot") %(requests.getBootableRequest()[0].mountpoint,)
elif ret == BOOTEFI_NOT_VFAT:
- raise PartitioningError, _("Boot partition %s isn't a VFAT partition. EFI won't be able to boot from this partition.") %(requests.getBootableRequest().mountpoint,)
- elif ret == BOOTPSERIES_NOT_PREP:
- raise PartitioningError, _("Boot partition %s isn't a PPC PReP boot partition. OpenFirmware won't be able to boot from this partition.") %(requests.getBootableRequest().mountpoint,)
+ raise PartitioningError, _("Boot partition %s isn't a VFAT partition. EFI won't be able to boot from this partition.") %(requests.getBootableRequest()[0].mountpoint,)
+ elif ret == BOOTIPSERIES_TOO_HIGH:
+ raise PartitioningError, _("Boot partition isn't located early enough on the disk. OpenFirmware wan't be able to boot this installation.")
elif ret != PARTITION_SUCCESS:
# more specific message?
- raise PartitioningWarning, _("Boot partition %s may not meet booting constraints for your architecture. Creation of a boot disk is highly encouraged.") %(requests.getBootableRequest().mountpoint)
+ raise PartitioningWarning, _("Boot partition %s may not meet booting constraints for your architecture. Creation of a boot disk is highly encouraged.") %(requests.getBootableRequest()[0].mountpoint,)
# now grow the logical partitions
growLogicalVolumes(diskset, requests)
@@ -1164,15 +1166,7 @@ def doAutoPartition(dir, diskset, partitions, intf, instClass, dispatch):
# XXX if we noop, then we fail later steps... let's just make it
# the workstation default. should instead just never get here
# if no autopart info
- autorequests = [ ("/", None, 1100, None, 1, 1) ]
-
- bootreq = getAutopartitionBoot()
- if bootreq:
- autorequests.append(bootreq)
-
- (minswap, maxswap) = iutil.swapSuggestion()
- autorequests.append((None, "swap", minswap, maxswap, 1, 1))
- partitions.autoPartitionRequests = autoCreatePartitionRequests(autorequests)
+ instClass.setDefaultPartitioning(partitions, doClear = 0)
# reset drive and request info to original state
# XXX only do this if we're dirty
@@ -1410,12 +1404,13 @@ def autoCreatePartitionRequests(autoreq):
def getAutopartitionBoot():
"""Return the proper shorthand for the boot dir (arch dependent)."""
if iutil.getArch() == "ia64":
- return ("/boot/efi", "vfat", 100, None, 0, 1)
+ return [ ("/boot/efi", "vfat", 100, None, 0, 1) ]
elif (iutil.getPPCMachine() == "pSeries" or
iutil.getPPCMachine() == "iSeries"):
- return(None, "PPC PReP Boot", 4, None, 0, 1)
+ return [ (None, "PPC PReP Boot", 4, None, 0, 1),
+ ("/boot", None, 100, None, 0, 1) ]
else:
- return ("/boot", None, 100, None, 0, 1)
+ return [ ("/boot", None, 100, None, 0, 1) ]
def queryAutoPartitionOK(intf, diskset, partitions):
type = partitions.autoClearPartType
diff --git a/bootdisk/i386/general.msg b/bootdisk/i386/general.msg
index b26f7821e..d9d667cce 100644
--- a/bootdisk/i386/general.msg
+++ b/bootdisk/i386/general.msg
@@ -8,8 +8,9 @@ the best way to get started is to simply press the 0f<ENTER>07 key.
If you are having problems with the graphical installer, you can use the
'resolution=<width>x<height>' option to try and force a particular resolution.
-For example, boot with '0flinux resolution=1024x76807'. You may also want to
-try '0flinux lowres07'.
+For example, boot with '0flinux resolution=1024x76807'. If you
+have problems with displaying before the graphical environment starts,
+try booting with '0flinux nofb07'.
Certain hardware configurations may have trouble with the automatic hardware
detection done during the installation. If you experience problems during the
diff --git a/bootdisk/i386/options.msg b/bootdisk/i386/options.msg
index c0556c861..e66c11b6a 100644
--- a/bootdisk/i386/options.msg
+++ b/bootdisk/i386/options.msg
@@ -17,6 +17,4 @@
- If you have an installer update disk, type: 0flinux updates <ENTER>07.
- - To install using a 640x480 resolution, type: 0flinux lowres07.
-
02[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue]07
diff --git a/fsset.py b/fsset.py
index cbc4139ba..3fbf5b69d 100644
--- a/fsset.py
+++ b/fsset.py
@@ -755,6 +755,7 @@ class prepbootFileSystem(FileSystemType):
self.partedFileSystemType = None
self.checked = 0
self.name = "PPC PReP Boot"
+ self.maxSizeMB = 10
# supported for use on the pseries
if (iutil.getPPCMachine() == "pSeries" or
@@ -1078,9 +1079,15 @@ class FileSystemSet:
bootDev = entry.device
elif (iutil.getPPCMachine() == "pSeries" or
iutil.getPPCMachine() == "iSeries"):
+ # we want the first prep partition or the first newly formatted one
+ bestprep = None
for entry in self.entries:
- if entry.fsystem.getName() == "PPC PReP Boot":
- bootDev = entry.device
+ if ((entry.fsystem.getName() == "PPC PReP Boot")
+ and ((bestprep is None) or
+ ((bestprep.format == 0) and (entry.format == 1)))):
+ bestprep = entry
+ if bestprep:
+ bootDev = bestprep.device
elif iutil.getArch() == "ia64":
if mntDict.has_key("/boot/efi"):
bootDev = mntDict['/boot/efi']
@@ -1113,7 +1120,6 @@ class FileSystemSet:
N_("Apple Bootstrap"))
n = n + 1
return ret
- # FIXME: is this right?
elif (iutil.getPPCMachine() == "pSeries" or
iutil.getPPCMachine() == "iSeries"):
ret['boot'] = (bootDev.device, N_("PPC PReP Boot"))
diff --git a/gui.py b/gui.py
index c5e43e176..5dc74c652 100755
--- a/gui.py
+++ b/gui.py
@@ -444,9 +444,11 @@ class ProgressWindow:
class ExceptionWindow:
def __init__ (self, text):
try:
- floppyDevices = len(kudzu.probe(kudzu.CLASS_FLOPPY,
- kudzu.BUS_UNSPEC,
- kudzu.PROBE_ALL))
+ floppyDevices = 0
+ for dev in kudzu.probe(kudzu.CLASS_FLOPPY, kudzu.BUS_UNSPEC,
+ kudzu.PROBE_ALL):
+ if not dev.detached:
+ floppyDevices = floppyDevices + 1
except:
floppyDevices = 0
diff --git a/hdrlist.py b/hdrlist.py
index 35aa94f93..827f5f197 100644
--- a/hdrlist.py
+++ b/hdrlist.py
@@ -49,7 +49,9 @@ EverythingExclude = {'kernel' : None, 'kernel-BOOT' : None,
'kernel-smp' : None, 'kernel-bigmem' : None,
'kernel-summit' : None, 'kernel-enterprise' : None,
'kernel-tape' : None, 'kernel-BOOTtape' : None,
- 'kernel-pseries': None, 'kernel-iseries': None}
+ 'kernel-pseries': None, 'kernel-iseries': None,
+ 'kernel-unsupported': None,'kernel-smp-unsupported': None,
+ 'kernel-bigmem-unsupported': None }
def showMem():
f = open("/proc/self/status", "r")
diff --git a/installclass.py b/installclass.py
index 57a632e1d..1d60e2352 100644
--- a/installclass.py
+++ b/installclass.py
@@ -20,6 +20,7 @@ import language
from instdata import InstallData
from partitioning import *
+from autopart import getAutopartitionBoot, autoCreatePartitionRequests
from rhpl.log import log
from rhpl.translate import _, N_
@@ -33,6 +34,7 @@ class BaseInstallClass:
showMinimal = 1
showLoginChoice = 0
description = None
+ name = "base"
# don't select this class by default
default = 0
@@ -460,7 +462,23 @@ class BaseInstallClass:
mouseName = mouse.mouseToMouse()[mouseType]
mouse.set(mouseName, emulThree, device)
id.setMouse(mouse)
-
+
+ def setDefaultPartitioning(self, partitions, clear = CLEARPART_TYPE_LINUX,
+ doClear = 1):
+ autorequests = [ ("/", None, 1024, None, 1, 1) ]
+
+ bootreq = getAutopartitionBoot()
+ if bootreq:
+ autorequests.extend(bootreq)
+
+ (minswap, maxswap) = iutil.swapSuggestion()
+ autorequests.append((None, "swap", minswap, maxswap, 1, 1))
+
+ if doClear:
+ partitions.autoClearPartType = clear
+ partitions.autoClearPartDrives = []
+ partitions.autoPartitionRequests = autoCreatePartitionRequests(autorequests)
+
def setInstallData(self, id):
id.reset()
diff --git a/installclasses/custom.py b/installclasses/custom.py
index 54b7e137c..f11a2c7ba 100644
--- a/installclasses/custom.py
+++ b/installclasses/custom.py
@@ -3,7 +3,6 @@ from rhpl.translate import N_
from constants import *
import os
import iutil
-from autopart import getAutopartitionBoot, autoCreatePartitionRequests
# custom installs are easy :-)
class InstallClass(BaseInstallClass):
@@ -21,18 +20,8 @@ class InstallClass(BaseInstallClass):
def setInstallData(self, id):
BaseInstallClass.setInstallData(self, id)
-
- autorequests = [ ("/", None, 700, None, 1, 1) ]
-
- bootreq = getAutopartitionBoot()
- if bootreq:
- autorequests.append(bootreq)
-
- (minswap, maxswap) = iutil.swapSuggestion()
- autorequests.append((None, "swap", minswap, maxswap, 1, 1))
- id.partitions.autoClearPartType = CLEARPART_TYPE_LINUX
- id.partitions.autoClearPartDrives = []
- id.partitions.autoPartitionRequests = autoCreatePartitionRequests(autorequests)
+ BaseInstallClass.setDefaultPartitioning(self, id.partitions,
+ CLEARPART_TYPE_LINUX)
def __init__(self, expert):
BaseInstallClass.__init__(self, expert)
diff --git a/installclasses/personal_desktop.py b/installclasses/personal_desktop.py
index 564e4564a..caba6b4d8 100644
--- a/installclasses/personal_desktop.py
+++ b/installclasses/personal_desktop.py
@@ -3,7 +3,6 @@ from rhpl.translate import N_
from constants import *
import os
import iutil
-from autopart import getAutopartitionBoot, autoCreatePartitionRequests
from fsset import *
class InstallClass(BaseInstallClass):
@@ -37,19 +36,8 @@ class InstallClass(BaseInstallClass):
def setInstallData(self, id):
BaseInstallClass.setInstallData(self, id)
-
- autorequests = [ ("/", None, 1100, None, 1, 1) ]
-
- bootreq = getAutopartitionBoot()
- if bootreq:
- autorequests.append(bootreq)
-
- (minswap, maxswap) = iutil.swapSuggestion()
- autorequests.append((None, "swap", minswap, maxswap, 1, 1))
-
- id.partitions.autoClearPartType = CLEARPART_TYPE_LINUX
- id.partitions.autoClearPartDrives = None
- id.partitions.autoPartitionRequests = autoCreatePartitionRequests(autorequests)
+ BaseInstallClass.setDefaultPartitioning(self, id.partitions,
+ CLEARPART_TYPE_LINUX)
def __init__(self, expert):
BaseInstallClass.__init__(self, expert)
diff --git a/installclasses/server.py b/installclasses/server.py
index df03d304f..b18d4a480 100644
--- a/installclasses/server.py
+++ b/installclasses/server.py
@@ -3,7 +3,6 @@ from rhpl.translate import *
from constants import *
import os
import iutil
-from autopart import getAutopartitionBoot, autoCreatePartitionRequests
class InstallClass(BaseInstallClass):
@@ -32,19 +31,8 @@ class InstallClass(BaseInstallClass):
def setInstallData(self, id):
BaseInstallClass.setInstallData(self, id)
-
- autorequests = [ ("/", None, 1100, None, 1, 1) ]
-
- bootreq = getAutopartitionBoot()
- if bootreq:
- autorequests.append(bootreq)
-
- (minswap, maxswap) = iutil.swapSuggestion()
- autorequests.append((None, "swap", minswap, maxswap, 1, 1))
-
- id.partitions.autoClearPartType = CLEARPART_TYPE_ALL
- id.partitions.autoClearPartDrives = []
- id.partitions.autoPartitionRequests = autoCreatePartitionRequests(autorequests)
+ BaseInstallClass.setDefaultPartitioning(self, id.partitions,
+ CLEARPART_TYPE_ALL)
def __init__(self, expert):
BaseInstallClass.__init__(self, expert)
diff --git a/isomd5sum/md5.c b/isomd5sum/md5.c
index 6f0e4ff6f..22f59a04e 100644
--- a/isomd5sum/md5.c
+++ b/isomd5sum/md5.c
@@ -16,16 +16,20 @@
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*
+ * Modified 12 June 2003 Jeremy Katz <katzj@redhat.com> to handle
+ * endianness better
+ *
*/
#include <string.h>
+#include <endian.h>
#include "md5.h"
void MD5_Transform(uint32 *buf, uint32 const *in);
-#ifndef HIGHFIRST
-#define byteReverse(buf, len) /* Nothing */
-#else
+#define IS_BIG_ENDIAN() (__BYTE_ORDER == __BIG_ENDIAN)
+#define IS_LITTLE_ENDIAN() (__BYTE_ORDER == __LITTLE_ENDIAN)
+
static void byteReverse(unsigned char *buf, unsigned longs);
#ifndef ASM_MD5
@@ -43,7 +47,6 @@ static void byteReverse(unsigned char *buf, unsigned longs)
} while (--longs);
}
#endif
-#endif
/*
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
@@ -58,6 +61,12 @@ void MD5_Init(struct MD5Context *ctx)
ctx->bits[0] = 0;
ctx->bits[1] = 0;
+
+
+ if (IS_BIG_ENDIAN())
+ ctx->doByteReverse = 1;
+ else
+ ctx->doByteReverse = 0;
}
/*
@@ -88,7 +97,7 @@ void MD5_Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len)
return;
}
memcpy(p, buf, t);
- byteReverse(ctx->in, 16);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 16);
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
buf += t;
len -= t;
@@ -97,7 +106,7 @@ void MD5_Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len)
while (len >= 64) {
memcpy(ctx->in, buf, 64);
- byteReverse(ctx->in, 16);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 16);
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
buf += 64;
len -= 64;
@@ -132,7 +141,7 @@ void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
if (count < 8) {
/* Two lots of padding: Pad the first block to 64 bytes */
memset(p, 0, count);
- byteReverse(ctx->in, 16);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 16);
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
/* Now fill the next block with 56 bytes */
@@ -141,14 +150,14 @@ void MD5_Final(unsigned char digest[16], struct MD5Context *ctx)
/* Pad block to 56 bytes */
memset(p, 0, count - 8);
}
- byteReverse(ctx->in, 14);
+ if (ctx->doByteReverse) byteReverse(ctx->in, 14);
/* Append length in bits and transform */
((uint32 *) ctx->in)[14] = ctx->bits[0];
((uint32 *) ctx->in)[15] = ctx->bits[1];
MD5_Transform(ctx->buf, (uint32 *) ctx->in);
- byteReverse((unsigned char *) ctx->buf, 4);
+ if (ctx->doByteReverse) byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
}
diff --git a/isomd5sum/md5.h b/isomd5sum/md5.h
index bacfb534a..fd4ea0edd 100644
--- a/isomd5sum/md5.h
+++ b/isomd5sum/md5.h
@@ -10,6 +10,7 @@ struct MD5Context {
uint32 buf[4];
uint32 bits[2];
unsigned char in[64];
+ int doByteReverse;
};
void MD5_Init(struct MD5Context *);
diff --git a/isys/vio.c b/isys/vio.c
index 1d4ffb13f..be4062315 100644
--- a/isys/vio.c
+++ b/isys/vio.c
@@ -41,7 +41,6 @@ int vioGetCdDevs(struct knownDevices * devices) {
i = readFD(fd, &buf);
if (i < 1) {
close(fd);
- free (buf);
fprintf(stderr, "error reading /proc/iSeries/viocd!\n");
return 1;
}
@@ -120,7 +119,6 @@ int vioGetDasdDevs(struct knownDevices * devices) {
i = readFD(fd, &buf);
if (i < 1) {
close(fd);
- free (buf);
fprintf(stderr, "error reading /proc/iSeries/viodasd!\n");
return 1;
}
@@ -191,12 +189,14 @@ int isVioConsole(void) {
return 0;
}
i = readFD(fd, &buf);
- if (i == -1) {
+ if (i < 1) {
close(fd);
- free(buf);
fprintf(stderr, "error reading /proc/tty/drivers!\n");
return 0;
}
+ close(fd);
+ buf[i] = '\0';
+
isviocons = 0;
start = buf;
while (start && *start) {
diff --git a/iutil.py b/iutil.py
index d394cc3f3..99659361a 100644
--- a/iutil.py
+++ b/iutil.py
@@ -583,5 +583,5 @@ def writeRpmPlatform(root="/"):
rhpl.arch.canonArch in ("s390x", "sparc64", "x86_64")):
return
f = open("%s/etc/rpm/macros" %(root,), 'w+')
- f.write("_transaction_color 3\n")
+ f.write("%_transaction_color 3\n")
f.close()
diff --git a/iw/network_gui.py b/iw/network_gui.py
index 87bef01e5..0f31a909a 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -52,8 +52,10 @@ class NetworkWindow(InstallWindow):
if neterrors is not None:
self.handleBadHostname(hname, neterrors)
raise gui.StayOnScreen
- elif len(hname) == 0:
- if self.handleMissingHostname():
+ elif len(hname) == 0:
+ hname = "localhost.localdomain" # ...better than empty
+ if ((self.getNumberActiveDevices() > 0) and
+ self.handleMissingHostname()):
raise gui.StayOnScreen
newHostname = hname
@@ -68,7 +70,7 @@ class NetworkWindow(InstallWindow):
try:
tmpvals[t] = self.globals[global_options[t]].dehydrate()
except ipwidget.IPMissing, msg:
- if t < 2:
+ if t < 2 and self.getNumberActiveDevices() > 0:
if self.handleMissingOptionalIP(global_options[t]):
raise gui.StayOnScreen
else:
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 0a9cf8c3f..7324944e6 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1021,9 +1021,10 @@ class PartitionWindow(InstallWindow):
rc = -1
else:
rc = 0
- req = self.partitions.getBootableRequest()
- if req:
- req.ignoreBootConstraints = 1
+ reqs = self.partitions.getBootableRequest()
+ if reqs:
+ for req in reqs:
+ req.ignoreBootConstraints = 1
self.populate()
return rc
@@ -1376,7 +1377,9 @@ class PartitionWindow(InstallWindow):
vpaned = gtk.VPaned()
- sw = gtk.ScrolledWindow()
+ hadj = gtk.Adjustment(step_incr = 5.0)
+ vadj = gtk.Adjustment(step_incr = 5.0)
+ sw = gtk.ScrolledWindow(hadjustment = hadj, vadjustment = vadj)
sw.add(self.diskStripeGraph.getCanvas())
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
sw.set_shadow_type(gtk.SHADOW_IN)
diff --git a/kickstart.py b/kickstart.py
index 5aad8600f..78e78bd88 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -537,6 +537,7 @@ class KickstartBase(BaseInstallClass):
handlers = {
"auth" : self.doAuthconfig ,
"authconfig" : self.doAuthconfig ,
+ "autopart" : self.doAutoPart ,
"cdrom" : None ,
"clearpart" : self.doClearPart ,
"device" : None ,
@@ -737,6 +738,24 @@ class KickstartBase(BaseInstallClass):
self.setClearParts(id, type, drives, initAll = initAll)
+ # this adds a partition to the autopartition list replacing anything
+ # else with this mountpoint so that you can use autopart and override /
+ def addPartRequest(self, partitions, request):
+ if not request.mountpoint:
+ partitions.autoPartitionRequests.append(request)
+ return
+
+ for req in partitions.autoPartitionRequests:
+ if req.mountpoint and req.mountpoint == request.mountpoint:
+ partitions.autoPartitionRequests.remove(req)
+ break
+ partitions.autoPartitionRequests.append(request)
+
+ def doAutoPart(self, id, args):
+ # sets up default autopartitioning. use clearpart separately
+ # if you want it
+ self.setDefaultPartitioning(id, doClear = 0)
+
def defineLogicalVolume(self, id, args):
(args, extra) = isys.getopt(args, '', [ 'vgname=',
'size=',
@@ -832,7 +851,7 @@ class KickstartBase(BaseInstallClass):
grow = grow,
maxSizeMB=maxSizeMB,
preexist = preexist)
- id.partitions.autoPartitionRequests.append(request)
+ self.addPartRequest(id.partitions, request)
def defineVolumeGroup(self, id, args):
@@ -869,7 +888,7 @@ class KickstartBase(BaseInstallClass):
preexist = preexist,
format = format)
request.uniqueID = uniqueID
- id.partitions.autoPartitionRequests.append(request)
+ self.addPartRequest(id.partitions, request)
def defineRaid(self, id, args):
(args, extra) = isys.getopt(args, '', [ 'level=', 'device=',
@@ -960,8 +979,8 @@ class KickstartBase(BaseInstallClass):
if uniqueID:
request.uniqueID = uniqueID
-
- id.partitions.autoPartitionRequests.append(request)
+
+ self.addPartRequest(id.partitions, request)
def definePartition(self, id, args):
@@ -1112,7 +1131,7 @@ class KickstartBase(BaseInstallClass):
if onPart:
request.device = onPart
- id.partitions.autoPartitionRequests.append(request)
+ self.addPartRequest(id.partitions, request)
id.partitions.isKickstart = 1
self.skipSteps.append("partition")
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index 3941c1fea..bd9255145 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -590,6 +590,7 @@ void setKickstartHD(struct loaderData_s * loaderData, int argc,
logMessage("kickstartFromHD");
optCon = poptGetContext(NULL, argc, (const char **) argv, ksHDOptions, 0);
if ((rc = poptGetNextOpt(optCon)) < -1) {
+ startNewt(*flagsPtr);
newtWinMessage(_("Kickstart Error"), _("OK"),
_("Bad argument to HD kickstart method "
"command %s: %s"),
diff --git a/loader2/lang.c b/loader2/lang.c
index 7450f7162..44c6c82a4 100644
--- a/loader2/lang.c
+++ b/loader2/lang.c
@@ -227,7 +227,7 @@ static int setupLanguage(int choice, int flags) {
logMessage("going to set language to %s", languages[choice].lc_all);
/* load the language only if it is displayable. if they're using
- * a serial console, we hope it's smart enough */
+ * a serial console or iSeries vioconsole, we hope it's smart enough */
if (!strcmp(languages[choice].font, "bterm") && !FL_SERIAL(flags) &&
!isVioConsole() && startBterm(flags)) {
if (FL_KICKSTART(flags)) return 0;
@@ -385,21 +385,7 @@ int chooseLanguage(char ** lang, int flags) {
/* this can't happen */
if (i == numLanguages) abort();
- /* load the language only if it is displayable. assume that if they're
- * on a serial console or iSeries vioconsole that their terminal is
- * smart. */
- if (!strcmp(languages[choice].font, "bterm") && !FL_SERIAL(flags) &&
- !isVioConsole() && startBterm(flags)) {
- newtWinMessage("Language Unavailable", "OK",
- "%s display is unavailable in text mode. The "
- "installation will continue in English until the "
- "display of %s is possible.", languages[choice].lang,
- languages[choice].lang);
- return 0;
- }
-
- setupLanguage(choice, flags);
- return 0;
+ return setupLanguage(choice, flags);
}
void setKickstartLanguage(struct loaderData_s * loaderData, int argc,
diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390
index a0ab94f47..56c1513a6 100644
--- a/loader2/linuxrc.s390
+++ b/loader2/linuxrc.s390
@@ -97,14 +97,6 @@ echo "1 4 1 1" > /proc/sys/kernel/printk
# make /tmp/ramfs
mount -t ramfs none /tmp
-mkdir /OCO
-mount -t ext2 /dev/ram /OCO >/dev/null 2>&1
-# if there is no second initrd, remove mountpoint because
-# anaconda checks for its existance:
-if [ "$?" != "0" ]; then
- rm -rf /OCO 2>/dev/null
-fi
-
ifconfig lo 127.0.0.1 netmask 255.0.0.0
route add -host 127.0.0.1 dev lo 2>/dev/null
@@ -182,16 +174,18 @@ if [ ":$NETTYPE" = ":eth" ] || [ ":$NETTYPE" = ":tr" ] || [ ":$NETTYPE" = ":hsi"
read GATEWAY
done
if echo "$CHANDEV" |grep -q "lcs"; then
- LCS="on"
+ if [ ":$NETTYPE" = ":tr" ]; then
+ TR="on"
+ else
+ LCS="on"
+ fi
fi
# qeth and nettype!= eth is hipersockets !
if echo "$CHANDEV" |grep -q "qeth"; then
- if echo "$NETTYPE" |grep -q "eth"; then
+ if [ ":$NETTYPE" = ":eth" ]; then
QETH="on"
- elif echo "$NETTYPE" |grep -q "hsi"; then
+ elif [ ":$NETTYPE" = ":hsi" ]; then
HSI="on"
- elif echo "$NETTYPE" |grep -q "tr"; then
- TR="on"
fi
fi
else # ctc0, escon0, iucv0
@@ -201,10 +195,6 @@ else # ctc0, escon0, iucv0
done
if [ "$NETTYPE" = "ctc" ]; then
-# if [ -z "$MTU" ]; then
-# echo $"Enter the maximal transfer unit (MTU) for this connection or leave empty:"
-# read MTU
-# fi
if [ -z "$MTU" ]; then
MTU="1500"
fi
@@ -237,41 +227,23 @@ elif [ ":$NETTYPE" = ":iucv" ]; then
insmod netiucv$LO $IUCV
ifconfig $DEVICE $IPADDR $MMTU pointopoint $GATEWAY
route add -host $IPADDR dev $DEVICE 2>/dev/null
-else # lcs, tr, qeth, hsi or older kernel without opensource-lcs
+elif [ -n "$LCS" -o -n "$TR" ]; then
+ insmod lcs$LO
+ ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
+ route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+elif [ -n "$QETH" -o -n "$HSI" ]; then
if [ "$DEVICE" = "eth0" -a "$HSI" = "on" ]; then
DEVICE="hsi0"
fi
- insmod ipv6$LO
- if [ -n "$LCS" ]; then
- insmod -f lcs$LO
- if [ "$?" = "1" ]; then
- echo $"warning: no lcs module found in the first initrd, "
- echo $" looking for second initrd"
- else
- ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
- route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- fi
- fi
- if [ -d "/OCO" ]; then
- if [ -n "$LCS" ]; then
- if [ -f /OCO/$KERNELVERSION/kernel/drivers/s390/net/lcs.o ]; then
- insmod -f /OCO/$KERNELVERSION/kernel/drivers/s390/net/lcs$LO
- else
- echo $"error: no lcs module found"
- fi
- else # qeth or hsi
- if [ -f /OCO/$KERNELVERSION/kernel/drivers/s390/qdio.o -a -f /OCO/$KERNELVERSION/kernel/drivers/s390/net/qeth.o ]; then
- insmod -f /OCO/$KERNELVERSION/kernel/drivers/s390/qdio$LO
- insmod -f /OCO/$KERNELVERSION/kernel/drivers/s390/net/qeth$LO
- else
- echo $"error: The qdio and the qeth modules are needed for this"
- echo $"They cannot be found in /OCO/$KERNELVERSION/kernel/drivers/s390/, skipping..."
- fi
- fi
- ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
- route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
- fi
+ insmod qdio$LO
+ insmod qeth$LO
+ ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
+ route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+else
+ echo $"Unknown network device, aborting installation"
+ exit 1
fi
+
route add default gw $GATEWAY dev $DEVICE 2>/dev/null
if [ -z "$DNS" ]; then
diff --git a/loader2/loader.c b/loader2/loader.c
index ffff64ea1..164bbdf79 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -70,6 +70,7 @@
#include "hdinstall.h"
#include "urlinstall.h"
+#include "net.h"
#include "telnetd.h"
#include "../isys/imount.h"
@@ -80,6 +81,8 @@
/* maximum number of extra arguments that can be passed to the second stage */
#define MAX_EXTRA_ARGS 128
+static char * extraArgs[MAX_EXTRA_ARGS];
+static int hasGraphicalOverride();
static int newtRunning = 0;
@@ -106,7 +109,6 @@ static int numMethods = sizeof(installMethods) / sizeof(struct installMethod);
/* JKFIXME: bad hack for second stage modules without module-info */
struct moduleBallLocation * secondStageModuleLocation;
-
#if 0
#if !defined(__s390__) && !defined(__s390x__)
@@ -418,7 +420,7 @@ static void readNetInfo(int flags, struct loaderData_s ** ld) {
* NOTE: in test mode, can specify a cmdline with --cmdline
*/
static int parseCmdLineFlags(int flags, struct loaderData_s * loaderData,
- char * cmdLine, char * extraArgs[]) {
+ char * cmdLine) {
int fd;
char buf[500];
int len;
@@ -596,6 +598,16 @@ static void checkForRam(int flags) {
}
}
+static int haveDeviceOfType(struct knownDevices * kd, int type) {
+ int i;
+
+ for (i = 0; i < kd->numKnown; i++) {
+ if (type == kd->known[i].class)
+ return 1;
+ }
+ return 0;
+}
+
/* fsm for the basics of the loader. */
static char *doLoaderMain(char * location,
struct loaderData_s * loaderData,
@@ -605,7 +617,8 @@ static char *doLoaderMain(char * location,
moduleDeps * modDepsPtr,
int flags) {
enum { STEP_LANG, STEP_KBD, STEP_METHOD, STEP_DRIVER,
- STEP_DRIVERDISK, STEP_URL, STEP_DONE } step;
+ STEP_DRIVERDISK, STEP_NETWORK, STEP_IFACE,
+ STEP_IP, STEP_URL, STEP_DONE } step;
char * url = NULL;
int dir = 1;
int rc, i;
@@ -615,6 +628,12 @@ static char *doLoaderMain(char * location,
int validMethods[10];
int methodNum = -1;
+ int needed = -1;
+ int needsNetwork = 0;
+
+ char * devName = NULL;
+ static struct networkDeviceConfig netDev;
+
char * kbdtype = NULL;
for (i = 0; i < numMethods; i++, numValidMethods++) {
@@ -638,11 +657,6 @@ static char *doLoaderMain(char * location,
if (url && !FL_RESCUE(flags)) return url;
}
- /* iSeries vio console users will be telnetting in to the primary
- partition, so use a terminal type that is appripriate */
- if (isVioConsole())
- setenv("TERM", "vt100", 1);
-
startNewt(flags);
step = STEP_LANG;
@@ -699,6 +713,8 @@ static char *doLoaderMain(char * location,
if (FL_RESCUE(flags) && url)
return url;
+ needed = -1;
+
if (loaderData->method && (methodNum != -1)) {
rc = 1;
} else {
@@ -722,24 +738,18 @@ static char *doLoaderMain(char * location,
step = STEP_KBD;
dir = -1;
} else {
+ needed = installMethods[validMethods[methodNum]].deviceType;
step = STEP_DRIVER;
dir = 1;
}
break;
case STEP_DRIVER: {
- int found = 0;
-
updateKnownDevices(kd);
- for (i = 0; i < kd->numKnown; i++) {
- if (installMethods[validMethods[methodNum]].deviceType ==
- kd->known[i].class)
- found = 1;
- }
-
- if (found) {
- step = STEP_URL;
+ if (needed == -1 || haveDeviceOfType(kd, needed)) {
+ step = STEP_NETWORK;
dir = 1;
+ needed = -1;
break;
}
@@ -770,7 +780,7 @@ static char *doLoaderMain(char * location,
case STEP_DRIVERDISK:
- rc = loadDriverFromMedia(installMethods[validMethods[methodNum]].deviceType,
+ rc = loadDriverFromMedia(needed,
modLoaded, modDepsPtr, modInfo, kd,
flags, 0, 0);
if (rc == LOADER_BACK) {
@@ -783,6 +793,63 @@ static char *doLoaderMain(char * location,
* the right kind of driver after loading the driver disk */
step = STEP_DRIVER;
break;
+
+ case STEP_NETWORK:
+ if ( (installMethods[validMethods[methodNum]].deviceType !=
+ CLASS_NETWORK) && (!hasGraphicalOverride())) {
+ needsNetwork = 0;
+ if (dir == 1)
+ step = STEP_URL;
+ else if (dir == -1)
+ step = STEP_METHOD;
+ break;
+ }
+
+ needsNetwork = 1;
+ if (!haveDeviceOfType(kd, CLASS_NETWORK)) {
+ needed = CLASS_NETWORK;
+ step = STEP_DRIVER;
+ break;
+ }
+ logMessage("need to set up networking");
+
+ initLoopback();
+ memset(&netDev, 0, sizeof(netDev));
+ netDev.isDynamic = 1;
+
+ /* fall through to interface selection */
+ case STEP_IFACE:
+ logMessage("going to pick interface");
+ rc = chooseNetworkInterface(kd, loaderData, flags);
+ if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
+ ((dir == -1) && (rc == LOADER_NOOP))) {
+ step = STEP_METHOD;
+ dir = -1;
+ break;
+ }
+
+ devName = loaderData->netDev;
+ strcpy(netDev.dev.device, devName);
+
+ /* fall through to ip config */
+ case STEP_IP:
+ if (!needsNetwork) step = STEP_METHOD; /* only hit going back */
+
+ logMessage("going to do getNetConfig");
+ /* populate netDev based on any kickstart data */
+ setupNetworkDeviceConfig(&netDev, loaderData, flags);
+
+ rc = readNetConfig(devName, &netDev, flags);
+ if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
+ ((dir == -1) && (rc == LOADER_NOOP))) {
+ step = STEP_IFACE;
+ dir = -1;
+ break;
+ }
+
+ writeNetInfo("/tmp/netinfo", &netDev, kd);
+ step = STEP_URL;
+ dir = 1;
case STEP_URL:
logMessage("starting to STEP_URL");
@@ -791,7 +858,7 @@ static char *doLoaderMain(char * location,
location, kd, loaderData, modInfo, modLoaded,
modDepsPtr, flags);
if (!url) {
- step = STEP_METHOD;
+ step = STEP_IP ;
dir = -1;
} else {
logMessage("got url %s", url);
@@ -888,7 +955,7 @@ static void migrate_runtime_directory(char * dirname) {
}
-static int hasGraphicalOverride(char *extraArgs[]) {
+static int hasGraphicalOverride() {
int i;
if (getenv("DISPLAY"))
@@ -909,7 +976,6 @@ int main(int argc, char ** argv) {
FILE *f;
char twelve = 12;
- char * extraArgs[MAX_EXTRA_ARGS];
struct knownDevices kd;
moduleInfoSet modInfo;
@@ -998,9 +1064,9 @@ int main(int argc, char ** argv) {
memset(&loaderData, 0, sizeof(loaderData));
extraArgs[0] = NULL;
- flags = parseCmdLineFlags(flags, &loaderData, cmdLine, extraArgs);
+ flags = parseCmdLineFlags(flags, &loaderData, cmdLine);
- if (FL_SERIAL(flags) && !hasGraphicalOverride(extraArgs))
+ if (FL_SERIAL(flags) && !hasGraphicalOverride())
flags |= LOADER_FLAGS_TEXT;
setupRamfs();
@@ -1020,6 +1086,10 @@ int main(int argc, char ** argv) {
initializeConsole(modLoaded, modDeps, modInfo, flags);
checkForRam(flags);
+ /* iSeries vio console users will be telnetting in to the primary
+ partition, so use a terminal type that is appripriate */
+ if (isVioConsole())
+ setenv("TERM", "vt100", 1);
mlLoadModuleSet("cramfs:vfat:nfs:loop:isofs:floppy", modLoaded, modDeps,
modInfo, flags);
diff --git a/loader2/loader.h b/loader2/loader.h
index 4e981b60e..e7b007cc0 100644
--- a/loader2/loader.h
+++ b/loader2/loader.h
@@ -12,23 +12,17 @@
#define LOADER_FLAGS_TEXT (1 << 2)
#define LOADER_FLAGS_RESCUE (1 << 3)
#define LOADER_FLAGS_KICKSTART (1 << 4)
-#define LOADER_FLAGS_KSFLOPPY (1 << 5)
-#define LOADER_FLAGS_KSHD (1 << 6)
#define LOADER_FLAGS_NOPROBE (1 << 7)
#define LOADER_FLAGS_MODDISK (1 << 8)
#define LOADER_FLAGS_ISA (1 << 9)
#define LOADER_FLAGS_SERIAL (1 << 10)
#define LOADER_FLAGS_UPDATES (1 << 11)
#define LOADER_FLAGS_KSFILE (1 << 12)
-#define LOADER_FLAGS_KSCDROM (1 << 13)
-#define LOADER_FLAGS_MCHECK (1 << 14)
-#define LOADER_FLAGS_KSNFS (1 << 15)
#define LOADER_FLAGS_NOUSB (1 << 16)
#define LOADER_FLAGS_NOSHELL (1 << 17)
#define LOADER_FLAGS_NOPCMCIA (1 << 18)
#define LOADER_FLAGS_TELNETD (1 << 19)
#define LOADER_FLAGS_NOPASS (1 << 20)
-#define LOADER_FLAGS_KSHTTP (1 << 21)
#define LOADER_FLAGS_MEDIACHECK (1 << 22)
#define LOADER_FLAGS_NOUSBSTORAGE (1 << 23)
#define LOADER_FLAGS_ASKMETHOD (1 << 24)
@@ -43,26 +37,19 @@
#define FL_TEXT(a) ((a) & LOADER_FLAGS_TEXT)
#define FL_RESCUE(a) ((a) & LOADER_FLAGS_RESCUE)
#define FL_KICKSTART(a) ((a) & LOADER_FLAGS_KICKSTART)
-#define FL_KSFLOPPY(a) ((a) & LOADER_FLAGS_KSFLOPPY)
-#define FL_KSHD(a) ((a) & LOADER_FLAGS_KSHD)
#define FL_NOPROBE(a) ((a) & LOADER_FLAGS_NOPROBE)
#define FL_MODDISK(a) ((a) & LOADER_FLAGS_MODDISK)
#define FL_ISA(a) ((a) & LOADER_FLAGS_ISA)
#define FL_SERIAL(a) ((a) & LOADER_FLAGS_SERIAL)
#define FL_UPDATES(a) ((a) & LOADER_FLAGS_UPDATES)
#define FL_KSFILE(a) ((a) & LOADER_FLAGS_KSFILE)
-#define FL_KSCDROM(a) ((a) & LOADER_FLAGS_KSCDROM)
-#define FL_MCHECK(a) ((a) & LOADER_FLAGS_MCHECK)
-#define FL_KSNFS(a) ((a) & LOADER_FLAGS_KSNFS)
#define FL_NOUSB(a) ((a) & LOADER_FLAGS_NOUSB)
#define FL_NOSHELL(a) ((a) & LOADER_FLAGS_NOSHELL)
-#define FL_LOWRES(a) ((a) & LOADER_FLAGS_LOWRES)
#define FL_NOFB(a) ((a) & LOADER_FLAGS_NOFB)
#define FL_NOPCMCIA(a) ((a) & LOADER_FLAGS_NOPCMCIA)
#define FL_RESCUE_NOMOUNT(a) ((a) & LOADER_FLAGS_RESCUE_NOMOUNT)
#define FL_TELNETD(a) ((a) & LOADER_FLAGS_TELNETD)
#define FL_NOPASS(a) ((a) & LOADER_FLAGS_NOPASS)
-#define FL_KSHTTP(a) ((a) & LOADER_FLAGS_KSHTTP)
#define FL_MEDIACHECK(a) ((a) & LOADER_FLAGS_MEDIACHECK)
#define FL_NOUSBSTORAGE(a) ((a) & LOADER_FLAGS_NOUSBSTORAGE)
#define FL_ASKMETHOD(a) ((a) & LOADER_FLAGS_ASKMETHOD)
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 37f7e70e8..aa3324688 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -75,58 +75,21 @@ char * mountNfsImage(struct installMethod * method,
struct loaderData_s * loaderData,
moduleInfoSet modInfo, moduleList modLoaded,
moduleDeps * modDepsPtr, int flags) {
- static struct networkDeviceConfig netDev;
- char * devName = NULL;
char * host = NULL;
char * directory = NULL;
char * fullPath = NULL;
char * path;
char * url = NULL;
- enum { NFS_STAGE_IFACE, NFS_STAGE_IP, NFS_STAGE_NFS,
- NFS_STAGE_MOUNT, NFS_STAGE_DONE } stage = NFS_STAGE_IFACE;
+ enum { NFS_STAGE_NFS, NFS_STAGE_MOUNT,
+ NFS_STAGE_DONE } stage = NFS_STAGE_NFS;
int rc;
int dir = 1;
- initLoopback();
-
- memset(&netDev, 0, sizeof(netDev));
- netDev.isDynamic = 1;
-
- /* JKFIXME: ASSERT -- we have a network device when we get here */
+ /* JKFIXME: ASSERT -- we have a network device setup when we get here */
while (stage != NFS_STAGE_DONE) {
switch (stage) {
- case NFS_STAGE_IFACE:
- logMessage("going to pick interface");
- rc = chooseNetworkInterface(kd, loaderData, flags);
-
- if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
- ((dir == -1) && (rc == LOADER_NOOP))) return NULL;
-
- stage = NFS_STAGE_IP;
- dir = 1;
- logMessage("using interface %s", loaderData->netDev);
- devName = loaderData->netDev;
- strcpy(netDev.dev.device, devName);
- break;
-
- case NFS_STAGE_IP:
- logMessage("going to do getNetConfig");
-
- /* populate netDev based on any kickstart data */
- setupNetworkDeviceConfig(&netDev, loaderData, flags);
-
- rc = readNetConfig(devName, &netDev, flags);
- if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
- ((dir == -1) && (rc == LOADER_NOOP))) {
- stage = NFS_STAGE_IFACE;
- dir = -1;
- break;
- }
- stage = NFS_STAGE_NFS;
- break;
-
case NFS_STAGE_NFS:
logMessage("going to do nfsGetSetup");
if (loaderData->method && *loaderData->method &&
@@ -144,9 +107,7 @@ char * mountNfsImage(struct installMethod * method,
break;
}
} else if (nfsGetSetup(&host, &directory) == LOADER_BACK) {
- stage = NFS_STAGE_IP;
- dir = -1;
- break;
+ return NULL;
}
stage = NFS_STAGE_MOUNT;
@@ -241,7 +202,6 @@ char * mountNfsImage(struct installMethod * method,
}
}
- writeNetInfo("/tmp/netinfo", &netDev, kd);
free(host);
free(directory);
@@ -263,6 +223,7 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc,
logMessage("kickstartFromNfs");
optCon = poptGetContext(NULL, argc, (const char **) argv, ksNfsOptions, 0);
if ((rc = poptGetNextOpt(optCon)) < -1) {
+ startNewt(*flagsPtr);
newtWinMessage(_("Kickstart Error"), _("OK"),
_("Bad argument to NFS kickstart method "
"command %s: %s"),
diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c
index 27af6b486..302e9b7c0 100644
--- a/loader2/urlinstall.c
+++ b/loader2/urlinstall.c
@@ -168,8 +168,6 @@ char * mountUrlImage(struct installMethod * method,
moduleDeps * modDeps, int flags) {
int rc;
char * url;
- char * devName = NULL;
- static struct networkDeviceConfig netDev;
struct iurlinfo ui;
char needsSecondary = ' ';
int dir = 1;
@@ -177,50 +175,18 @@ char * mountUrlImage(struct installMethod * method,
char * finalPrefix;
char * cdurl;
- enum { URL_STAGE_IFACE, URL_STAGE_IP, URL_STAGE_MAIN, URL_STAGE_SECOND,
- URL_STAGE_FETCH, URL_STAGE_DONE } stage = URL_STAGE_IFACE;
+ enum { URL_STAGE_MAIN, URL_STAGE_SECOND, URL_STAGE_FETCH,
+ URL_STAGE_DONE } stage = URL_STAGE_MAIN;
enum urlprotocol_t proto =
!strcmp(method->name, "FTP") ? URL_METHOD_FTP : URL_METHOD_HTTP;
/* JKFIXME: we used to do another ram check here... keep it? */
- initLoopback();
-
memset(&ui, 0, sizeof(ui));
- memset(&netDev, 0, sizeof(netDev));
- netDev.isDynamic = 1;
while (stage != URL_STAGE_DONE) {
switch(stage) {
- case URL_STAGE_IFACE:
- logMessage("going to pick interface");
- rc = chooseNetworkInterface(kd, loaderData, flags);
- if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
- ((dir == -1) && (rc == LOADER_NOOP))) return NULL;
-
- devName = loaderData->netDev;
- strcpy(netDev.dev.device, devName);
- stage = URL_STAGE_IP;
- dir = 1;
- break;
-
- case URL_STAGE_IP:
- logMessage("going to do getNetConfig");
-
- /* populate netDev based on any kickstart data */
- setupNetworkDeviceConfig(&netDev, loaderData, flags);
-
- rc = readNetConfig(devName, &netDev, flags);
- if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
- ((dir == -1) && (rc == LOADER_NOOP))) {
- stage = URL_STAGE_IFACE;
- dir = -1;
- break;
- }
- stage = URL_STAGE_MAIN;
- dir = 1;
-
case URL_STAGE_MAIN:
if (loaderData->method && *loaderData->method &&
(!strncmp(loaderData->method, "ftp", 3) ||
@@ -246,9 +212,7 @@ char * mountUrlImage(struct installMethod * method,
dir = 1;
break;
} else if (urlMainSetupPanel(&ui, proto, &needsSecondary)) {
- stage = URL_STAGE_IP;
- dir = -1;
- break;
+ return NULL;
}
/* got required information from user, proceed */
@@ -323,7 +287,6 @@ char * mountUrlImage(struct installMethod * method,
sprintf(url, "%s://%s%s/%s",
ui.protocol == URL_METHOD_FTP ? "ftp" : "http",
login, ui.address, finalPrefix);
- writeNetInfo("/tmp/netinfo", &netDev, kd);
return url;
}
@@ -396,6 +359,7 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc,
logMessage("kickstartFromUrl");
optCon = poptGetContext(NULL, argc, (const char **) argv, ksUrlOptions, 0);
if ((rc = poptGetNextOpt(optCon)) < -1) {
+ startNewt(*flagsPtr);
newtWinMessage(_("Kickstart Error"), _("OK"),
_("Bad argument to Url kickstart method "
"command %s: %s"),
diff --git a/lvm.py b/lvm.py
index fdabb6211..1f79d1e29 100644
--- a/lvm.py
+++ b/lvm.py
@@ -60,7 +60,7 @@ def vgscan():
stderr = output,
searchPath = 1)
if rc:
- log("running vgscan failed. disabling lvm")
+ log("running vgscan failed: %s. disabling lvm" %(rc,))
lvmDevicePresent = 0
def vgactivate(volgroup = None):
@@ -68,6 +68,7 @@ def vgactivate(volgroup = None):
volgroup - optional single volume group to activate
"""
+ global lvmDevicePresent
if flags.test or lvmDevicePresent == 0:
return
@@ -79,13 +80,15 @@ def vgactivate(volgroup = None):
stderr = output,
searchPath = 1)
if rc:
- raise SystemError, "vgchange failed"
+ log("running vgchange failed: %s. disabling lvm" %(rc,))
+ lvmDevicePresent = 0
def vgdeactivate(volgroup = None):
"""Deactivate volume groups by running vgchange -an.
volgroup - optional single volume group to deactivate
"""
+ global lvmDevicePresent
if flags.test or lvmDevicePresent == 0:
return
@@ -97,7 +100,8 @@ def vgdeactivate(volgroup = None):
stderr = output,
searchPath = 1)
if rc:
- raise SystemError, "vgchange failed"
+ log("running vgchange failed: %s. disabling lvm" %(rc,))
+ lvmDevicePresent = 0
def lvremove(lvname, vgname):
@@ -106,6 +110,7 @@ def lvremove(lvname, vgname):
lvname - name of logical volume to remove.
vgname - name of volume group lv is in.
"""
+ global lvmDevicePresent
if flags.test or lvmDevicePresent == 0:
return
@@ -126,6 +131,7 @@ def vgremove(vgname):
vgname - name of volume group.
"""
+ global lvmDevicePresent
if flags.test or lvmDevicePresent == 0:
return
diff --git a/packages.py b/packages.py
index 071a1fa21..7c8cb236e 100644
--- a/packages.py
+++ b/packages.py
@@ -321,7 +321,8 @@ class InstallCallback:
self.progress.setPackageScale(0, 1)
self.instLog.write (self.modeText % (h[rpm.RPMTAG_NAME],
h[rpm.RPMTAG_VERSION],
- h[rpm.RPMTAG_RELEASE]))
+ h[rpm.RPMTAG_RELEASE],
+ h[rpm.RPMTAG_ARCH]))
self.instLog.flush ()
self.rpmFD = -1
@@ -786,9 +787,9 @@ def doInstall(method, id, intf, instPath):
# dup'd when we go out of scope
if upgrade:
- modeText = _("Upgrading %s-%s-%s.\n")
+ modeText = _("Upgrading %s-%s-%s.%s.\n")
else:
- modeText = _("Installing %s-%s-%s.\n")
+ modeText = _("Installing %s-%s-%s.%s.\n")
errors = rpmErrorClass(instLog)
pkgTimer = timer.Timer(start = 0)
@@ -1094,12 +1095,13 @@ def doPostInstall(method, id, intf, instPath):
h = ts.hdrFromFdno(fd)
os.close(fd)
if upgrade:
- text = _("Upgrading %s-%s-%s.\n")
+ text = _("Upgrading %s-%s-%s.%s.\n")
else:
- text = _("Installing %s-%s-%s.\n")
+ text = _("Installing %s-%s-%s.%s.\n")
instLog.write(text % (h['name'],
h['version'],
- h['release']))
+ h['release'],
+ h['arch']))
os.unlink(id.compspkg)
del ts
diff --git a/partitions.py b/partitions.py
index 88f8d59d7..bce67d0fd 100644
--- a/partitions.py
+++ b/partitions.py
@@ -634,20 +634,49 @@ class Partitions:
if iutil.getArch() == "ia64":
bootreq = self.getRequestByMountPoint("/boot/efi")
- return bootreq
- elif (iutil.getPPCMachine() == "pSeries" or
- iutil.getPPCMachine() == "iSeries"):
+ return [ bootreq ]
+ elif iutil.getPPCMachine() == "iSeries":
for req in self.requests:
if req.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
return req
return None
+ elif iutil.getPPCMachine() == "pSeries":
+ # pSeries bootable requests are odd.
+ # have to consider both the PReP partition (with potentially > 1
+ # existing) as well as /boot,/
+
+ # for the prep partition, we want either the first or the
+ # first non-preexisting one
+ bestprep = None
+ for req in self.requests:
+ if req.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
+ if ((bestprep is None) or
+ (bestprep.getPreExisting() and
+ not req.getPreExisting())):
+ bestprep = req
+
+ if bestprep:
+ ret = [ bestprep ]
+ else:
+ ret = []
+
+ # now add the /boot
+ bootreq = self.getRequestByMountPoint("/boot")
+ if not bootreq:
+ bootreq = self.getRequestByMountPoint("/")
+ if bootreq:
+ ret.append(bootreq)
+
+ if len(ret) >= 1:
+ return ret
+ return None
if not bootreq:
bootreq = self.getRequestByMountPoint("/boot")
if not bootreq:
bootreq = self.getRequestByMountPoint("/")
- return bootreq
+ return [ bootreq ]
def getBootableMountpoints(self):
"""Return a list of bootable valid mountpoints for this arch."""
@@ -664,16 +693,17 @@ class Partitions:
This basically means that it should be sorted to the beginning of
the drive to avoid cylinder problems in most cases.
"""
- bootreq = self.getBootableRequest()
- if not bootreq:
+ bootreqs = self.getBootableRequest()
+ if not bootreqs:
return 0
-
- if bootreq == request:
- return 1
- if bootreq.type == REQUEST_RAID and \
- request.uniqueID in bootreq.raidmembers:
- return 1
+ for bootreq in bootreqs:
+ if bootreq == request:
+ return 1
+
+ if bootreq.type == REQUEST_RAID and \
+ request.uniqueID in bootreq.raidmembers:
+ return 1
return 0
@@ -734,15 +764,15 @@ class Partitions:
tmp = self.getBootableRequest()
- # if raid, we want all of the contents of the bootable raid
- if tmp and tmp.type == REQUEST_RAID:
- boot = []
- for member in tmp.raidmembers:
- boot.append(self.getRequestByID(member))
- elif tmp:
- boot = [tmp]
- else:
- boot = []
+ boot = []
+ if tmp:
+ for req in tmp:
+ # if raid, we want all of the contents of the bootable raid
+ if req.type == REQUEST_RAID:
+ for member in req.raidmembers:
+ boot.append(self.getRequestByID(member))
+ else:
+ boot.append(req)
# remove the bootables from the request
for bootable in boot:
@@ -784,6 +814,17 @@ class Partitions:
errors.append(_("You must create a /boot/efi partition of "
"type FAT and a size of 50 megabytes."))
+ if (iutil.getPPCMachine() == "pSeries" or
+ iutil.getPPCMachine() == "iSeries"):
+ reqs = self.getBootableRequest()
+ found = 0
+ for req in reqs:
+ if req.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
+ found = 1
+ break
+ if not found:
+ errors.append(_("You must create a PPC PReP Boot partition."))
+
for (mount, size) in checkSizes:
req = self.getRequestByMountPoint(mount)
if not req:
@@ -812,18 +853,22 @@ class Partitions:
if rc:
errors.append(rc)
- bootreq = self.getBootableRequest()
- # XXX 390 can't have boot on RAID
- if (bootreq and (isinstance(bootreq, partRequests.RaidRequestSpec)) and
- (not raid.isRaid1(bootreq.raidlevel))):
- errors.append(_("Bootable partitions can only be on RAID1 "
- "devices."))
-
- # can't have bootable partition on LV
- if (bootreq and
- (isinstance(bootreq, partRequests.LogicalVolumeRequestSpec))):
- errors.append(_("Bootable partitions cannot be on a "
- "logical volume."))
+ bootreqs = self.getBootableRequest()
+ if bootreqs:
+ for bootreq in bootreqs:
+ # XXX 390 can't have boot on RAID
+ if (bootreq and
+ (isinstance(bootreq, partRequests.RaidRequestSpec)) and
+ (not raid.isRaid1(bootreq.raidlevel))):
+ errors.append(_("Bootable partitions can only be on RAID1 "
+ "devices."))
+
+ # can't have bootable partition on LV
+ if (bootreq and
+ (isinstance(bootreq,
+ partRequests.LogicalVolumeRequestSpec))):
+ errors.append(_("Bootable partitions cannot be on a "
+ "logical volume."))
if foundSwap == 0:
warnings.append(_("You have not specified a swap partition. "
diff --git a/scripts/buildinstall b/scripts/buildinstall
index 039477281..fbfb9d6cd 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -119,6 +119,8 @@ if [ -x /usr/bin/runroot ]; then
else
$BUILDINSTALL --buildinstdir $BUILDINSTDIR --second $PKGORDERSTR --comp $COMPNAME --version $VERSION --release \"$RELEASESTR\" --product \"$PRODUCTSTR\" $DIR
fi
+
+rm -rf $BUILDINSTDIR
}
secondRun() {
@@ -149,7 +151,6 @@ fi
echo "Writing .discinfo file"
$MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH --discNum="1,2,3" --baseDir=RedHat/base --packagesDir=RedHat/RPMS --pixmapsDir=RedHat/pixmaps --outfile=$p/.discinfo
-rm -rf $BUILDINSTDIR
if [ -x /usr/bin/runroot ]; then
runroot $COMPNAME --onlyone --arch $BUILDARCH "rm -rf $TREEDIR/image-template $TREEDIR/instimage"
else
diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390
index e428d4284..47a07b0e5 100644
--- a/scripts/mk-images.s390
+++ b/scripts/mk-images.s390
@@ -437,7 +437,7 @@ SECSTAGE="$IDEMODS $SCSIMODS raid0 raid1 raid5 lvm-mod"
COMMONMODULES="loop cramfs dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod tape390 isofs ext3"
LOCALMODULES="$COMMONMODULES tape390 $IDEMODS $SCSIMODS"
-NETWORKMODULES="$COMMONMODULES nfs ctc netiucv ipv6 lcs"
+NETWORKMODULES="$COMMONMODULES nfs ctc netiucv ipv6 lcs qdio qeth"
makeBootImages() {
makeS390initrd --initrdto $TOPDESTPATH/images/initrd.img \
diff --git a/scripts/pkgorder b/scripts/pkgorder
index 3e3092add..b4b8574b6 100755
--- a/scripts/pkgorder
+++ b/scripts/pkgorder
@@ -243,6 +243,6 @@ for p in pkgOrder:
pkgs.sort(archSort)
for pnevra in pkgs:
pkg = hdlist.pkgs[pnevra[0]]
- print "%s-%s-%s.%s" % (pkg['name'], pkg['version'],
- pkg['release'], pkg['arch'])
+ print "%s-%s-%s.%s.rpm" % (pkg['name'], pkg['version'],
+ pkg['release'], pkg['arch'])
diff --git a/scripts/splittree.py b/scripts/splittree.py
index a39c06833..50297615a 100644
--- a/scripts/splittree.py
+++ b/scripts/splittree.py
@@ -38,7 +38,8 @@ def nvra(pkgfile):
fd = os.open(pkgfile, os.O_RDONLY)
h = _ts.hdrFromFdno(fd)
os.close(fd)
- return "%s-%s-%s.%s" %(h['name'], h['version'], h['release'], h['arch'])
+ return "%s-%s-%s.%s.rpm" %(h['name'], h['version'], h['release'],
+ h['arch'])
class Timber:
diff --git a/text.py b/text.py
index 6775ae02d..ae8ac2e6f 100644
--- a/text.py
+++ b/text.py
@@ -291,9 +291,11 @@ class InstallInterface:
def exceptionWindow(self, title, text):
try:
- floppyDevices = len(kudzu.probe(kudzu.CLASS_FLOPPY,
- kudzu.BUS_UNSPEC,
- kudzu.PROBE_ALL))
+ floppyDevices = 0
+ for dev in kudzu.probe(kudzu.CLASS_FLOPPY, kudzu.BUS_UNSPEC,
+ kudzu.PROBE_ALL):
+ if not dev.detached:
+ floppyDevices = floppyDevices + 1
except:
floppyDevices = 0
if floppyDevices > 0 or DEBUG:
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 487daa725..33363b3c5 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -227,9 +227,10 @@ class PartitionWindow:
rc = -1
else:
rc = 0
- req = self.partitions.getBootableRequest()
- if req:
- req.ignoreBootConstraints = 1
+ reqs = self.partitions.getBootableRequest()
+ if reqs:
+ for req in reqs:
+ req.ignoreBootConstraints = 1
self.populate()
return rc