Home  -  Infos/Docs  -  Tools/Outils Code  -  Links/Liens  -  News  -  Download  -  Others/Autres Site map

Howto Create your own custom CentOS 6 DVD with updates

1) mount iso or dvd to get the content :

	mount -o loop /root/CentOS-6.2-x86_64-bin-DVD1.iso /mnt/dvd1
	mount -o loop /root/CentOS-6.2-x86_64-bin-DVD2.iso /mnt/dvd2

2) copy the content of the dvd and own repo (and updates)

       cp -r /mnt/dvd1/* .
       cp -r /mnt/dvd2/* .
       cp -r /mnt/updates  .
       cp -r /mnt/epel .

	Note: each repo in is own directory as you can see

3) edit .discinfo: remove "1" (or "2") at the end of the file and replace by this text "ALL" like this


    become this :


4) edit isolinux/isolinux.cfg and add this "ks=cdrom:/ks.cfg" on the "append" line like this:
 append initrd=initrd.img ks=cdrom:/ks.cfg

Note: you may also edit label line

5) read the content of the following file "repodata/repomd.xml" and get the filename of the group section. Example for centos 6.2 :

    cat  repodata/repomd.xml

 <data type="group_gz">
    <location xml:base="media://1323560292.885204#1" href="repodata/bedb7dc8fdf920deffbdc5a70ea0d6d77255656556184f5e996e8a88a63d145c-c6-x86_64-comps.xml.gz"/>
    <checksum type="sha256">bedb7dc8fdf920deffbdc5a70ea0d6d77255656556184f5e996e8a88a63d145c</checksum>
    <open-checksum type="sha256">3a27232698a261aa4022fd270797a3006aa8b8a346cbd6a31fae1466c724d098</open-checksum>
 <data type="group">
    <location xml:base="media://1323560292.885204#1" href="repodata/3a27232698a261aa4022fd270797a3006aa8b8a346cbd6a31fae1466c724d098-c6-x86_64-comps.xml"/>
    <checksum type="sha256">3a27232698a261aa4022fd270797a3006aa8b8a346cbd6a31fae1466c724d098</checksum>

copy the filename (and path) of the section "group" (not group_gz)

7) then create the repo like this "createrepo -v -g <filename and full path.xml> ."
       example for 6.2 :
       createrepo -v -g repodata/3a27232698a261aa4022fd270797a3006aa8b8a346cbd6a31fae1466c724d098-c6-x86_64-comps.xml .

Note: you may use "--update" option to speed up the process

8) then change current directory to the root of future iso and create the iso file :

       mkisofs -joliet-long -T -o ../my_custom_dvd.iso -b isolinux/isolinux.bin -c isolinux/ -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL .

9) then burn the is on a blank DVD media or boot on it for your VM.