Line 88: |
Line 88: |
| ** https://access.redhat.com/documentation/en/red-hat-enterprise-linux/7/anaconda-customization-guide/anaconda-customization-guide | | ** https://access.redhat.com/documentation/en/red-hat-enterprise-linux/7/anaconda-customization-guide/anaconda-customization-guide |
| ** https://access.redhat.com/documentation/en/red-hat-enterprise-linux/7/anaconda-customization-guide/4-branding-and-chroming-the-graphical-user-interface | | ** https://access.redhat.com/documentation/en/red-hat-enterprise-linux/7/anaconda-customization-guide/4-branding-and-chroming-the-graphical-user-interface |
| + | ** https://access.redhat.com/documentation/en/red-hat-enterprise-linux/version-7.1/red-hat-enterprise-linux-71-anaconda-customization-guide/ |
| | | |
| * how to customize centos 7 | | * how to customize centos 7 |
| | | |
− | http://serverfault.com/questions/517908/how-to-create-a-custom-iso-image-in-centos | + | ** http://serverfault.com/questions/517908/how-to-create-a-custom-iso-image-in-centos |
| + | ** https://github.com/joyent/mi-centos-7 |
| + | ** |
| | | |
− | https://github.com/joyent/mi-centos-7 | + | * fedora doc |
| + | ** https://fedoraproject.org/wiki/Anaconda/Changes |
| + | ** https://fedoraproject.org/wiki/LiveOS_image |
| + | |
| + | *using squashfs |
| + | ** http://www.tldp.org/HOWTO/html_single/SquashFS-HOWTO/#mksqusing |
| + | ** https://blog.sleeplessbeastie.eu/2012/05/27/how-to-modify-squashfs-image/ |
| + | ** http://voidmain.is-a-geek.net/redhat/fedora_10_live_cd_hacking.html <= really helpfull |
| + | |
| + | |
| + | *kickstart |
| + | **http://serverfault.com/questions/517908/how-to-create-a-custom-iso-image-in-centos |
| + | |
| + | *rootfs |
| + | **http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs |
| | | |
| ===Foreword=== | | ===Foreword=== |
Line 102: |
Line 119: |
| Hence I feel we will have to do the same to hide all Centos branding.[[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]]) 17:20, 17 July 2016 (CEST) | | Hence I feel we will have to do the same to hide all Centos branding.[[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]]) 17:20, 17 July 2016 (CEST) |
| | | |
− | === how to steps (WIP)=== | + | === THE KEY=== |
| + | |
| + | - the holly Grail is the .buildstamp file |
| + | $ cat product/.buildstamp |
| + | |
| + | [Main] |
| + | Product=Koozali SME Server |
| + | Version=10alpha2 |
| + | BugURL=https://bugs.koozali.org |
| + | IsFinal=False |
| + | UUID=alpha2.x86_64 |
| + | [Compose] |
| + | Lorax=19.6.66-1 |
| + | |
| + | |
| + | === how to create a good product.img for SME 10 alpha 2 (WIP)=== |
| + | mkdir product |
| + | cd product |
| + | |
| + | create the followings directories |
| + | mkdir -p ./run/install/product/pyanaconda/installclasses |
| + | mkdir -p ./usr/lib64/python2.7/site-packages/pyanaconda/installclasses |
| + | mkdir -p ./usr/share/anaconda |
| + | mkdir -p ./usr/share/anaconda/pixmaps/rnotes/en |
| + | mkdir -p ./usr/share/xml/scap/ssg/content |
| + | mkdir -p ./usr/share/anaconda/help/en-US/CentOSPlaceholder.html |
| + | mkdir ./etc |
| + | |
| + | add following files and edit (I think only one of them would be useful): |
| + | ./run/install/product/pyanaconda/installclasses/custom.py |
| + | ./run/install/product/pyanaconda/installclasses/koozali.py |
| + | |
| + | make a copy of the following from the original rootfs and edit in case to hide the centos one : |
| + | ./usr/lib64/python2.7/site-packages/pyanaconda/installclasses/centos.py |
| + | |
| + | we can put one here too (I think only one of them would be useful): |
| + | ./usr/lib64/python2.7/site-packages/pyanaconda/installclasses/koozali.py |
| + | |
| + | make a copy and edit the following from the original rootfs: |
| + | ./usr/share/anaconda/anaconda-gtk.css |
| + | |
| + | put your own image there with he right format, and the following name to hide the original centos files (you can also add more) |
| + | ./usr/share/anaconda/pixmaps/rnotes/en/centos-artwork.png |
| + | ./usr/share/anaconda/pixmaps/rnotes/en/centos-cloud.png |
| + | ./usr/share/anaconda/pixmaps/rnotes/en/centos-core.png |
| + | ./usr/share/anaconda/pixmaps/rnotes/en/centos-jp.png |
| + | ./usr/share/anaconda/pixmaps/rnotes/en/centos-promotion.png |
| + | ./usr/share/anaconda/pixmaps/rnotes/en/centos-virtualization.png |
| + | ./usr/share/anaconda/pixmaps/sidebar-bg.png |
| + | ./usr/share/anaconda/pixmaps/sidebar-logo.png |
| + | ./usr/share/anaconda/pixmaps/topbar-bg.png |
| + | |
| + | |
| + | there are a lot of centos reference there, maybe we want to do something with it: |
| + | ./usr/share/xml/scap/ssg/content/ssg-centos6-ds.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-centos7-ds.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-centos7-xccdf.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-firefox-ds.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-jre-ds.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-rhel7-cpe-dictionary.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-rhel7-cpe-oval.xml |
| + | ./usr/share/xml/scap/ssg/content/ssg-rhel7-oval.xml |
| + | |
| + | and the branding of the os installer: |
| + | ./etc/centos-release |
| + | ./etc/os-release |
| + | ./etc/redhat-release |
| + | ./etc/e-smith-release |
| + | ./etc/system-release-cpe |
| + | |
| + | edit the buildstamp accordingly |
| + | ./.buildstamp |
| + | |
| + | do the following: |
| + | find . | cpio -c -o | gzip -9cv > ../product.img; cd .. |
| + | cp product.img /build/smeserver/stage/10/x86_64/images/ |
| + | |
| + | |
| + | TO DO : |
| + | *translation files ? |
| + | *CentOSPlaceholder.html |
| + | *help files |
| + | */usr/share/centos-release/EULA |
| + | |
| + | === alternative how to edit content of squashfs for SME 10 alpha 2 (WIP)=== |
| + | |
| + | f we want a little more liberty in term of remove centos 7 branding in the installer (eg, remove pictures to use the name we want for ours instead of hiding centos ones): |
| | | |
| * first extract the content of Live image, and the image of Anaconda inside | | * first extract the content of Live image, and the image of Anaconda inside |
| cd /build/smeserver/stage/10.0.alpha1/x86_64/LiveOS/ | | cd /build/smeserver/stage/10.0.alpha1/x86_64/LiveOS/ |
− | mkdir squashfs | + | mkdir /mnt/squashfs |
− | sudo mount -o loop squashfs.img squashfs | + | sudo mount -o loop squashfs.img /mnt/squashfs |
− | mkdir rootfs | + | mkdir -p /tmp/rootfs/LiveOS |
− | sudo mount -o loop squashfs/LiveOS/rootfs.img rootfs | + | cp -a /mnt/squashfs/LiveOS/rootfs.img /tmp/rootfs/LiveOS/ |
| + | mkdir /mnt/rootfs |
| + | sudo umount /mnt/squashfs |
| + | sudo mount -o loop /tmp/rootfs/LiveOS/rootfs.img /mnt/rootfs |
| | | |
| | | |
Line 117: |
Line 223: |
| NB: cp and rm inside the fs will need to be done with sudo :( | | NB: cp and rm inside the fs will need to be done with sudo :( |
| | | |
− | # /usr/share/anaconda/pixmaps/ content (logo, side bar, top bar, etc.) | + | # usr/share/anaconda/pixmaps/ content (logo, side bar, top bar, etc.) |
− | # /usr/share/anaconda/pixmaps/rnotes/en/ content (Banners for the installation progress screen) | + | # usr/share/anaconda/pixmaps/rnotes/en/ content (Banners for the installation progress screen) |
− | # /usr/share/anaconda/anaconda-gtk.css (gui stylesheet) | + | # usr/share/anaconda/anaconda-gtk.css (gui stylesheet) |
− | # /run/install/product/pyanaconda/installclasses/ (for changing the product name) | + | # run/install/product/pyanaconda/installclasses/custom.py (for changing the product name as told by red hat) |
| + | # usr/lib64/python2.7/site-packages/pyanaconda/installclasses/centos.py ( to effectively change the product name!! ) |
| | | |
− | # addons, we do not need for now /usr/share/anaconda/addons/
| + | we can also remove centos pictures in rnotes this way. |
− | # we might want to patch anaconda and copy files where necessary (later stage)
| |
| | | |
| | | |
| * finally rebuild images | | * finally rebuild images |
− | sudo umount squashfs | + | sudo umount /mnt/rootfs |
− | sudo umount rootfs | + | rm /build/smeserver/stage/10.0.alpha1/x86_64/LiveOS/squashfs.img |
− | rmdir rootfs | + | cd /build/smeserver/stage/10.0.alpha1/x86_64/LiveOS/ |
| + | mksquashfs /tmp/rootfs squashfs.img |
| + | |
| + | === patch anaconda and rebuild the whole installer for SME 10 alpha 3 or next (WIP)=== |
| + | |
| + | TO DO |