centos 4.0 update

原创 2017年01月03日 14:32:15

Linux: How to Update and Rebuild CentOS 4 Installation CDs

Question: I found your Fedora Core 2 update page. How can I create new installation CDs for CentOS 4 with the updates already included?

Answer: As with Fedora Core 2, CentOS comes with all of the tools you need to accomplish this. To be consistent, we've provided our procedure broken down into 5 steps below. (This procedure assumes CentOS 4.1 since this is the latest release at the time of writing.)

Since CentOS 4 seems to have the same problem with the DAC960 RAID controller as Fedora Core 2, we've also included a DAC drive fix in our procedure.

Step 1: Preparation

This procedure is not for the novice. If you find this document confusing, it would be best to find an experienced Linux user to help you through it.

To start, a proper build environment is required.

You'll need a computer with CentOS 4 installed on it and 10GB of free hard disk space.

You'll need to be the super user (root) to proceed from here. Commands are assumed to be executed from a bash shell.

The following packages (As well as any packages these require.) will also need to be installed from the installation CD:

anaconda-10.1.1.19-1
anaconda-help-10.1.0-1
anaconda-runtime-10.1.1.19-1

Find a location on your hard disk which has the necessary space and type the following commands:

export PYTHONPATH=/usr/lib/anaconda
export PATH="$PATH:/usr/lib/anaconda-runtime"
export BUILDBASE='pwd'
mkdir -p $BUILDBASE/linux/i386/SRPMS
export ARCH=i386

These commands will create a scratchpad area to work from and setup some convenience environment variables.

Next, download all four of the installation ISOs from the CentOS website into the $BUILDBASE/linux directory.

Once the ISO files are downloaded, we will need to extract their contents into our working directory. You can do so with the following commands. (You should place these into a script and execute it.)

#!/bin/bash

for iso in CentOS-4.1-i386-bin1of4.iso CentOS-4.1-i386-bin2of4.iso CentOS-4.1-i386-bin3of4.iso CentOS-4.1-i386-bin4of4.iso; do

   mount -o loop $BUILDBASE/linux/$iso /mnt ; cd /mnt ; \
   tar -cf - * | ( cd $BUILDBASE/linux/i386/ ; tar -xpf - ) ; \
   cd $BUILDBASE ; umount /mnt

done

If all went well, you can erase the installation ISO files. (You may need the space!)

Step 2: DAC960 Fix

The following steps are required ONLY if you are attempting to fix a booting issue with the DAC960 RAID controller. (The installation CD released by CentOS has a bug which does not allow CentOS 4 to be installed on some computers.)

Proceed to Step 3 if you wish to skip this step.

First, retrieve the latest CentOS 4 kernel source update from a CentOS mirror site. (At the time of writing this web page, it was: kernel-2.6.9-11.EL.src.rpm)

Install the RPM by typing:

rpm -i kernel-2.6.9-11.EL.src.rpm

Go to the /usr/src/redhat/SOURCES directory and modify the following line in the kernel-2.6.9-i586.config file:

# CONFIG_X86_UP_APIC is not set

Change it to:

CONFIG_X86_UP_APIC=y

Next, add the following line below this one and save the file:

CONFIG_X86_UP_IOAPIC=y

Go to the /usr/src/redhat directory and rebuild all of the kernel RPMs by typing:

rpmbuild -ba --target=i586 SPECS/kernel-2.6.spec

This will take a while, but if all goes well, there should be a new set of kernel RPMs in this directory:

/usr/src/redhat/RPMS/i586

Replace the kernel in the $BUILDBASE/linux/i386/CentOS/RPMS directory with the corresponding update from the /usr/src/redhat/RPMS/i586 directory. To do this, type the following command:

cp /usr/src/redhat/RPMS/i586/kernel-2.6.9-11.EL.i586.rpm $BUILDBASE/linux/i586/CentOS/RPMS/.

Step 3: Other updates

If desired at this point, you can download any available updates from a CentOS mirror site and replace each RPM package in the $BUILDBASE/linux/i386/CentOS/RPMS directory with its update.

Step 4: Build

First, we need to re-generate the hdlist file. Do so with the following command:

genhdlist $BUILDBASE/linux/i386

Next, create our package order file by issuing the following command:

pkgorder $BUILDBASE/linux/i386 i386 | tee $BUILDBASE/linux/pkgfile.'date +%Y-%m-%d'

Now, update the installation files by entering the following command:

buildinstall --comp dist-4.1 --pkgorder $BUILDBASE/linux/pkgfile.'date +%Y-%m-%d' \
--version 4.1 --product 'CentOS' --release 'CentOS 4.1' \
$BUILDBASE/linux/i386

Step 5: CD creation

Now that we have completed the build, it's time to split up the files into their CDs and make new ISOs. The following commands will do the split and re-create the hdlist files for each CD:

