diff -urN anaconda-7.1/bootdisk/i386/boot.msg anaconda-7.1-xfs/bootdisk/i386/boot.msg
--- anaconda-7.1/bootdisk/i386/boot.msg Sun Apr 8 22:58:08 2001
+++ anaconda-7.1-xfs/bootdisk/i386/boot.msg Mon Dec 3 16:25:42 2001
@@ -1,10 +1,10 @@
- 09Welcome to 0cRed Hat09 Linux 7.1!07
+ SGI XFS 1.0.2 for 0cRed Hat09 Linux 7.1!07
- - To install or upgrade 0cRed Hat07 Linux in graphical mode,
- press the 0f07 key.
+ - To install or upgrade XFS for 0cRed Hat07 Linux in
+ graphical mode, press the 0f07 key.
- - To install or upgrade 0cRed Hat07 Linux in text mode, type: 0ftext 07.
+ - To install or upgrade in text mode, type: 0ftext 07.
- To enable low resolution mode, type: 0flowres 07.
Press 0507 for more information about low resolution mode.
diff -urN anaconda-7.1/bootdisk/i386/syslinux.cfg anaconda-7.1-xfs/bootdisk/i386/syslinux.cfg
--- anaconda-7.1/bootdisk/i386/syslinux.cfg Thu Feb 8 21:47:56 2001
+++ anaconda-7.1-xfs/bootdisk/i386/syslinux.cfg Mon Dec 3 16:25:42 2001
@@ -9,19 +9,19 @@
F5 rescue.msg
label linux
kernel vmlinuz
- append initrd=initrd.img devfs=nomount vga=788
+ append initrd=initrd.img devfs=nomount vga=788 ramdisk_size=8192
label text
kernel vmlinuz
- append initrd=initrd.img text devfs=nomount
+ append initrd=initrd.img text devfs=nomount ramdisk_size=8192
label expert
kernel vmlinuz
- append expert initrd=initrd.img devfs=nomount
+ append expert initrd=initrd.img devfs=nomount ramdisk_size=8192
label ks
kernel vmlinuz
- append ks initrd=initrd.img devfs=nomount
+ append ks initrd=initrd.img devfs=nomount ramdisk_size=8192
label nofb
kernel vmlinuz
- append initrd=initrd.img devfs=nomount nofb
+ append initrd=initrd.img devfs=nomount nofb ramdisk_size=8192
label lowres
kernel vmlinuz
- append initrd=initrd.img lowres devfs=nomount
+ append initrd=initrd.img lowres devfs=nomount ramdisk_size=8192
diff -urN anaconda-7.1/fstab.py anaconda-7.1-xfs/fstab.py
--- anaconda-7.1/fstab.py Wed May 23 15:52:03 2001
+++ anaconda-7.1-xfs/fstab.py Mon Dec 3 17:28:21 2001
@@ -46,6 +46,26 @@
return 0
+def isValidXFS(device):
+ file = '/tmp/' + device
+ isys.makeDevInode(device, file)
+ try:
+ fd = os.open(file, os.O_RDONLY)
+ except:
+ return 0
+
+ buf = os.read(fd, 4)
+ os.close(fd)
+
+ if len(buf) != 4:
+ return 0
+
+ if buf == "XFSB":
+ return 1
+
+ return 0
+
+
class Fstab:
# return 1 if we should stay on the same screen
@@ -54,9 +74,24 @@
(drives, raid) = self.partitionList()
for (drive, part, type, start, cyl, size, preexisting) in drives:
- if preexisting and isValidExt2(drive):
+ if preexisting and (isValidExt2(drive) or isValidXFS(drive)):
alreadyExists[part] = 1
+ if iutil.getArch() == "alpha":
+ bootPart = self.getBootDevice()
+
+ if self.getBootFS() == "xfs":
+ messageWindow(_("Error"),
+ _("\n\nThe /boot directory containing the "
+ "Linux kernel must reside on an ext2 "
+ "filesystem in order for the boot loader "
+ "to successfully start the operating system.\n\n"
+ "You must either create a small ext2 partition "
+ "for /boot, or - if you have /boot on the root "
+ "partition - use the ext2 filesystem there."
+ "\n\n"))
+ return 1
+
badList = []
for (part, drive, fsystem, format, size) in \
self.formattablePartitions():
@@ -111,7 +146,7 @@
for (mntpoint, sizespec, locspec, typespec, fsopts) in partitions:
(device, part, primOnly) = locspec
(size, maxsize, grow) = sizespec
- (type, active) = typespec
+ (type, fs, active) = typespec
if (part == 0):
part = -1
@@ -143,20 +178,27 @@
if success == 1:
# configure kickstart requested ext2 filesystem options
- for (mntpoint, sizespce, locspec, typespec, fsopts) in partitions:
+ for (mntpoint, sizespec, locspec, typespec, fsopts) in partitions:
+ (dev, part, priority) = locspec
+ (type, fs, active) = typespec
+ # Fill up the fsCache with pre-config'd fs types
+ for (partition, mount, fsystem, size) in ddruid.getFstab():
+ if mount == mntpoint:
+ self.fsCache[(partition, mount)] = (0, fs)
+
if fsopts != None:
self.setfsOptions (mntpoint, fsopts)
# sanity check
for (partition, mount, fsystem, size) in ddruid.getFstab():
- if mount == '/' and fsystem != 'ext2':
- raise ValueError, "--onpart specified for mount point / on non-ext2 partition"
+ if mount == '/' and fsystem != 'ext2' and fsystem != 'xfs':
+ raise ValueError, "--onpart specified for mount point / on non-ext2 or non-xfs partition"
- # if mount point other than '/' is on non-ext2, better have
+ # if mount point other than '/' is on non-ext2 or non-xfs, better have
# specified --noformat
for (mntpoint, (dev, fstype, reformat)) in prefstab:
if mntpoint == mount and reformat != 0 and fsystem != fstype:
- raise ValueError, "--onpart specified for mount point %s on non-ext2 partition without --noformat option" % mntpoint
+ raise ValueError, "--onpart specified for mount point %s on non-ext2 or non-xfs partition without --noformat option" % mntpoint
return ddruid
else:
@@ -234,6 +276,20 @@
def getMbrDevice(self):
return self.driveList()[0]
+ def getBootFS(self):
+ bootFS = None
+ rootFS = None
+ for (mntpoint, partition, fsystem, doFormat, size) in self.mountList():
+ if mntpoint == '/':
+ rootFS = fsystem
+ elif mntpoint == '/boot':
+ bootFS = fsystem
+
+ if not bootFS:
+ bootFS = rootFS;
+
+ return bootFS
+
def getBootDevice(self):
bootDevice = None
rootDevice = None
@@ -280,7 +336,7 @@
def setDruid(self, druid, raid):
self.ddruid = druid
- self.fsCache = {}
+# self.fsCache = {}
for (mntPoint, raidDev, level, devices) in raid:
if mntPoint == "swap":
fsystem = "swap"
@@ -294,7 +350,7 @@
fstab = []
for (mntpoint, dev, fstype, reformat, size) in self.cachedFstab:
- fstab.append ((dev, mntpoint))
+ fstab.append ((dev, mntpoint, fstype))
self.ddruid = self.fsedit(0, self.driveList(), fstab, self.zeroMbr,
self.readOnly, self.upgrade,
@@ -344,11 +400,19 @@
def setFormatFilesystem(self, device, format):
for (mntpoint, partition, fsystem, doFormat, size) in self.mountList():
if partition == device:
- self.fsCache[(partition, mntpoint)] = (format,)
+ self.fsCache[(partition, mntpoint)] = (format, fsystem)
return
raise TypeError, "unknown partition to format %s" % (device,)
+ def setFsType(self, device, fstype):
+ for (mntpoint, partition, fsystem, doFormat, size) in self.mountList():
+ if partition == device:
+ log ("Got type %s for %s" % (fstype, device))
+ self.fsCache[(partition, mntpoint)] = (doFormat, fstype)
+ return
+
+
# sorted largest to smallest
def spaceSort(self, a, b):
(m1, s1) = a
@@ -364,7 +428,7 @@
def filesystemSpace(self, topMount):
space = []
for (mntpoint, partition, fsystem, doFormat, size) in self.mountList():
- if fsystem == 'ext2':
+ if fsystem == 'ext2' or fsystem == 'xfs':
try:
space.append((mntpoint, isys.fsSpaceAvailable(topMount + '/' + mntpoint)))
except SystemError:
@@ -380,13 +444,24 @@
def formatAllFilesystems(self):
for (partition, mount, fsystem, size) in self.ddruid.getFstab():
- if mount[0] == '/' and fsystem == "ext2":
- self.fsCache[(partition, mount)] = (1,)
+
+ # This is a bit kludgey, but we just want to make sure we format the
+ # fs - DON'T change the filesystem type to what we got from ddruid!
+ # (ddruid thinks all type 83 partitions are ext2 :/ )
+ # So, get orig_fsystem out of the fsCache
+
+ if mount[0] == '/' and ( fsystem == "ext2" or fsystem == "xfs"):
+ (format, orig_fsystem) = self.fsCache[(partition, mount)]
+ log("got fs %s for mount %s from getFstab\n", orig_fsystem, mount)
+ self.fsCache[(partition, mount)] = (1, orig_fsystem)
+
(devices, raid) = self.ddruid.partitionList()
for (mount, partition, fsystem, level, i, j, deviceList) in \
self.raidList()[1]:
- if mount[0] == '/' and fsystem == "ext2":
- self.fsCache[(partition, mount)] = (1,)
+ if mount[0] == '/' and (fsystem == "ext2" or fsystem == "xfs"):
+ (format, orig_fsystem) = self.fsCache[(partition, mount)]
+ log("got fs %s for mount %s from raidList\n", orig_fsystem, mount)
+ self.fsCache[(partition, mount)] = (1, orig_fsystem)
# FSOptions is a list of options to be passed when creating fs for mount
def setfsOptions (self, mount, fsopts):
@@ -431,7 +506,7 @@
if n == dev:
continue
- if fstype == "ext2" or (fstype == "vfat" and mount == "/boot/efi"):
+ if fstype == "ext2" or fstype == "xfs" or (fstype == "vfat" and mount == "/boot/efi"):
l.append(item)
return l
@@ -512,7 +587,7 @@
iutil.execWithRedirect ("/usr/sbin/mkswap",
[ "mkswap", '-v1', file ],
stdout = None, stderr = None)
- os.chmod(file, 0600)
+
formatThisSwap = 1
else:
log("swap file %s is in the fstab, but does not exist",
@@ -756,7 +831,23 @@
continue
isys.makeDevInode(device, '/tmp/' + device)
- if fsystem == "ext2":
+
+ if fsystem == "xfs":
+ log ("Making XFS filesystem for %s" % (device))
+ args = [ 'mkfs.xfs','-f','-l','internal', '/tmp/' + device ]
+
+ fsopts = self.getfsOptions(mntpoint)
+ if fsopts:
+ args.extend(fsopts)
+
+ w = self.waitWindow(_("Formatting"),
+ _("Formatting %s filesystem...") % (mntpoint,))
+
+ iutil.execWithRedirect ("/usr/sbin/mkfs.xfs",
+ args, stdout = messageFile,
+ stderr = messageFile, searchPath = 1)
+ w.pop()
+ elif fsystem == "ext2":
label = createLabel(labels, mntpoint)
args = [ "/usr/sbin/mke2fs", '/tmp/' + device, '-L', label ]
# FORCE the partition that MILO has to read
@@ -776,8 +867,8 @@
elif rtype == 0:
args = args + [ '-R', 'stride=%d' % (rdisks * 16) ]
- if self.badBlockCheck:
- args.append ("-c")
+ if (self.badBlockCheck):
+ args.append ("-c")
fsopts = self.getfsOptions(mntpoint)
if fsopts:
@@ -844,9 +935,16 @@
isys.losetup("/tmp/loop1", "/mnt/loophost/redhat.img",
readOnly = readOnly)
isys.mount("loop1", instPath, readOnly = readOnly)
- elif fsystem == "ext2" or fsystem == "ext3" or \
+ elif fsystem == "ext2" or fsystem == "ext3" or fsystem == "xfs" or \
(fsystem == "vfat" and mntpoint == "/boot/efi"):
try:
+ # Sanity check fs type before we try to mount
+ if not doFormat:
+ if isValidXFS(device):
+ fsystem = "xfs"
+ elif isValidExt2(device):
+ fsystem = "ext2"
+
iutil.mkdirChain(instPath + mntpoint)
isys.mount(device, instPath + mntpoint, fstype = fsystem,
readOnly = readOnly)
@@ -889,7 +987,7 @@
if mntpoint == '/':
f.write (format % ( devName, mntpoint, fs, 'defaults', 1, 1))
else:
- if fs == "ext2":
+ if fs == "ext2" or fs == "xfs":
f.write (format % ( devName, mntpoint, fs, 'defaults', 1, 2))
elif fs == "iso9660":
f.write (format % ( devName, mntpoint, fs, 'noauto,owner,ro', 0, 0))
@@ -962,11 +1060,16 @@
continue
if not self.fsCache.has_key((partition, mount)):
- if mount == '/home' and isValidExt2(partition):
- self.fsCache[(partition, mount)] = (0, )
+ if mount == '/home' and ( isValidExt2(partition) or isValidXFS(partition) ):
+ self.fsCache[(partition, mount)] = (0, fsystem)
else:
- self.fsCache[(partition, mount)] = (1, )
- (doFormat,) = self.fsCache[(partition, mount)]
+ self.fsCache[(partition, mount)] = (1, fsystem)
+
+# # So now, we don't want to overwrite the fsystem type,
+# # with what getFstab gets from partitions types
+# # Get it from the cache (I hope!) and append THAT
+
+ (doFormat, fsystem) = self.fsCache[(partition, mount)]
fstab.append((mount, partition, fsystem, doFormat, size ))
for (raidDevice, mntPoint, fsType, deviceList) in self.existingRaid:
@@ -976,13 +1079,14 @@
# Add raid mounts to mount list
(devices, raid) = self.raidList()
- for (mntpoint, device, fsType, raidType, start, size, makeup) in raid:
- if fsType == "swap": continue
+ for (mntpoint, device, fsystem, raidType, start, size, makeup) in raid:
+ if fsystem == "swap": continue
if not self.fsCache.has_key((device, mntpoint)):
- self.fsCache[(device, mntpoint)] = (1, )
- (doFormat,) = self.fsCache[(device, mntpoint)]
- fstab.append((mntpoint, device, fsType, doFormat, size ))
+ self.fsCache[(device, mntpoint)] = (1, fsystem)
+
+ (doFormat, fsystem) = self.fsCache[(device, mntpoint)]
+ fstab.append((mntpoint, device, fsystem, doFormat, size ))
if not skipExtra:
for n in self.extraFilesystems:
@@ -1184,7 +1288,7 @@
# all valid fstab entries have 6 fields
if len (fields) < 4 or len (fields) > 6: continue
- if fields[2] != "ext2" and fields[2] != "ext3" and fields[2] != "swap" and fields[3] != "vfat":
+ if fields[2] != "ext2" and fields[2] != "ext3" and fields[2] != "swap" and fields[2] != "xfs" and fields[3] != "vfat":
continue
if string.find(fields[3], "noauto") != -1: continue
diff -urN anaconda-7.1/gui.py anaconda-7.1-xfs/gui.py
--- anaconda-7.1/gui.py Thu Apr 5 11:30:32 2001
+++ anaconda-7.1-xfs/gui.py Mon Dec 3 16:25:42 2001
@@ -346,10 +346,11 @@
def run (self, todo, test = 0):
# This is the same as the file
if todo.reconfigOnly:
+ commonSteps = [ ( SGIWelcomeWindow, "sgi" ) ]
if not todo.serial:
- commonSteps = [ ( ReconfigWelcomeWindow, "reconfig"),
- ( KeyboardWindow, "keyboard" ),
- ]
+ commonSteps = commonSteps + [ ( ReconfigWelcomeWindow, "reconfig"),
+ ( KeyboardWindow, "keyboard" ),
+ ]
commonSteps = commonSteps + [
( NetworkWindow, "network" ),
@@ -363,15 +364,15 @@
else:
if todo.serial:
- commonSteps = [ ( LanguageWindow, "language" ),
- ( WelcomeWindow, "welcome" ),
+ commonSteps = [ ( SGIWelcomeWindow, "sgi" ),
+ ( LanguageWindow, "language" ),
( InstallPathWindow, "installtype" ),
]
else:
- commonSteps = [ ( LanguageWindow, "language" ),
+ commonSteps = [ ( SGIWelcomeWindow, "sgi" ),
+ ( LanguageWindow, "language" ),
( KeyboardWindow, "keyboard" ),
( MouseWindow, "mouse" ),
- ( WelcomeWindow, "welcome" ),
( InstallPathWindow, "installtype" ),
]
diff -urN anaconda-7.1/harddrive.py anaconda-7.1-xfs/harddrive.py
--- anaconda-7.1/harddrive.py Thu Mar 8 20:59:04 2001
+++ anaconda-7.1-xfs/harddrive.py Mon Dec 3 16:25:42 2001
@@ -149,7 +149,7 @@
self.isoDirIsMounted = 0
def readComps(self, hdlist):
- self.mountMedia(1)
+ self.mountMedia(3)
cs = ComponentSet(self.tree + '/RedHat/base/comps', hdlist)
self.umountMedia()
return cs
@@ -162,7 +162,7 @@
return self.tree + "/RedHat/RPMS/" + h[1000000]
def readHeaders(self):
- self.mountMedia(1)
+ self.mountMedia(3)
hl = HeaderListFromFile(self.tree + "/RedHat/base/hdlist")
self.umountMedia()
@@ -178,12 +178,12 @@
return hl
def mergeFullHeaders(self, hdlist):
- self.mountMedia(1)
+ self.mountMedia(3)
hdlist.mergeFullHeaders(self.tree + "/RedHat/base/hdlist2")
self.umountMedia()
def systemMounted(self, fstab, mntPoint, selected):
- self.mountMedia(1)
+ self.mountMedia(3)
def filesDone(self):
self.umountMedia()
diff -urN anaconda-7.1/help/C/s1-help-screens-format.html anaconda-7.1-xfs/help/C/s1-help-screens-format.html
--- anaconda-7.1/help/C/s1-help-screens-format.html Tue Mar 13 12:27:36 2001
+++ anaconda-7.1-xfs/help/C/s1-help-screens-format.html Mon Dec 3 16:25:42 2001
@@ -42,6 +42,13 @@
blocks on a drive and making a list of them to prevent data from being
written to them in the future.
Do you want to use the XFS Filesystem?
+
SGI's XFS Filesystem is a high-performance, scalable,
+ journaling filesystem.
+