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

深入解读 Entity Framework 4.0和4.1

记得去年初就开始关注Entity Framework,那时只是简单测试了一下,发现较之Nhibernate不太成熟。当时的EF主要表驱动方式开发,过度依赖edm文件,并且数据层耦合了模型层,让一些MV...
  • GoodShot
  • GoodShot
  • 2012年07月02日 18:18
  • 1591

pod repo update

三个人共同维护一个项目时,Podfile也是共同维护一份。有一天一个人,升级了Podfile中某个库的版本,比如SnapKit升级到了4.0.0, pod ‘SnapKit’, ‘~> 4.0.0’。...
  • u012581760
  • u012581760
  • 2017年12月18日 09:17
  • 61

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

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

CentOS下yum update与yum upgrade的区别

CentOS下yum update与yum upgrade的区别
  • php521php
  • php521php
  • 2015年01月29日 19:40
  • 6479

Centos安装Redis4.0.0

一、下载 命令:wget http://download.redis.io/releases/redis-4.0.0.tar.gz 执行完之后,你会看到一个打包的文件: 二、解包 ...
  • candy_rainbow
  • candy_rainbow
  • 2017年09月15日 14:53
  • 363

centos yum update 指定版本 6.4 to 6.5

修改CentOS-Base.repo为 cat CentOS-Base.repo # CentOS-Base.repo # # The mirror system uses the c...
  • drcwr
  • drcwr
  • 2014年12月10日 15:28
  • 1824

Tesseract 4.0的安装

在macOS上,homebrew默认给我们安装的是3.0.5(2017年6月)。 想要用4.0版还需要自己编译,官方教程:Compiling Tesseract 4.0 而官方教程中,macOS用...
  • u013993802
  • u013993802
  • 2017年07月10日 18:07
  • 1698

RACEVB6 4.0 update

 RACEVB6 has been updated to version 4.0:Updated many opcodesAdded new opcodesIncludes bug fix of 3....
  • linhanshi
  • linhanshi
  • 2007年10月31日 11:37
  • 548

解决 CentOS 6.4 yum不能更新升级的问题

我在一台 Intel Celeron 2.1 老机器和笔记本的VMware虚拟机里分别自定义图形界面安装 CentOS 6.4(i386),安装后,都不能使用 yum 安装和更新软件。     ...
  • chtdsl
  • chtdsl
  • 2013年04月29日 10:10
  • 4320

Linux: CentOS的自带的源更新速度太慢

cd /etc/yum.repos.d mv CentOS-Base.repo  CentOS-Base.repo.save wget http://centos.ustc.edu.cn/Cent...
  • gaoyuanLinkconcept
  • gaoyuanLinkconcept
  • 2013年04月16日 18:55
  • 2238
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:centos 4.0 update
举报原因:
原因补充:

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