+ -
当前位置:首页 → 问答吧 → 制作Fedora DVD ISO的方法

制作Fedora DVD ISO的方法

时间:2003-11-08

来源:互联网

现在的DVDROM挺便宜的,我们可以应用一个脚本,把我们下载的ISO文件刻成DVD镜象文件,具体方法如下:
1、 下载以下脚本:


代码:
#/bin/bash

# by Chris Kloiber <[email protected]>

# A quick hack that will create a bootable DVD iso of a Red Hat Linux
# Distribution. Feed it either a directory containing the downloaded
# iso files of a distribution, or point it at a directory containing
# the "RedHat", "isolinux", and "images" directories.

# This version only works with "isolinux" based Red Hat Linux versions.

# Lots of disk space required to work, 3X the distribution size at least.

# GPL version 2 applies. No warranties, yadda, yadda. Have fun.


if [ $# -lt 2 ]; then
 echo "Usage: `basename $0` source /destination/DVD.iso"
 echo ""
 echo " The 'source' can be either a directory containing a single"
 echo " set of isos, or an exploded tree like an ftp site."
 exit 1
fi

cleanup() {
[ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit
[ -d $LOOP ] && rm -rf $LOOP 
[ ${DVD:=~/mkrhdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit
[ -d $DVD ] && rm -rf $DVD 
}

cleanup
mkdir -p $LOOP
mkdir -p $DVD

if [ !`ls $1/*.iso 2>&1>/dev/null ; echo $?` ]; then
 echo "Found ISO CD images..."
 CDS=`expr 0`
 DISKS="1"

 for f in `ls $1/*.iso`; do
 mount -o loop $f $LOOP
 cp -av $LOOP/* $DVD
 if [ -f $LOOP/.discinfo ]; then
 cp -av $LOOP/.discinfo $DVD
 CDS=`expr $CDS + 1`
 if [ $CDS != 1 ] ; then
 DISKS=`echo ${DISKS},${CDS}`
 fi
 fi
 umount $LOOP
 done
 if [ -e $DVD/.discinfo ]; then
 awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="$DISKS" $DVD/.discinfo > $DVD/.discinfo.new
 mv $DVD/.discinfo.new $DVD/.discinfo
 fi
else
 echo "Found FTP-like tree..."
 cp -av $1/* $DVD
 [ -e $1/.discinfo ] && cp -av $1/.discinfo $DVD
fi

rm -rf $DVD/isolinux/boot.cat
find $DVD -name TRANS.TBL | xargs rm -f

cd $DVD
mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .
/usr/lib/anaconda-runtime/implantisomd5 --force $2

cleanup
echo ""
echo "Process Complete!"
echo ""

2、然后运行
# mkdvdiso.sh /path/to/the/cd/isos /location/and/name/of/dvd.iso

# growisofs -Z /dev/scd0=/location/and/name/of/dvd.iso

作者: dsj   发布时间: 2003-11-08

dsj兄,谢谢分享,可惜我没有DVD刻录机,有条件的朋友试试吧,呵

作者: flysail   发布时间: 2003-11-08

俺实验过了, 果然好使. 刻到DVDRAM上, 刚刚安装完毕, 不用换盘.

只要做到makedvdiso.sh那步即可, growisofs是刻录DVD.

等一下就刻到DVD-RW上, 将Fedora保存起来 估计RH9之类的,应该也可以用这个方法搞定, 有空也试试看.

作者: lrd   发布时间: 2003-11-17

redhat9做完第一步(正常结束),但镜像文件没产生,全盘搜索都找不到

操作目录为:/mnt/disk30g
镜像文件为:/mnt/disk30g/iso
执行:sh mkdvdiso.sh iso ./dvd.iso
正常完成后找不到dvd.iso,我哪里错了?还是redhat9不可以做?
另外mkdvdiso.sh不能直接执行,提示权限不够(我是以root登入且没改变用户)

作者: poleman   发布时间: 2004-01-11

有没有能在windows下把fc3的4张安装盘制作成一张dvd盘的已经成功的办法啊。
看了好多都是在linux里面制作的。小弟linux连上手都还没,对命令行十分陌生阿。
FC3安装盘里面的\images\boot.iso和diskboot.img是不是用来引导的?用nero可以吗?应该怎么做?
253了。

作者: Hellobobo   发布时间: 2005-03-16

看脚本的意思,是将 .discinfo 合并成一个大文件?

作者: bbbush   发布时间: 2005-03-16

好东西,得找个时间好好来弄弄

作者: Snoopy   发布时间: 2005-03-16

哪位大哥对shell比较熟,帮看看,能不能在直接编辑iso做个DVD的iso

作者: arone   发布时间: 2005-03-21

http://www.techonthenet.com/linux/fc2_update.htm

引用:
Linux: Updating and Rebuilding Fedora Core 2 Installation CDs

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

Answer: As with RedHat 9, Fedora Core 2 comes with all of the tools you need to accomplish this. To be consistent, we've provided our procedure broken down into 6 steps below.

Since Fedora Core 2 seems to have the same problem with the DAC960 RAID controller as RedHat 9, 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 Fedora Core 2 installed on it and 12GB of free hard disk space.

The following packages will also need to be installed from the installation CD:

anaconda-10.0-5
anaconda-images-10-3
anaconda-help-9.92-1
anaconda-runtime-10.0-5

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

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 FCBASE=`pwd`
mkdir -p $FCBASE/fedora/i386

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

Next, download all eight of the installation ISOs from the Fedora Core project website into the $FCBASE/fedora 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.

For each of the four installation CDs, do the following:

mount -o loop FC2-i386-disc1.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

mount -o loop FC2-i386-disc2.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

mount -o loop FC2-i386-disc3.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

mount -o loop FC2-i386-disc4.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

For each of the four source CDs do the following:

mount -o loop FC2-i386-SRPMS-disc1.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

mount -o loop FC2-i386-SRPMS-disc2.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

mount -o loop FC2-i386-SRPMS-disc3.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt

mount -o loop FC2-i386-SRPMS-disc4.iso /mnt ; cd /mnt ; tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - ) ; cd $FCBASE ; umount /mnt



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 the Fedora Core project has a bug which does not allow Fedora Core 2 to be installed on some computers.)

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

First, retrieve the latest Fedora Core 2 kernel source update from a Fedora Core mirror site. (At the time of writing this web page, it was: kernel-2.6.5-1.358.src.rpm)

Install the RPM by typing:

rpm -i kernel-2.6.5-1.358.src.rpm

Go to the /usr/src/redhat/SOURCES directory and modify the following line in the kernel-2.6.5-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

To maintain compatibility with RedHat's original boot disk, you need to edit the SPECS/kernel-2.6.spec file. Change the following line in the file:

%define rhbsys %([ -r /etc/beehive-root ] && echo || echo .`whoami`)

to:

%define rhbsys %([ -r /etc/beehive-root ])

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 BOOT kernel in the $FCBASE/fedora/i386/Fedora/RPMS directory with the corresponding update from the /usr/src/redhat/RPMS/i386 directory. To do this, type the following command:

cp /usr/src/redhat/RPMS/i386/kernel-2.6.5-1.358.i586.rpm $FCBASE/fedora/i386/Fedora/RPMS/.

Step 3: Other updates

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

Step 4: Cleanup

Many files will have been left around by the original CD creation process. These files will need to be removed with the following command:

find $FCBASE/fedora -name TRANS.TBL -exec rm -f {} \;

Step 5: Build

Fedora Core 2's anaconda utilities are somewhat broken, so you will need to download the following updated scripts and place them in the $FCBASE directory. (The remaining steps rely on these being present.)

buildinstall
genhdlist
pkgorder

If all has gone without a hitch, it's time to proceed to the build phase.

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

$FCBASE/genhdlist $FCBASE/fedora/i386

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

$FCBASE/pkgorder $FCBASE/fedora/i386 i386 | tee \ $FCBASE/fedora/pkgfile.`date +%Y-%m-%d`

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

$FCBASE/buildinstall \
--pkgorder $FCBASE/fedora/pkgfile.`date +%Y-%m-%d` \
--version 2 --product 'Fedora Core' --release 'Fedora Core 2' \ $FCBASE/fedora/i386

Step 6: 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="Fedora Core 2 (Tettnang) with updates to $(date '+%Y-%M-%d %Hm')"

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

rm -f $FCBASE/i386-disc1/Fedora/base/hdlist*
$FCBASE/genhdlist --withnumbers --fileorder \ $FCBASE/fedora/pkgfile.`date +%Y-%m-%d` \ $FCBASE/fedora/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 Fedora Core Linux!

#!/bin/sh

myname="Joe Blow <[email protected]>"
bootimg="isolinux/isolinux.bin"
bootcat="isolinux/boot.cat"
distname="Tettnang"
distvers="2"
mkisopts="-R -J -T"
bootopts="-no-emul-boot -boot-load-size 4 -boot-info-table"
mydate="$(date '+%d %b %Y')"
mkisofs $mkisopts $bootopts \
-V "Fedora Core $distver ($distname) UPDATED Disk 1" \
-A "Fedora Coret $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 "Fedora Core $distver ($distname) UPDATED Disk $i" \
-A "Fedora Core $distver ($distname) update created on $mydate" \
-P "$myname" \
-p "$myname" \
-x lost+found \
-o "$distname"-i386-disc${i}.iso \
i386-disc${i}
done

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




Copyright © 2003-2005 Tech on the Net. All rights reserved.


We are not responsible for any loss or liability incurred by using this information.

作者: bbbush   发布时间: 2005-04-12

http://bipolar.longbros.com/index.ph...&c=1&tb=1&pb=1

Bipolar's Weblog
Bipolar's Blog


引用:
Post details: Rebuilding Fedora Core 3 CD's
11/16/04
Permalink 12:52:46 pm, Categories: Linux, Server, Desktop, Laptop, 532 words English (US)
Rebuilding Fedora Core 3 CD's

Since I'm planning on installing Fedora Core 3 (FC3) on several machines, including servers, I decided to try to create updated installation cd's with all the latest updates. There are over 300MB of updates already, and I really didn't feel like waiting for a running system to update all those packages off the network. I started with the Core 2 instructions at techonthenet.com which I had to modify quite a bit to get working on FC3. Instead of pointing out all the changes I had to make, I'll just make another mini-howto right here. Note that I only work with the binary cd's, not the source ones. I never use the source cd's so you are on your own there.

[More:]

1) Create a directory somewhere to do all the work in, like ~/fedora-rebuild

2) Install the following packages. "yum install packagename" will work.

* anaconda
* anaconda-help
* anaconda-runtime

3) CD to the directory you created in step 1 and run:

export PYTHONPATH=/usr/lib/anaconda
export PATH="$PATH:/usr/lib/anaconda-runtime"
export FCBASE=`pwd`
mkdir -p $FCBASE/fedora/i386
mkdir -p $FCBASE/fedora/SRPMS

4) One at a time mount the original FC3 ISO's in loopback, and then copy the contents to $FCBASE. The following works:

mount -o loop /path/to/iso /iso/mountpoint
cd /iso/mountpoint
tar -cf - * | ( cd $FCBASE/fedora/i386/ ; tar -xpf - )
cd $FCBASE
umount /iso/mountpoint

5) Now you can replace the old RPM's with the updated ones. You can even add customized ones if you wish.

6) Remove all the old cd install files.

for i in `find -name TRANS.TBL`; do rm -f $i; done

7) Generate the hdlist file:

genhdlist --productpath=Fedora $FCBASE/fedora/i386

8) Create the package order file and datestamp it:

pkgorder $FCBASE/fedora/i386 i386 Fedora | tee $FCBASE/fedora/pkgfile.`date +%Y-%m-%d`

Don't worry about errors about "Ignoring" or "Removing".

9) Update the installation files with buildinstall like this:

buildinstall --pkgorder $FCBASE/fedora/pkgfile.`date +%Y-%m-%d` \
--version 3 --product 'Fedora Core' --release 'Fedora Core 3' \
--prodpath Fedora $FCBASE/fedora/i386

10) Set the release string:

export RELEASE="Fedora Core 3 (Heidelberg) with updates to $(date '+%Y-%M-%d %Hm')"

11) Remove old cd directorys

rm -rf $FCBASE/fedora/i386-disc[1-9]

12) The splittree.py script that ships with FC3 is broken. I downloaded a fixed one from CVS, which you can download here. You can replace the broken one at /usr/lib/anaconda-runtime/scripts or run it from where it is.

13) Run splittree.py to split the RPM's and install files into individual cd's:

splittree.py --arch=i386 --total-discs=5 --bin-discs=4 --src-discs=1 \
--release-string=$RELEASE \
--pkgorderfile=$FCBASE/fedora/pkgfile.`date +%Y-%m-%d` \
--distdir=$FCBASE/fedora/i386 --srcdir=$FCBASE/fedora/SRPMS \
--productpath=Fedora

14) Recreate the package list for the 1st CD so that it knows where all the available packages are:

rm -f $FCBASE/fedora/i386-disc1/Fedora/base/hdlist*
genhdlist --productpath=Fedora \
--withnumbers --fileorder \
/root/fedora-rebuild/fedora/pkgfile.`date +%Y-%m-%d` \
$FCBASE/fedora/i386-disc[1234]

15) Each of the i386-disk* direcories in $FCBASE/fedora is an instalation cd. These directorys are ready to be made into new iso images. I use this script to get the job done. Be sure to edit the script to put your own name in it before you run it.
Permalink 13 comments
Comments:
Comment from: Warwick Poole [Visitor] · http://linuxinternet.org
Nice, I am migrating a laptop to FC3 tonight and will test this out to create some updated CDs. Thanks.
Permalink 11/17/04 @ 12:11
Comment from: Dave Alden [Visitor]
I had a problem with step 7, instead I had
to use:

genhdlist --productpath=Fedora $FCBASE/fedora/i386

Other than that, this worked perfectly -- thanks.
Permalink 11/30/04 @ 18:06
Comment from: esammons [Visitor]
On Step 9 I get the following error... Any ideas?

buildinstall --pkgorder $FCBASE/fedora/pkgfile.`date +%Y-%m-%d` --version 3 --product 'Fedora Core' --release 'Fedora Core 3' --prodpath Fedora $FCBASE/fedora/i386
Running buildinstall...
/usr/local/rebuild/fedora/i386/buildinstall.tree.7804 /usr/local/rebuild
rpm2cpio: /usr/local/rebuild/fedora/i386/Fedora/RPMS/anaconda-runtime-[0-9]*: No such file or directory
cpio: premature end of archive
/usr/local/rebuild
cp: cannot stat `/usr/local/rebuild/fedora/i386/buildinstall.tree.7804/usr/lib/anaconda-runtime/./upd-instroot*': No such file or directory
cp: cannot stat `/usr/local/rebuild/fedora/i386/buildinstall.tree.7804/usr/lib/anaconda-runtime/./mk-images*': No such file or directory
cp: cannot stat `/usr/local/rebuild/fedora/i386/buildinstall.tree.7804/usr/lib/anaconda-runtime/./makestamp.py*': No such file or directory
cp: cannot stat `/usr/local/rebuild/fedora/i386/buildinstall.tree.7804/usr/lib/anaconda-runtime/./buildinstall*': No such file or directory
Going to run buildinstall again
/usr/lib/anaconda-runtime/buildinstall: line 133: /usr/local/rebuild/fedora/i386/buildinstall.tree.7804/buildinstall: No such file or directory
Permalink 12/27/04 @ 12:54
Comment from: Corey DeLasaux [Visitor]
esammons,
Your error is that you have to have certain rpms in your i386/Fedora/RPMS directory.

See this link
http://rau.homedns.org/twiki/bin/vie...geRequirements

Unfortunatly this list appears incompleate since it lists packages that are no longer put in Fedora core 3.

I wondering if anyone has a complete list for Fedora Core 3?

FYI: I am trying to make a single disk Distro so I removed the RPMS I don't need. Then using the list of need RPMS I put those back in the build directory. buildinstall seems to run fine but, when I load my new shiney CD I can't use the graphic interface and it goes to text. That was fine, I got though the partition and formating and when is was at the load RPMS I got an error that "install exited abnormaly" on a blue screen and it shutdown. I'm sure it's just a RPM or few that need to be in the build RPM directory but I don't know which ones.
Cheers,
Corey
Permalink 12/30/04 @ 11:26
Comment from: paul [Visitor]
What happened to step 10? Also, what builds comps.xml?

Cheers,

Paul
Permalink 01/02/05 @ 11:43
Comment from: paul [Visitor]
Corey, I get the same error as you. I presumed it was something to do with the RPMs I'd replaced so finally decided to start from scratch. I copied all the DVD files to a new directory and tried the above instructions on the copy without making any changes. Unfortunately, I still get "install exited abnormally" :(

Since I only want to do a network install, I didn't do steps 11,12,13 above and altered 14 to just target $FCBASE/fedora/i386 instead of $FCBASE/fedora/i386-disc[1234].

Also, step 10 is corrupt above, so I'm hoping it doesn't do something important
Permalink 01/03/05 @ 05:45
Comment from: bipolar [Member] · http://bipolar.longbros.com
I've fixed step 10.
I'm not sure why you are getting those errors. I just built a new set of CD's a few days ago and had no problems.
Permalink 01/03/05 @ 09:47
Comment from: Jerry Garcia [Visitor] · http://linux.lorma.edu
Same here! I also get thesame problem. What did we do wrong? I got an error that "install exited abnormaly" on a blue screen and it shutdown.

cheers,

zedmaster
Permalink 01/05/05 @ 03:47
Comment from: paul [Visitor]
Well, I seem to have got past that problem sort of. I'm not exactly sure what causes it, but I did notice that buildinstall failed to execute the copy it made of itself because it wasn't executable.

This occurs in buildinstall in the section where it goes:
if [ -x /usr/bin/runroot ]; then
runroot ...
else
$BUILDINSTALL ...
I put a chmod 755 $BUILDINSTALL before that.

Now I can update any of the RPMs in FC3 but I can't add any new ones. At the moment I'm adding them in %post, but I wish I could figure out what is missing. Perhaps I have to modify comps.xml to add new packages?
Permalink 01/05/05 @ 16:46
Comment from: defiance [Visitor] · http://stageofbattle.org
Yesterday when I was trying this I was getting the install exited abnormally error just like you guys. Today I moved to a box with a fresh fc3 install and tried it again. Now when I boot to the cd's, it puts me in text mode and says it can't find the fedora core installaiton cd. I did some searching and found that this usually means the .discinfo file isn't in place, but it is.

Also I have found that I have to replace getopts.getopts with getopts.gnu_getopts in the spliittree.py script.

Anyone ever have these problems?
Permalink 01/06/05 @ 17:53
Comment from: dallas engelken [Visitor] · http://www.nmgi.com
2 things i have found that will cause people grief.

step 13: in the splittree, you will want to put quotes around $RELEASE, "$RELEASE". Otherwise, the spaces or parans in $RELEASE will throw off the --pkgorderfile= and you'll get the error about 'missing --pkgorderfile'. you would not be effected by this if you set your RELEASE name to something simple (without spaces).

step 14:
/root/fedora-rebuild/fedora/pkgfile...
should be
$FCBASE/fedora/pkgfile...


Permalink 01/14/05 @ 10:38
Comment from: hepl me [Visitor]
hi all.
i'm rebuilding fedora core 2. but i have erro here.
step 4
# /usr/lib/anaconda-runtime/buildinstall --comp dist-9 --pkgorder /temp/fedora/pkgorder.txt --product 'Vietkey Linux' --release 1 --version 1 /temp/fedora/i386

作者: bbbush   发布时间: 2005-04-12

http://fedoranews.org/contributors/g...update_distro/
http://fedoranews.org/contributors/g...ate-distro.pdf

原文的排版很不错, 是 fedora 官方文档的风格
引用:
How to update Fedora Core 3 Distribution CDs
by Gene Czarcinski on Feb 27, 2005 (UPDATED 2005-03-11)

The purpose of this document is threefold:

1.

Describe how to update Fedora Core 3 distribution CDs and then create new, updated iso images.
2.

Describe how to create DVD images instead of CD images.
3.

Given an updated distribution, create an updated RescueCD which, optionally, is modified to add additional software.

Some of the information in this document is based on information in Updating and Rebuilding Fedora Core 2 Installation CDs . There is also the currently unmaintained AnacondaDocumentationProject.

While this document describes the process for the i386 distribution, it also applies to the Fedora Core 3 x86_64 distribution and may also be extended to the development tree.
Updating and creating the distribution
Step 1: Preparation

Fedora Core 3 comes with all of the tools necessary to update and rebuild the installation CDs. To perform this does require a fair amount of disk space - approximately 22 GB. Fedora Core 3 is distributed on CD ISO images which total about 4.5 GB. The space requirements are as follows:

1.

Space for the distributed ISO images (4.5 GB).
2.

Space for the expanded installation tree built from the ISO images (4.5 GB). This tree will be updated during the update/rebuild process.
3.

Space for the split trees which will divide the installation tree into ISO image size pieces (4.5 GB).
4.

Space for the updated ISO images (4.5 GB).
5.

Extra working space used during the rebuild process (1 to 3 GB).

Rounding up and being generous results in needing about 2 GB of space. If you rebuild the optional RescueCD, you will need an addition 1 to 2 GB of space.

Although updating and rebuilding the installation CDs could be performed on some other system, we assume this is being done on a Fedora Core 3 system. You will need to install the following packages:

anaconda-10.1.0.2-1
anaconda-help-10.1.0-1
anaconda-runtime-10.1.0.2-1
busybox-anaconda-1.00.rc1-5

Next you need to build the installation tree. All of the following needs to be performed as "root". Assuming that the distributes ISO images are located in another partition, the partition needs to have at least 10 GB of available space (or 15 GB if the new ISO images are to be pleaced there also). In a subdirectory on that partition, execute the following:

export PYTHONPATH=/usr/lib/anaconda
export PATH="$PATH:/usr/lib/anaconda-runtime"
export FCBASE=`pwd`
mkdir -p $FCBASE/fc3/i386

This sets things up. Now do the following:

mount -o ro,loop FC3-i386-disc1.iso /mnt
cp -a /mnt/* $FCBASE/fc3/i386/
umount /mnt/

Then repeat the above for each of the other three ISO binary (i386) images and the four SRPMS ISO images.

Note: If you have the DVD ISO image then you can use it in place of the four binary ISO images. However, you will still need to copy the contents of the four CD SRPMS ISO images.

Note: If you already have an expanded tree which is being used for NFS, etc. installs, then simply copy it.

You have now created the installation tree.
Step 2: Updating

In general, updating a distribution consists of replacing the RPMs and src RPMs with updated versions. You need to make sure you delete the older (replaced) versions. Since the file names will differ between to old and the updated versions of the packages, this can be a lengthy manual process. I am sure that someone has created a script which will remove the older packages and only leave the updated versions.

Caution: A few packages have multiple architectures and you need to be careful not to delete the extra architectures. Specifically on the i386 distribution:

1.

The glibc, nptl, and openssl packages have both i386 and i686 versions of packages.
2.

The kernel and kernel-smp packages have i586 and i686 versions of packages (but no i386).

The x86_64 distribution of Fedora Core 3 contains many packages which have both x86_64 and i386 (or i686 in some case) versions of packages so that both 32-bit and 64-bit applications can be supported.

If you need a special kernel to support what you are doing, you can use the src RPM to rebuild a custom kernel package and then use these rebuilt packages in the updated distribution. How you do this kernel package rebuilding is beyond the scope of this document.

You can also add packages to the distribution by copying them to the $FCBASE/fc3/i386/Fedora/RPMS directory and the $FCBASE/fc3/i386/SRPMS directory (for src.rpm).

To edit the comps file, please see Editing the Comps File.
Step 3: Cleanup

The original build which created the ISO images leaves some extra files which can be removed with the following command:

find $FCBASE/fc3 -name TRANS.TBL -exec rm -f {} \;
find $FCBASE/fc3 -name boot.cat -exec rm -f {} \;

Step 4: Build

OK, you now have an updated installation tree and you need to execute the following commands:

1.

Update the hdlist file with the following command:

genhdlist --productpath=Fedora $FCBASE/fc3/i386

2.

Next, create the package order file:

pkgorder $FCBASE/fc3/i386 i386 Fedora | tee \
$FCBASE/fc3/pkgfile

3.

Next, update the installation files:

buildinstall --pkgorder $FCBASE/fc3/pkgfile \
--version 3 --product "Fedora Core" \
--release "Fedora Core 3" \
--prodpath Fedora \
$FCBASE/fc3/i386

Step 5: Splitting the installation tree

To create CD ISO images, you will need to split the binary and SRPMS into eight CD trees:

rm -fr $FCBASE/fc3/i386-disc[1-9]

splittree.py --arch=i386 \
--total-discs=8 --bin-discs=4 --src-discs=4 \
--release-string="Fedora Core 3" \
--pkgorderfile=$FCBASE/fc3/pkgfile \
--distdir=$FCBASE/fc3/i386 \
--srcdir=$FCBASE/fc3/i386/SRPMS \
--productpath=Fedora

rm -f $FCBASE/fc3/i386-disc1/Fedora/base/hdlist

genhdlist --productpath=Fedora --withnumbers \
--fileorder $FCBASE/fc3/pkgfile \
$FCBASE/fc3/i386-disc[1234]

The split trees are created in $FCBASE/fc3 and are named i386-disc[1-8].

NOTE: The "--distdir=$FCBASE/fc3/i386" parameter DOES NOT end with a "/" intentionally. If it does end with "/", then the split trees will be named -disc[12345678] and be sub-directories of $FCBASE/fc3/i386/ instead of being i386-disc[1-8] under subdirectory $FCBASE/fc3.

The splittree.py program does not currently support splitting the installation tree into DVD size trees. However, this can be performed manually. The options are to modify the installation tree which you just created or to create two new DVD-sized trees. For purposes of this HOWTO, two new direcoty trees will be created:

mkdir -p $FCBASE/fc3/i386-dvd1
mkdir -p $FCBASE/fc3/i386-dvd2
cp -a $FCBASE/fc3/i386/* $FCBASE/fc3/i386-dvd1/
cp -p $FCBASE/fc3/i386/.discinfo $FCBASE/fc3/i386-dvd1/
cp -p $FCBASE/fc3/i386/* $FCBASE/fc3/i386-dvd2/
mv $FCBASE/i386-dvd1/SRPMS $FCBASE/fc3/i386-dvd2/


Another approach (thanks to Andrew Mann) for creating DVD images was simply described in anaconda-devel-list message. This describes the changes needed to splittree.py to handle DVD images:

cp /usr/lib/anaconda-runtime/splittree.py \
./splittree-dvd.py

then around line 79, change

self.target_size = 640.0 * 1024.0 * 1024

to be

self.target_size = 4.4 * 1024.0 * 1024.0 * 1024

You can also change all of the "-disc" to "-dvd" so
that both CD and DVD split trees can coexist.

rm -fr $FCBASE/fc3/i386-dvd[1-9]

./splittree.py --arch=i386 \
--total-dvds=2 --bin-dvds=1 --src-dvds=1 \
--release-string="Fedora Core 3" \
--pkgorderfile=$FCBASE/fc3/pkgfile \
--distdir=$FCBASE/fc3/i386 \
--srcdir=$FCBASE/fc3/i386/SRPMS \
--productpath=Fedora

Now go to step 6 but only create the first (bootable) image and the single SRPMS image.
Step 6: Creating the CD or DVD ISO Images

1.

The first binary or installation image differs from the other images because it is bootable. The following command will create this ISO image:

cd $FCBASE/fc3

mkisofs -R -J -T -v \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-V "Fedora Core 3 (update or whatever)" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-x "lost+found" \
-o FC3-i386-disc1.iso\
i386-disc1

or, if you are creating a DVD image, then use:

mkisofs -R -J -T -v \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-V "Fedora Core 3 (updated or whatever)" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-x "lost+found" \
-o FC3-i386-dvd1.iso \
i386-dvd1

2.

Continue to create the other CD binary discs ISO images with (skip if doing DVD images):

mkisofs -R -J -T -v \
-V "Fedora Core 3 (updated or whatever)" \
-x "lost+found" \
-o FC3-i386-disc2.iso \
i386-disc2

which is repeated for disc3 and disc4.
3.

Then do the SRPMS which is similar to that done for disc[2-4]:

mkisofs -R -J -R -v \
-V "Fedora Core 3 (updated or whatever)" \
-x "lost+found" \
-o FC3-i386-SRPMS-disc1.iso \
i386-disc5

which is repeated for disc6 -> disc2.iso, disc7 ->disc3.iso, and disc8 -> disc4.iso.

If you are creating a DVD SRPMS image, then do:

mkisofs -R -J -R -v \
-V "Fedora Core 3 (updated or whatever)" \
-x "lost+found" \
-o FC3-i386-SRPMS-dvd1.iso \
i386-dvd2

cd $FCBASE

All done!
Updating and creating the RescueCD

The following process assumes that you have the trees, etc. described above.
Step 1: The RescueCD Tree

Run the commands:

rm -fr $FCBASE/fc3/i386-rescueimage
mk-rescuecd.i386 $FCBASE/fc3/i386 \
$FCBASE/fc3 \
"FC 3" \
Fedora

If you only want a RescueCD with software from the updated packages (such as an updated kernel), then skip to step 4.
Step 2: Increasing RAMDISK Size

If you would like to increase the size of the ramdisk you boot into, then do the following:
1.

Edit $FCBASE/rescue/i386-rescue/isolinux/isolinux.cfg and change the ramdisk_size values from their standard setting of 8192 to something larger such as 16384.
2.

Do:

gunzip < $FCBASE/fc3/i386-rescueimage/isolinux/initrd.img \
> /tmp/initrd.old
mount -o ro,loop /tmp/initrd.old /mnt/xx

3.

Then create the updated image:

dd if=/dev/zero of=/tmp/initrd.new bs=1k count=12288
mke2fs -F -i 4086 /tmp/initrd.new
mount -o loop /tmp/initrd.new /mnt/zz
cp -va /mnt/xx/* /mnt/zz
cp -vp /mnt/xx/.buildstamp /mnt/zz
umount /mnt/xx
umount /mnt/zz

4.

Now gzip and replace the original initrd.img:

gzip -9 </tmp/initrd.new \
> $FCBASE/fc3/i386-rescueimage/isolinux/initrd.img

Step 3: Adding software

Do the following:

mount -o ro,loop \
$FCBASE/fc3/i386-rescueimage/Fedora/base/stage2.img \
/mnt/xx
mkdir $FCBASE/stage2
cp -va /mnt/xx/* $FCBASE/stage2
cp -vp /mnt/xx/.buildstamp $FCBASE/stage2

Now update the stage2 directory with your stuff such as programs into $FCBASE/stage2/usr/bin. Be careful that your software does not need additional libraries, etc. [statically linked programs are the way to go]. Once you have everything updated, then do:

mkcramfs $FCBASE/stage2/ /tmp/stage2.new
cp -vp /tmp/stage2.new \
$FCBASE/fc3/i386-rescueimage/Fedora/base/stage2

Step 4: CD creation

Similar to the bootable installation CD, do the following:

cd $FCBASE/fc3
mkisofs -R -J -T -v \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-V "Fedora Core 3 Rescue CD (or whatever)" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-x "lost+found" \
-o FC3-i386-rescuecd.iso \
i386-rescue
cd $FCBASE

作者: bbbush   发布时间: 2005-04-12

无聊译一下上文,方便别人方便自己

作者: 懒猫   发布时间: 2005-09-09

如何更新 Fedora Core 3 发行版 CD

作者:Gene Czarcinski 写于 2005 年 2 月 27 日 (更新于 2005-03-11)
翻译:懒猫 / Stephen Wong 译于广州,2005 年 9 月 8 日

声明:本文档的原文著作权属于 Gene Czarcinski,译文的著作权属于 懒猫 / Stephen Wong,译文的出版权、发行权属于原文作者、译文作者和 LinuxSir.org 社区共同所有。本文首先公开发布于 LinuxSir.org 社区,转载和/或修订请保留著作权信息和本声明条款。原文作者、译文作者、历次修订者及 LinuxSir.org 社区保留一切法律权利。

原文 PDF 文档的网址链接:
http://fedoranews.org/contributors/g...ate-distro.pdf
原文 Web 文档的网址链接:
http://fedoranews.org/contributors/g...update_distro/

本文档有以下三个目的:

1. 说明如何更新 Fedora Core 3 发行版 CD 然后创建更新了的 ISO 镜像。
2. 说明如何创建 DVD 镜像以取代 CD 镜像。
3. 被给予一个更新了的发行版以后,创建一张可选择地添加了更多软件的拯救 CD。

本文档的部分信息基于更新和重建 Fedora Core 2 安装 CD 的信息,也有当前未被维护的 Anaconda 文档计划。

当本文档说明用于 i386 发行版的过程时,其也适用于 Fedora Core 3 的 x86 64位发行版,而且还可以被延长适用到发展趋势的版本。

更新和创建发行版

第一步:筹备

Fedora Core 3 带有用于更新和重建安装 CD 的所有所需的工具。这要求一个充足的磁盘空间 —— 大约 22 GB。Fedora Core 3 发行于总共约有 4.5 GB 的 CD ISO 镜像上。空间要求如下:

1. 用于发行版 ISO 镜像的空间 (4.5 GB)。

2. 用于从 ISO 镜像生成的扩展安装目录树的空间 (4.5 GB)。这棵树将于更新 / 重建过程中被更新。

3. 用于将会按 ISO 镜像容量分割的安装目录树的分支目录树的空间。(4.5 GB)

4. 用于更新了的 ISO 镜像的空间 (4.5 GB)。

5. 在重建过程中额外的工作空间 (1 到 3 GB)。

  整理结果需要约 2 GB 空间。如果你重建可选择的拯救 CD,你将需要额外的 1 到 2 GB 空间。

  虽然更新和重建安装 CD 可以被执行于某些其他的系统,但我们假定这是在一套 Fedora Core 3 系统上进行的。你将需要安装以下软件包:

anaconda-10.1.0.2-1
anaconda-help-10.1.0-1
anaconda-runtime-10.1.0.2-1
busybox-anaconda-1.00.rc1-5

  然后你需要构建安装目录树。以下所有操作需要以“root”身份执行。假定发行版 ISO 镜像放在别的磁盘分区,这个分区需要拥有至少 10 GB 可用的空间(也或者是 15 GB,如果新的 ISO 镜像将放在那里的话)。在那个分区的一个子目录内执行如下操作:

export PYTHONPATH=/usr/lib/anaconda
export PATH="$PATH:/usr/lib/anaconda-runtime"
export FCBASE=`pwd`
mkdir -p $FCBASE/fc3/i386

  这是一些设置。现在执行下面的操作:

mount -o ro,loop FC3-i386-disc1.iso /mnt
cp -a /mnt/* $FCBASE/fc3/i386/
umount /mnt/

  然后对另外三个 ISO i386的二进制镜像及四个 SRPMS ISO 镜像重复如上的操作。

  注意:如果你有 DVD ISO 镜像则你可以使用它来替代那四个二进制的 ISO 镜像。然而,你将仍然需要复制四个 SRPMS ISO 的 CD 镜像中的内容。

  注意:如果你已经有一个正被用于 NFS 等安装的扩展目录树,则只要简单地复制它就行了。

  你现在已经创建了安装目录树。

第二步:更新

  一般地,更新一个发行版在于把 RPM 和 源代码 RPM 替换为更新了的版本。你需要确定你删除了旧的(被替换的)版本。因为旧的和新版本软件包的文件名会有不同,这可能是一个冗长的手工过程。我确信有人已经创建了一个将会除去较旧版本并只留下新版本软件包的脚本。

  警告:少部分的软件包存在多架构版本,你需要小心不要删除了额外的的架构版本。i386 发行版明确如下:

1. glibc,nptl 和 openssl 软件包用 i386 和 i686 版本的软件包。

2. 内核和对称多处理器(smp)内核有 i586 和 i686 版本的软件包(但没有 i386 版本)。

  Fedora Core 3 的 64位 x86 发行版包含很多有 64位 x86 和 i386 (某些或者是 i686)版本的软件包,因此 32位和 64位的软件都可以被支持。

  如果你需要一个特别的内核用于支持你正在进行的工作,你可以使用源代码 RPM 重建一个定制的内核软件包,然后在更新的发行版中使用这些重建的软件包。你如何重建这个内核软件包的方法不在本文档范围之内。

  你也可以通过复制软件包到 $FCBASE/fc3/i386/Fedora/RPMS 目录和 $FCBASE/fc3/i386/SRPMS 目录(用于源代码 RPM)以添加软件包。

  编辑 comps 文件,请参阅《Editing the Comps File》。

第三步:清理

  原始的构建会在创建 ISO 镜像的时候留下一些额外的文件。这些文件可以用下面的命令清除:

find $FCBASE/fc3 -name TRANS.TBL -exec rm -f {} \;
find $FCBASE/fc3 -name boot.cat -exec rm -f {} \;

第四步:构建

  OK,你现在有一个更新版本的安装目录树,你需要执行如下命令:

1. 通过如下命令更新 hdlist 文件:

genhdlist --productpath=Fedora $FCBASE/fc3/i386

2. 接着,创建软件包顺序文件:

pkgorder $FCBASE/fc3/i386 i386 Fedora | tee \
$FCBASE/fc3/pkgfile

3. 然后,更新安装文件:

buildinstall --pkgorder $FCBASE/fc3/pkgfile \
--version 3 --product "Fedora Core" \
--release "Fedora Core 3" \
--prodpath Fedora \
$FCBASE/fc3/i386

第五步:分离安装目录树

  若是创建 CD ISO 镜像,你将需要把二进制 RPM 和源代码 RPM 分离到八张 CD 目录树中:

rm -fr $FCBASE/fc3/i386-disc[1-9]

splittree.py --arch=i386 \
--total-discs=8 --bin-discs=4 --src-discs=4 \
--release-string="Fedora Core 3" \
--pkgorderfile=$FCBASE/fc3/pkgfile \
--distdir=$FCBASE/fc3/i386 \
--srcdir=$FCBASE/fc3/i386/SRPMS \
--productpath=Fedora

rm -f $FCBASE/fc3/i386-disc1/Fedora/base/hdlist

genhdlist --productpath=Fedora --withnumbers \
--fileorder $FCBASE/fc3/pkgfile \
$FCBASE/fc3/i386-disc[1234]

  分支目录树被创建于 $FCBASE/fc3,并被命名为 i386-disc[1-8]。

  注意:参数“--distdir=$FCBASE/fc3/i386”刻意不以“/”结尾。如果它以“/”结尾,则分支目录树将被命名为 -disc[12345678] 并且作为子目录被置于 $FCBASE/fc3/i386/ 中而不是置于 $FCBASE/fc3 子目录中的 i386-disc[1-8]。

  splittree.py 程序当前不支持把安装目录树分离到 DVD 容量的目录树中。然而,这可以被手工完成。这个选择将修改你刚刚创建的或即将创建的两个新的 DVD 容量的目录树。为了打到这个目的,两个目录树将被创建如下:

mkdir -p $FCBASE/fc3/i386-dvd1
mkdir -p $FCBASE/fc3/i386-dvd2
cp -a $FCBASE/fc3/i386/* $FCBASE/fc3/i386-dvd1/
cp -p $FCBASE/fc3/i386/.discinfo $FCBASE/fc3/i386-dvd1/
cp -p $FCBASE/fc3/i386/* $FCBASE/fc3/i386-dvd2/
mv $FCBASE/i386-dvd1/SRPMS $FCBASE/fc3/i386-dvd2/


  创建 DVD 镜像的另一个途径(感谢 Andrew Mann)在 anaconda-devel-list 信息中简单地说明了。这说明改变需要 用 splittree.py 操作 DVD 镜像:

cp /usr/lib/anaconda-runtime/splittree.py \
./splittree-dvd.py

  然后在第 79 行附近,把

self.target_size = 640.0 * 1024.0 * 1024

  修改为

self.target_size = 4.4 * 1024.0 * 1024.0 * 1024

  你也可以把所有“-disc”改为“-dvd”,以至于 CD 和 DVD 分支树都可以共存。

rm -fr $FCBASE/fc3/i386-dvd[1-9]

./splittree.py --arch=i386 \
--total-dvds=2 --bin-dvds=1 --src-dvds=1 \
--release-string="Fedora Core 3" \
--pkgorderfile=$FCBASE/fc3/pkgfile \
--distdir=$FCBASE/fc3/i386 \
--srcdir=$FCBASE/fc3/i386/SRPMS \
--productpath=Fedora

  现在进行第六步,但仅仅创建第一个(可引导的)镜像以及单个的 SRPMS 镜像。

第六步:创建 CD 或 DVD ISO 镜像

1. 第一个安装镜像不同于其他的镜像,因为它是可引导的。以下命令将创建这个 ISO 镜像。

cd $FCBASE/fc3

mkisofs -R -J -T -v \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-V "Fedora Core 3 (update or whatever)" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-x "lost+found" \
-o FC3-i386-disc1.iso\
i386-disc1

  或者,如果你创建一个 DVD 镜像,则使用如下命令:

mkisofs -R -J -T -v \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-V "Fedora Core 3 (updated or whatever)" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-x "lost+found" \
-o FC3-i386-dvd1.iso \
i386-dvd1

2. 继续创建其他二进制 CD 的 ISO 镜像(如果正在制作 DVD 镜像则跳过):

mkisofs -R -J -T -v \
-V "Fedora Core 3 (updated or whatever)" \
-x "lost+found" \
-o FC3-i386-disc2.iso \
i386-disc2

  重复用于三号和四号光盘。

3. 然后如 disc[2-4] 般制作 SRPMS 光盘镜像:

mkisofs -R -J -R -v \
-V "Fedora Core 3 (updated or whatever)" \
-x "lost+found" \
-o FC3-i386-SRPMS-disc1.iso \
i386-disc5

  重复制作 disc2.iso 的步骤用于 disc6,重复制作 disc3.iso 的步骤用于 disc7,重复制作 disc4.iso 的步骤用于 disc8。

  如果你正在创建一个 DVD SRPMS 镜像,则操作如下:

mkisofs -R -J -R -v \
-V "Fedora Core 3 (updated or whatever)" \
-x "lost+found" \
-o FC3-i386-SRPMS-dvd1.iso \
i386-dvd2

cd $FCBASE

  如此便完成了 ISO 镜像的制作。

更新和创建拯救 CD

  以下过程假定你已经拥有目录树等条件,如上文所述。

第一步:拯救 CD 的目录树

  运行命令:

rm -fr $FCBASE/fc3/i386-rescueimage
mk-rescuecd.i386 $FCBASE/fc3/i386 \
$FCBASE/fc3 \
"FC 3" \
Fedora

  如果你只是想要一个带有更新了的软件包(例如一个更新了的内核)的拯救 CD,则跳过第四步。

第二步:增加 RAMDISK 的容量

  如果你意欲增加引导时内存虚拟磁盘(RAMDISK)的容量,则执行如下操作:

1. 编辑 $FCBASE/rescue/i386-rescue/isolinux/isolinux.cfg 文件,把 ramdisk_size 的值从标准设置的 8192 改为某个更大的值,例如 16386。

2. 执行:

gunzip < $FCBASE/fc3/i386-rescueimage/isolinux/initrd.img \
> /tmp/initrd.old
mount -o ro,loop /tmp/initrd.old /mnt/xx

3. 然后创建更新了的镜像:

dd if=/dev/zero of=/tmp/initrd.new bs=1k count=12288
mke2fs -F -i 4086 /tmp/initrd.new
mount -o loop /tmp/initrd.new /mnt/zz
cp -va /mnt/xx/* /mnt/zz
cp -vp /mnt/xx/.buildstamp /mnt/zz
umount /mnt/xx
umount /mnt/zz

4. 现在压缩打包并替换原始的 initrd.img:

gzip -9 </tmp/initrd.new \
> $FCBASE/fc3/i386-rescueimage/isolinux/initrd.img

第三步:添加软件

  执行如下操作:

mount -o ro,loop \
$FCBASE/fc3/i386-rescueimage/Fedora/base/stage2.img \
/mnt/xx
mkdir $FCBASE/stage2
cp -va /mnt/xx/* $FCBASE/stage2
cp -vp /mnt/xx/.buildstamp $FCBASE/stage2

  现在用你的素材更新 stage2 目录,例如把程序放进 $FCBASE/stage2/usr/bin 。这里要小心,你的软件并不需要附加的库(静态链接程序使用这个方法)。一旦你把所有东西更新好了,则执行:

mkcramfs $FCBASE/stage2/ /tmp/stage2.new
cp -vp /tmp/stage2.new \
$FCBASE/fc3/i386-rescueimage/Fedora/base/stage2

第四步:创建 CD

  和可引导的安装 CD 相似,执行如下操作:

cd $FCBASE/fc3
mkisofs -R -J -T -v \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-V "Fedora Core 3 Rescue CD (or whatever)" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-x "lost+found" \
-o FC3-i386-rescuecd.iso \
i386-rescue
cd $FCBASE

  全文完。

作者: 懒猫   发布时间: 2005-09-09