summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autopart.py43
-rw-r--r--fsset.py3
-rw-r--r--loader/module-info4
-rw-r--r--partedUtils.py3
-rw-r--r--scripts/mk-images.alpha63
5 files changed, 96 insertions, 20 deletions
diff --git a/autopart.py b/autopart.py
index 907ee47b1..37e136f54 100644
--- a/autopart.py
+++ b/autopart.py
@@ -33,6 +33,8 @@ PARTITION_SUCCESS = 0
BOOT_ABOVE_1024 = -1
BOOTEFI_NOT_VFAT = -2
+BOOTALPHA_NOT_BSD = -3
+BOOTALPHA_NO_RESERVED_SPACE = -4
DEBUG_LVM_GROW = 0
@@ -54,9 +56,44 @@ def bootRequestCheck(requests, diskset):
elif iutil.getArch() == "i386":
if partedUtils.end_sector_to_cyl(part.geom.disk.dev, part.geom.end) >= 1024:
return BOOT_ABOVE_1024
+ elif iutil.getArch() == "alpha":
+ return bootAlphaCheckRequirements(part, diskset)
return PARTITION_SUCCESS
+# Alpha requires a BSD partition to boot. Since we can be called after:
+#
+# - We re-attached an existing /boot partition (existing dev.drive)
+# - We create a new one from a designated disk (no dev.drive)
+# - We auto-create a new one from a designated set of disks (dev.drive
+# is a list)
+#
+# it's simpler to get disk the partition belong to through dev.device
+# Some other tests pertaining to a partition where /boot resides are:
+#
+# - There has to be at least 1 MB free at the begining of the disk
+# (or so says the aboot manual.)
+
+def bootAlphaCheckRequirements(part, diskset):
+ disk = part.geom.disk
+
+ # Disklabel check
+ if not disk.type.name == "bsd":
+ return BOOTALPHA_NOT_BSD
+
+ # The first free space should start at the begining of the drive
+ # and span for a megabyte or more.
+ free = disk.next_partition()
+ while free:
+ if free.type & parted.PARTITION_FREESPACE:
+ break
+ free = disk.next_partition(free)
+ if not free or free.geom.start != 1L or getPartSizeMB(free) < 1:
+ return BOOTALPHA_NO_RESERVED_SPACE
+
+ return PARTITION_SUCCESS
+
+
def printNewRequestsCyl(diskset, newRequest):
for req in newRequest.requests:
if req.type != REQUEST_NEW:
@@ -920,7 +957,11 @@ def doPartitioning(diskset, requests, doRefresh = 1):
ret = bootRequestCheck(requests, diskset)
- if ret != PARTITION_SUCCESS:
+ 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)
+ 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)
+ 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)
diff --git a/fsset.py b/fsset.py
index af254a51a..fc3dab595 100644
--- a/fsset.py
+++ b/fsset.py
@@ -661,7 +661,8 @@ class swapFileSystem(FileSystemType):
file = entry.device.setupDevice(chroot)
rc = iutil.execWithRedirect ("/usr/sbin/mkswap",
[ "mkswap", '-v1', file ],
- stdout = None, stderr = None,
+ stdout = "/dev/tty5",
+ stderr = "/dev/tty5",
searchPath = 1)
if rc:
raise SystemError
diff --git a/loader/module-info b/loader/module-info
index a2f7b9a29..b8fb8456a 100644
--- a/loader/module-info
+++ b/loader/module-info
@@ -650,6 +650,10 @@ ips
scsi_hostadapter
"IBM ServeRAID"
+isp_mod
+ scsi_hostadapter
+ "QLogic SCSI"
+
megaraid
scsi_hostadapter
"MegaRAID 418, 428, 438, 466, 762"
diff --git a/partedUtils.py b/partedUtils.py
index 2938a1386..476e2bd35 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -217,6 +217,8 @@ def getDefaultDiskType():
return parted.disk_type_get("GPT")
elif iutil.getArch() == "s390":
return parted.disk_type_get("dasd")
+ elif iutil.getArch() == "alpha":
+ return parted.disk_type_get("bsd")
else:
# XXX fix me for alpha at least
return parted.disk_type_get("msdos")
@@ -224,6 +226,7 @@ def getDefaultDiskType():
archLabels = {'i386': ['msdos'],
'alpha': ['bsd'],
's390': ['dasd'],
+ 'alpha': ['bsd', 'msdos'],
'ia64': ['msdos', 'GPT']}
def checkDiskLabel(disk, intf):
diff --git a/scripts/mk-images.alpha b/scripts/mk-images.alpha
index de2b733c1..c6395684c 100644
--- a/scripts/mk-images.alpha
+++ b/scripts/mk-images.alpha
@@ -1,4 +1,9 @@
-SECSTAGE="raid0 raid1 raid5 ext3"
+NETMODULES="nfs de4x5 tulip depca eepro100 acenic tg3"
+SCSIMODULES="sd_mod isp_mod ide-cd aic7xxx"
+EXTRASCSI="DAC960 cpqfc BusLogic 3w-xxxx dmx3191d dpt_i2o megaraid ncr53c8xx sym53c8xx qlogicisp qlogicfc qla2x00 qla1280 cciss cpqarray"
+EXTRANET="3c509 3c59x 8139too dl2k eepro epic100 ewrk3 hamachi natsemi ne2k-pci ns83820 starfire yellowfin"
+
+SECSTAGE="sd_mod raid0 raid1 raid5 ext3 $NETMODULES $SCSIMODULES $EXTRASCSI $EXTRANET"
prepareBootImage() {
dd if=/dev/zero of=$MBD_TMPIMAGE bs=1k count=$BOOTDISKSIZE 2>/dev/null
@@ -8,7 +13,20 @@ prepareBootImage() {
mount $LODEV -t ext2 $MBD_BOOTTREE
mkdir -p $MBD_BOOTTREE/etc
cat > $MBD_BOOTTREE/etc/aboot.conf <<EOF
-0:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 root=/dev/fd0
+#
+# Red Hat Linux/Alpha aboot configuration options:
+#
+# 0 - Boot the Red Hat Linux installer using a 2.4 kernel
+# 1 - Boot the Red Hat Linux installer in non graphical mode
+# 2 - Boot the Red Hat Linux installer in text only mode on ttyS0
+# for installation control via the serial port
+# 3 - Boot in rescue mode
+#
+0:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=tty0 root=/dev/fd0
+1:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=tty0 text root=/dev/fd0
+2:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=ttyS0 text root=/dev/fd0
+3:vmlinux.gz load_ramdisk=1 prompt_ramdisk=1 console=tty0 rescue root=/dev/fd0
+
EOF
cat > $MBD_BOOTTREE/etc/milo.conf <<EOF
image=/vmlinux.gz
@@ -22,8 +40,6 @@ EOF
mount -o loop -t ext2 $MBD_TMPIMAGE $MBD_BOOTTREE
}
-NETMODULES="nfs 3c59x de4x5 depca eepro100 ibmtr old_tulip tulip ne"
-SCSIMODULES="aic7xxx DAC960 ide-cd"
mkdir -p $TOPDESTPATH/boot
cp $BOOTDISKDIR/bootlx $TOPDESTPATH/boot
@@ -31,32 +47,40 @@ cp $BOOTDISKDIR/bootlx $TOPDESTPATH/boot
mkdir -p $TOPDESTPATH/etc
cat > $TOPDESTPATH/etc/aboot.cfg <<EOF
#
-# Red Hat Linux/Alpha aboot configuration
-#
-# Options:
+# Red Hat Linux/Alpha aboot configuration options:
#
-# 0 - boot into the Red Hat Linux installer
-# 1 - boot into the Red Hat Linux installer using a 2.4 kernel
-# 2 - boot into the Red Hat Linux installer using a Jensen kernel
+# 0 - Boot the Red Hat Linux installer using a 2.4 kernel
+# 1 - Boot the Red Hat Linux installer with kernel messages sent to ttyS0
+# 2 - Boot the Red Hat Linux installer in text only mode
+# 3 - Boot the Red Hat Linux installer in text only rescue mode
#
-0:/kernels/vmlinux.gz initrd=/images/ramdisk.img
-1:/kernels/vmlinuz.24 initrd=/images/ramdisk.img
-2:/kernels/vmlinuz.j initrd=/images/ramdisk.img
+0:/kernels/vmlinux.gz initrd=/images/cdrom.img
+1:/kernels/vmlinux.gz initrd=/images/cdrom.img console=ttyS0
+2:/kernels/vmlinux.gz initrd=/images/cdrom.img text
+3:/kernels/vmlinux.gz initrd=/images/cdrom.img rescue
+
EOF
makeinitrd --initrdto $TOPDESTPATH/images/ramdisk.img \
--initrdsize 4096 \
--padsize 1440 \
--loaderbin loader \
- --modules "$NETMODULES $SCSIMODULES vfat cramfs"
+ --modules "$NETMODULES $SCSIMODULES"
+
+makeinitrd --initrdto $TOPDESTPATH/images/cdrom.img \
+ --initrdsize 8192 \
+ --loaderbin loader \
+ --modules "$NETMODULES $SCSIMODULES $EXTRASCSI $EXTRANET"
makebootdisk --bootdisksize 1440 --kernelto $TOPDESTPATH/kernels/vmlinux.gz \
--imagename generic.img
-makemainmodules "$SECSTAGE $SCSIMODULES"
-makeinstimage "netstg" "$SECSTAGE $SCSIMODULES"
-makeinstimage "hdstg" "$SECSTAGE $NETMODULES"
-makemainimage "stage2" "cramfs"
+
+makemainmodules "$SECSTAGE"
+makeinstimage "netstg" "$SECSTAGE"
+makeinstimage "hdstg" "$SECSTAGE"
+makemainimage "stage2" "cramfs "
+
if [ -f $TOPDESTPATH/preview/RPMS/kernel-2.4.0-*.alpha.rpm ]; then
K24_PKG=$TOPDESTPATH/preview/RPMS/kernel-2.4.0-*.alpha.rpm
@@ -77,4 +101,7 @@ if [ -f $KERNELPATH/kernel-jensen-*.rpm ]; then
rm -rf $KJ_DIR
fi
+makedriverdisk --padsize 1440 "Supplemental Block Device Drivers" "drvblock" "$SCSIMODULES $EXTRASCSI +scsi"
+makedriverdisk --padsize 1440 "Supplemental Network Device Drivers" "drvnet" "$NETMODULES $EXTRANET +net"
+