|
发表于 2005-4-12 09:57:41
|
显示全部楼层
fc3
http://bipolar.longbros.com/inde ... 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 %H:%m')"
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 ... PackageRequirements
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 |
|