Bug 104503

Summary: anaconda-runtime buildinstall script fails to generate valid stage2 & netstg2 images (corrupted cramfs)
Product: [Retired] Red Hat Linux Reporter: Ciupitu Cristian <gigi%c-12-232.fx.ro>
Component: anacondaAssignee: Jeremy Katz <katzj>
Status: CLOSED WORKSFORME QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-02 22:42:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ciupitu Cristian 2003-09-16 15:43:25 UTC
Description of problem:
	The /usr/lib/anaconda-runtime/buildinstall script that is used to generate the stage2.img and netstg2.img files, manages to create them, but they ar corrupted and installing from the customized CDs fails (it says that the rh cd is not inside).  They should be valid cramfs images, but fsck.cramfs shows they are corrupted.

Version-Release number of selected component (if applicable):
	anaconda-runtime-9.0-4 from RedHat 9

How reproducible:
	Easy. 

Steps to Reproduce:
	Just set RHBASE to the directory holding the "fully exploded tree" of RedHat 9 and run:
/usr/lib/anaconda-runtime/buildinstall --comp dist-9 --pkgorder $RHBASE/redhat/pkgorder.txt --version 9 --product "Red Hat Linux" --release "Custom build 1.0" $RHBASE/redhat/i386 
    
Actual results:
	It builds corrupted netstg2.img and stage2.img. I've run a fsck.cramfs on them and it tells they're corrupted.

Expected results:
	Valid cramfs images.

Additional info:
	I've run that comand to build my custom/updated CD's; the full set of commands is this (based on RedHat-CD-HOWTO and http://www.techonthenet.com/linux/rh9_update.htm):

COMPS=
RHBASE=
cd $COMPS && make && /usr/lib/anaconda-runtime/genhdlist $RHBASE/redhat/i386  &&  /usr/lib/anaconda-runtime/pkgorder $RHBASE/redhat/i386 i386 | tee $RHBASE/redhat/pkgorder.txt  &&  sed '/<\/comps>/d' comps-gingin.xml > comps-tmp.xml  &&  /usr/share/comps-extras/getfullcomps.py comps.xml $RHBASE/redhat i386 >> comps-tmp.xml  &&  echo '</comps>' >> comps-tmp.xml  &&  cp -f comps-tmp.xml $RHBASE/redhat/i386/RedHat/base/comps.xml  &&  /usr/lib/anaconda-runtime/buildinstall --comp dist-9 --pkgorder $RHBASE/redhat/pkgorder.txt --version 9 --product "Red Hat Linux" --release "Custom build 1.0" $RHBASE/redhat/i386    &&    RELEASE="RedHat 9 (Shrike) with updates to $(date '+%Y-%M-%d%H:%m')"  &&  /usr/lib/anaconda-runtime/splitdistro --fileorder $RHBASE/redhat/pkgorder.txt --release "$RELEASE" $RHBASE/redhat i386   &&  rm -f $RHBASE/i386-disc1/RedHat/base/hdlist*  &&  /usr/lib/anaconda-runtime/genhdlist --withnumbers --fileorder $RHBASE/redhat/pkgorder.txt $RHBASE/redhat/i386-disc[123]

Comment 1 Jeremy Katz 2003-10-02 22:42:03 UTC
This works fine for me here and is exactly what is used to compose trees. 
fsck.cramfs does warn that it's an old version of the filesystem, but that's
just due to the version of mkcramfs we ship.