wiki:Build/6

Version 9 (modified by thomas, 13 years ago) (diff)

--

puias 6

codename pisa

One packages directory One comps file Additional repos

Addons Computational / HPC

Updates

/data/puias/updates/6

In the puias.py file, additional yum groups defined. puias.py in product.img, product.img is loaded by loader from anaconda runtime.

yum groups

  • pu
  • ias
  • computational

suggest alternative package groups like pu-free pu-nonfree etc.

drop optional.

buildinstall --localscripts --version 6 --product "puias" --release "puias linux 6" --output /tmp/puias6 /data/puias/6/x86_64/os/Workstation

el5 -> el6

DVD

/usr/libexec/anaconda/makestamp.py used to make a .discinfo file.
/usr/libexec/anaconda/mk-images used to make .treeinfo file.

Rsync the tree then remove things not needed on the dvd

[thomas@host puias]$ rm mirrorlist
[thomas@host puias]$ rm Computational
[thomas@host puias]$ rm repodata.outside
[thomas@host puias]$ rm PUIAS/repodata.outside
[thomas@host puias]$ rm -r PUIAS/repoview

See redundant.

[thomas@host puias]$ rm images/puias-6.1-x86_64-DVD*iso

Make directories for the discs and move Addons to the 3rd disc.

[thomas@host puias]$ mkdir 1 2 3
[thomas@host puias]$ mv Addons 3
[thomas@host puias]$ mv EFI EULA GPL images isolinux mirrorlist Packages PUIAS repodata RPM-GPG-KEY-puias 1
[thomas@host puias]$ mkdir 2/Packages
[thomas@host puias]$ cd 1/Packages

Move large packages over to second disc, trying to make disc 1 small enough for a DVD. Move things that usually aren't required for a server build. Perl-devel is required in the basic desktop build, so move that back after moving all the devel's.

[thomas@host Packages]$ mv *-devel-* ../../2/Packages/
[thomas@host Packages]$ mv eclipse-* ../../2/Packages/
[thomas@host Packages]$ mv openoffice.org-* ../../2/Packages/
[thomas@host Packages]$ mv ../../2/Packages/perl-devel* .

Go back up to the root.

[thomas@host Packages]$ cd ../../

Remove the repodata in the root and then move the one from PUIAS to the root

[thomas@host puias]$ rm 1/repodata
[thomas@host puias]$ mv 1/PUIAS/repodata 1
[thomas@host puias]$ ln -s ../repodata 1/PUIAS/repodata

Start a createrepo with a split and media (cd path)

[thomas@host puias]$ createrepo -v -g repodata/comps-puias6.xml --split 1 2 -u 'media://1306249229.307081'

Create a .discinfo and .treeinfo the numbers need to match here .discinfo

--- BEGIN ---
1306249229.307081
PUIAS Linux 6.1
x86_64
1



--- END ---

.treeinfo

--- BEGIN ---
[general]
family = PUIAS Linux
timestamp = 1321026136.00
variant = PUIAS
totaldiscs = 1
version = 6.1
discnum = 1
packagedir = 
arch = x86_64

[images-x86_64]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
boot.iso = images/boot.iso

[images-xen]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img

[stage2]
mainimage = images/install.img
--- END ---

If you have time, make some checksums for a few things: from yum.misc import checksum checksum('sha256','images/pxeboot/vmlinuz') then put that in the checksums section of .treeinfo

--- BEGIN ---
[checksums]
images/pxeboot/initrd.img = sha256:7dd1303afa583c00cba591d4c397f31df08f05c15f4947eb2143cbb7a0b32811
images/pxeboot/vmlinuz = sha256:a36343b3be796a3c8e05c59422d672c2a888004e1e05f994946d4ef61dd36a3a
images/efiboot.img = sha256:e8d8943f23f8c4f07b680f88d2b71f04b01e71a048c9ac268e9415a381f5b431
images/install.img = sha256:5fffc8cbaf2db03f59e3f8755f5ada67955f9de079c98abb08585fa0e4ccc8fb
images/README = sha256:b7ff2704f677c5fc1e41b548eb4d50b1802ff61f0bf3df43bbe4818084ab82bf
images/efidisk.img = sha256:55fb2e751ee12e7a6d7cc4aa1017c53077ec7cab1390fe4ffe9af3a4c5ad4b0f
repodata/repomd.xml = sha256:b4c730256ed3e41aaa70cdb0bd5b44d1f90b6325c4f37428e75f49000d332430
--- END ---

Now remove all anaconda repo files.

[root@host puias]# cd images
[root@host images]# mkdir /mnt/install
[root@host images]# mount -o loop install.img /mnt/install

(requires squashfs stuff installed)

[root@host images]# cd /tmp; cp -a /mnt/install install
[root@host /tmp]# cd install
[root@host install]# rm etc/anaconda.repos.d/*
[root@host install]# mksquashfs * ../install.img:w
[root@host install]# cp /tmp/install.img ~/puias/1/images/

Now make an iso out of those directories...

[root@host puias]# cd 1
[root@host 1]# mkisofs -o /tmp/6.1-DVD-x86_64.iso -r -b isolinux/isolinux.bin -c isolinux/boot.msg -cache-inodes -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL .
[root@host 1]# cd ../2
[root@host 2]# mkisofs -o /tmp/6.1--DVD-2-x86_64.iso -r -cache-inodes -R -m TRANS.TBL .

Note:

There is a bug in createrepo that causes it to rewrite all the files incorrectly in primary.xml There is a string replace that is unended, replaces all occurences of _reldir with , which replaces 1 and 2 with nothing

relpath = self.localpath.replace(self._reldir, ) change the line to this: relpath = self.localpath.replace(self._reldir, ,1) in /usr/lib/python2.6/site-packages/yum/packages.py