Re-Creating CentOS-7-i386-DVD from Everything.iso

Abstract: From CentOS 7.5, DVD image for altarch i686 version isn't provided; only NetInstall, Minimal and Everything. This page attempts to recreate an ISO image which fits on DVD from published CentOS-7-i386-Everything-yymm.iso . (2018.05)

Keywords: CentOS-7-i386-DVD-1908.iso, CentOS 7.7 i686 DVD image

$Id: dvd.html,v 1.1 2019/01/01 09:46:41 kabe Exp kabe $


Step 1. Download Everything.iso

Download CentOS-7-i386-Everything-yymm.iso from a Altarch i386 mirror site. It will be about 7.8GB, which won't fit on a single-layer DVD.

Step 2. Copy Everything.iso to work directory, excluding Packages/

Mount the Everything.iso onto /media/cdrom, then copy over everything, except Packages/, to work directory, ./DVD1 .

$ sudo mount -o ro,loop CentOS-7-i386-Everything-1908.iso /media/cdrom
$ mkdir ./DVD1
$ tar -C /media/cdrom --exclude Packages -cf - . | tar -C ./DVD1 -xvpf -
$ rm -f `find ./DVD1 -name TRANS.TBL`

Step 3. Extract Menu-installable package filenames from Everything.iso

Extract all packages installable from anaconda installer menu using getpackages script. This script isn't fast; it takes about 50 minutes on 3GHz i686 machine.

$ yum --disablerepo=\* --enablerepo=c7-media clean all
$ sh getpackages > get.out

Step 4. Copy over packages consisting the package groups

The getpackages scripts will emit cp -p commands for the needed packages. Use it to copy over packages from /media/cdrom/Packages to ./DVD1/Packages/ .

$ mkdir ./DVD1/Packages
$ cat get.out | (export DESTDIR=`pwd`/DVD1/Packages/; cd /media/cdrom/Packages/; sh -x)

Step 4a. (optional) Extract and copy over anaconda packages

(optional) If you are going to run lorax against the newly created ./DVD1, you will want anaconda installer related packages too. Use getpackages-anaconda script to extract cp -p commands, and copy over packages to ./DVD1/Packages .

$ sh getpackages-anaconda > get-anaconda.out
$ cat get-anaconda.out | (export DESTDIR=`pwd`/DVD1/Packages/; cd /media/cdrom/Packages/; sh -x)

Step 5. Delete packages to reduce size

From CentOS 7.6 onward, steps above will create 4.8GB ./DVD1/, which doesn't fit on single-layer DVD. You have to selectively erase some packages.

Candidates for erasure:

	rm `ls DVD1/Packages/gimp-help-??-2* | grep -v -- -ja-`

Step 6. Run createrepo

Use createrepo to rebuild the ./DVD1/repodata/ . You must rename repodata/sha256sum-c7-x86_64-comps.xml to SHA256-less name before running createrepo.

$ mv ./DVD1/repodata/521f322f05f9802f2438d8bb7d97558c64ff3ff74c03322d77787ade9152d8bb-c7-x86_64-comps.xml ./DVD1/repodata/comps.xml
$ rm ./DVD1/repodata/*.bz2 ./DVD1/repodata/*.gz
$ createrepo -v -g repodata/comps.xml ./DVD1

Step 7. Create a DVD1.iso image

Check that ./DVD1 doesn't exceed 4.7GB DVD limit. Then, run mkisofs against ./DVD1 to generate ./DVD1.iso . The Volume Label (-V "CentOS 7 i386") must match the inst.stage2=hd:LABEL=CentOS\x207\x20i386 string in isolinux/isolinux.cfg .

$ du -ks ./DVD1
$ mkisofs -o ./DVD1.iso \
	-b isolinux/isolinux.bin -c isolinux/boot.cat \
	-no-emul-boot -boot-load-size 4 -boot-info-table \
	-R -v -T \
	-J -joliet-long \
	-f \
	-V "CentOS 7 i386" \
	./DVD1
$ implantisomd5 ./DVD1.iso

The resulting DVD1.iso will be the generated version of CentOS-7-i386-DVD-yymm.iso.

Note: Pass rd.live.check option to the kernel command line to checksum the media during installation, which isn't clearly documented in dracut.cmdline(7). Using linux mediacheck boot commandline doesn't work in RHEL 7 and derivatives.

kabe.sra-tohoku.co.jp