RELEASE="CentOS 4.1 with updates to $(date '+%Y-%M-%d %H:%m')"

rm -rf $BUILDBASE/linux/i386-disc[1-8]
splittree.py --arch=i386 --total-discs=8 --bin-discs=4 --src-discs=4 --release-string="$RELEASE" \
--pkgorderfile=$BUILDBASE/linux/pkgfile.'date +%Y-%m-%d' \
--distdir=$BUILDBASE/linux/i386 \
--srcdir=$BUILDBASE/linux/i386/SRPMS --productpath=CentOS

rm -f $BUILDBASE/i386-disc1/CentOS/base/hdlist*
genhdlist --withnumbers --fileorder \
$BUILDBASE/fedora/pkgfile.'date +%Y-%m-%d' \
$BUILDBASE/linux/i386-disc[1234]

Finally, create a bash script with the commands listed below and execute it. This will create brand new modified ISO images, which you can use to install CentOS Linux!

(You will need to run the following script from the $BUILDBASE/linux directory.)

#!/bin/sh

myname="Joe Blow <joe@joe.blow>"
bootimg="isolinux/isolinux.bin"
bootcat="isolinux/boot.cat"
distname="CentOS"
distvers="4.1"
mkisopts="-R -J -T"
bootopts="-no-emul-boot -boot-load-size 4 -boot-info-table"
mydate="$(date '+%d %b %Y')"
mkisofs $mkisopts $bootopts \
-V "CentOS $distver ($distname) UPDATED Disk 1" \
-A "CentOS $distver ($distname) update created on $mydate" \
-P "$myname" \
-p "$myname" \
-b "$bootimg" \
-c "$bootcat" \
-x lost+found \
-o "$distname"-i386-disc1.iso \
i386-disc1

for i in 2 3 4 ; do
mkisofs $mkisopts \
-V "CentOS $distver ($distname) UPDATED Disk $i" \
-A "CentOS $distver ($distname) update created on $mydate" \
-P "$myname" \
-p "$myname" \
-x lost+found \
-o "$distname"-i386-disc${i}.iso \
i386-disc${i}
done



https://www.techonthenet.com/linux/centos4_update.php

相关文章推荐

MSCRM4.0实体所有权组织更改为用户(mscrm update entity ownership)

原由:由于用户新建实体时选择了所有权属于:组织,导致角色权限建立的时候只能是组织级别的,所以需要更改实体的所有权,MSCRM4.0测试通过没有任何问题 方法一:最老实的方法,将该实体删除后重新建立,...
  • xxyping
  • xxyping
  • 2011年11月03日 15:18
  • 421

ultraedit 4.0 centos及debian 附破解方法

  • 2013年04月27日 16:22
  • 77.01MB
  • 下载

CentOS update MySQL

# 准备# 系统版本more /etc/redhat-release# repo网站 http://repo.mysql.com/# 安装源rpm -Uvh http://repo.mysql.com...

virtualbox安装centos7虚拟机,yum update出现safe thing yum can do is fail

也算是第一次真正的在虚拟机上装centos7虚拟机,之前在腾讯买云服务器也装的centos7,感觉还是挺好用的,装完之后发现输入yum update 命令出现safe thing yum can d...

CentOS下升级系统 yum update命令 自己配置更新源

我在CentOS系统下用yum update命令不能更新,提示: Cannot retrieve repository metadata (repomd.xml) for repository: up...
  • chtdsl
  • chtdsl
  • 2013年04月29日 10:12
  • 5303

centos下安装xen4.0

centos下安装xen4.02010-10-25 21:30http://xen.1045712.n5.nabble.com/Xen-from-source-hg-unstable-with-2-6...

CentOS6.3安装CloudStack4.0

一、实验环境: 主机名                IP(Static)                            系统                              ...

CentOS 6.6下安装OpenOffice4.0

CentOS 6.6下安装OpenOffice4.0 标签: centosopenoffice 2014-12-27 11:03 7628人阅读 评论(1) 收藏 举报 分类: L...

Centos6.0下安装mono 4.0和Jexus 5.6.4,并配置运行网站

很多朋友想要在Linux下部署asp.net的网站,但是又苦于不懂配置环境。今天,我在这里给大家讲解一下如何在Centos 7.0下安装最新版的mono 4.0.0 + Jexus 5.6.4,并配置...

如何在Ubuntu/CentOS上安装Linux内核4.0

警告: 安装新的内核可能会导致你的系统不可用或不稳定。如果你仍然使用以下命令继续安装,请确保备份所有重要数据到外部硬盘。 在Ubuntu 15.04上安装Linux内核4.0 如果你正在使用...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:centos 4.0 update
举报原因:
原因补充:

(最多只允许输入30个字)