Create debian ISO with custom kernels and packages












0















I'm trying to create a custom Debian ISO with software that I have built and packaged to .deb. I have my system running on a virtual machine and have fully tested my packages. For the software to work I have customised the kernel to my needs, recompiled and installed.



Now I'm wondering how do I package this into an ISO with the custom kernels and my own packages. I've tried using simple-cdd and a few other methods with no success.



The must be a simple way to build an ISO from you current system setup?



Any advice on how to do this?










share|improve this question























  • I hope you are right. What are your intentions with the ISO? Does your VM system provide a kind of export?

    – Gerard H. Pille
    May 28 '18 at 8:37













  • I intend to distribute the ISO to be downloaded and installed onto a device or VM. I'm using XenServer as the host for my VM, I haven't looked to much into that functionality of Xen.

    – Zeedinstein
    May 28 '18 at 8:54











  • Would you want your users to install it or run it immediately (some kind of "live cd" ).

    – Gerard H. Pille
    May 28 '18 at 9:00













  • Definitely install it

    – Zeedinstein
    May 28 '18 at 9:17
















0















I'm trying to create a custom Debian ISO with software that I have built and packaged to .deb. I have my system running on a virtual machine and have fully tested my packages. For the software to work I have customised the kernel to my needs, recompiled and installed.



Now I'm wondering how do I package this into an ISO with the custom kernels and my own packages. I've tried using simple-cdd and a few other methods with no success.



The must be a simple way to build an ISO from you current system setup?



Any advice on how to do this?










share|improve this question























  • I hope you are right. What are your intentions with the ISO? Does your VM system provide a kind of export?

    – Gerard H. Pille
    May 28 '18 at 8:37













  • I intend to distribute the ISO to be downloaded and installed onto a device or VM. I'm using XenServer as the host for my VM, I haven't looked to much into that functionality of Xen.

    – Zeedinstein
    May 28 '18 at 8:54











  • Would you want your users to install it or run it immediately (some kind of "live cd" ).

    – Gerard H. Pille
    May 28 '18 at 9:00













  • Definitely install it

    – Zeedinstein
    May 28 '18 at 9:17














0












0








0








I'm trying to create a custom Debian ISO with software that I have built and packaged to .deb. I have my system running on a virtual machine and have fully tested my packages. For the software to work I have customised the kernel to my needs, recompiled and installed.



Now I'm wondering how do I package this into an ISO with the custom kernels and my own packages. I've tried using simple-cdd and a few other methods with no success.



The must be a simple way to build an ISO from you current system setup?



Any advice on how to do this?










share|improve this question














I'm trying to create a custom Debian ISO with software that I have built and packaged to .deb. I have my system running on a virtual machine and have fully tested my packages. For the software to work I have customised the kernel to my needs, recompiled and installed.



Now I'm wondering how do I package this into an ISO with the custom kernels and my own packages. I've tried using simple-cdd and a few other methods with no success.



The must be a simple way to build an ISO from you current system setup?



Any advice on how to do this?







linux debian iso-image kernel






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 28 '18 at 8:25









ZeedinsteinZeedinstein

11




11













  • I hope you are right. What are your intentions with the ISO? Does your VM system provide a kind of export?

    – Gerard H. Pille
    May 28 '18 at 8:37













  • I intend to distribute the ISO to be downloaded and installed onto a device or VM. I'm using XenServer as the host for my VM, I haven't looked to much into that functionality of Xen.

    – Zeedinstein
    May 28 '18 at 8:54











  • Would you want your users to install it or run it immediately (some kind of "live cd" ).

    – Gerard H. Pille
    May 28 '18 at 9:00













  • Definitely install it

    – Zeedinstein
    May 28 '18 at 9:17



















  • I hope you are right. What are your intentions with the ISO? Does your VM system provide a kind of export?

    – Gerard H. Pille
    May 28 '18 at 8:37













  • I intend to distribute the ISO to be downloaded and installed onto a device or VM. I'm using XenServer as the host for my VM, I haven't looked to much into that functionality of Xen.

    – Zeedinstein
    May 28 '18 at 8:54











  • Would you want your users to install it or run it immediately (some kind of "live cd" ).

    – Gerard H. Pille
    May 28 '18 at 9:00













  • Definitely install it

    – Zeedinstein
    May 28 '18 at 9:17

















I hope you are right. What are your intentions with the ISO? Does your VM system provide a kind of export?

– Gerard H. Pille
May 28 '18 at 8:37







I hope you are right. What are your intentions with the ISO? Does your VM system provide a kind of export?

– Gerard H. Pille
May 28 '18 at 8:37















I intend to distribute the ISO to be downloaded and installed onto a device or VM. I'm using XenServer as the host for my VM, I haven't looked to much into that functionality of Xen.

– Zeedinstein
May 28 '18 at 8:54





I intend to distribute the ISO to be downloaded and installed onto a device or VM. I'm using XenServer as the host for my VM, I haven't looked to much into that functionality of Xen.

– Zeedinstein
May 28 '18 at 8:54













Would you want your users to install it or run it immediately (some kind of "live cd" ).

– Gerard H. Pille
May 28 '18 at 9:00







Would you want your users to install it or run it immediately (some kind of "live cd" ).

– Gerard H. Pille
May 28 '18 at 9:00















Definitely install it

– Zeedinstein
May 28 '18 at 9:17





Definitely install it

– Zeedinstein
May 28 '18 at 9:17










2 Answers
2






active

oldest

votes


















0














What you're looking for is called preseeding. Here is the official Debian documentation on the subject for reference.



I have used this project before which is for Ubuntu, but I guess it could easily be tweaked to work with Debian. It creates and unattended installation disk, but if you want your users to answer some of the questions that should be possible by changing the seed file.



Preseeding allows you to add your own packages to ISO's and run any script commands by using the late_command option, ie.



d-i preseed/late_command string cp -a /cdrom/pool/extras/packages/custom_script.sh /target/usr/local/bin/; in-target /usr/local/bin/custom_script.sh



Here is a gist with my local script (based on the link above). Line 76 in the bash script is where files are copied into the iso and the last line of the seed file is where it's copied into the final system and potentially executed.






share|improve this answer


























  • What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

    – Zeedinstein
    May 28 '18 at 9:20











  • The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

    – Mikael Kjær
    May 28 '18 at 9:23











  • Thanks, I'm taking a look at your script and I will give it a try manually.

    – Zeedinstein
    May 28 '18 at 9:42











  • Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

    – Mikael Kjær
    May 28 '18 at 9:49











  • You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

    – Zeedinstein
    May 28 '18 at 12:55



















0














There's also a project for unattended Debian and Ubuntu intsallations. It's called FAI. You can easily create your own ISO image containing a mix of official packages and you own software packages. FAI does the usual preseeding, but can do much more. For an easy start there's a web service for creating customized ISO images. Have a look at fai-project.org/FAIme
There's an option to use the backports kernel for Debian stable, or to use Debian testing.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1326524%2fcreate-debian-iso-with-custom-kernels-and-packages%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    What you're looking for is called preseeding. Here is the official Debian documentation on the subject for reference.



    I have used this project before which is for Ubuntu, but I guess it could easily be tweaked to work with Debian. It creates and unattended installation disk, but if you want your users to answer some of the questions that should be possible by changing the seed file.



    Preseeding allows you to add your own packages to ISO's and run any script commands by using the late_command option, ie.



    d-i preseed/late_command string cp -a /cdrom/pool/extras/packages/custom_script.sh /target/usr/local/bin/; in-target /usr/local/bin/custom_script.sh



    Here is a gist with my local script (based on the link above). Line 76 in the bash script is where files are copied into the iso and the last line of the seed file is where it's copied into the final system and potentially executed.






    share|improve this answer


























    • What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

      – Zeedinstein
      May 28 '18 at 9:20











    • The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

      – Mikael Kjær
      May 28 '18 at 9:23











    • Thanks, I'm taking a look at your script and I will give it a try manually.

      – Zeedinstein
      May 28 '18 at 9:42











    • Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

      – Mikael Kjær
      May 28 '18 at 9:49











    • You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

      – Zeedinstein
      May 28 '18 at 12:55
















    0














    What you're looking for is called preseeding. Here is the official Debian documentation on the subject for reference.



    I have used this project before which is for Ubuntu, but I guess it could easily be tweaked to work with Debian. It creates and unattended installation disk, but if you want your users to answer some of the questions that should be possible by changing the seed file.



    Preseeding allows you to add your own packages to ISO's and run any script commands by using the late_command option, ie.



    d-i preseed/late_command string cp -a /cdrom/pool/extras/packages/custom_script.sh /target/usr/local/bin/; in-target /usr/local/bin/custom_script.sh



    Here is a gist with my local script (based on the link above). Line 76 in the bash script is where files are copied into the iso and the last line of the seed file is where it's copied into the final system and potentially executed.






    share|improve this answer


























    • What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

      – Zeedinstein
      May 28 '18 at 9:20











    • The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

      – Mikael Kjær
      May 28 '18 at 9:23











    • Thanks, I'm taking a look at your script and I will give it a try manually.

      – Zeedinstein
      May 28 '18 at 9:42











    • Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

      – Mikael Kjær
      May 28 '18 at 9:49











    • You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

      – Zeedinstein
      May 28 '18 at 12:55














    0












    0








    0







    What you're looking for is called preseeding. Here is the official Debian documentation on the subject for reference.



    I have used this project before which is for Ubuntu, but I guess it could easily be tweaked to work with Debian. It creates and unattended installation disk, but if you want your users to answer some of the questions that should be possible by changing the seed file.



    Preseeding allows you to add your own packages to ISO's and run any script commands by using the late_command option, ie.



    d-i preseed/late_command string cp -a /cdrom/pool/extras/packages/custom_script.sh /target/usr/local/bin/; in-target /usr/local/bin/custom_script.sh



    Here is a gist with my local script (based on the link above). Line 76 in the bash script is where files are copied into the iso and the last line of the seed file is where it's copied into the final system and potentially executed.






    share|improve this answer















    What you're looking for is called preseeding. Here is the official Debian documentation on the subject for reference.



    I have used this project before which is for Ubuntu, but I guess it could easily be tweaked to work with Debian. It creates and unattended installation disk, but if you want your users to answer some of the questions that should be possible by changing the seed file.



    Preseeding allows you to add your own packages to ISO's and run any script commands by using the late_command option, ie.



    d-i preseed/late_command string cp -a /cdrom/pool/extras/packages/custom_script.sh /target/usr/local/bin/; in-target /usr/local/bin/custom_script.sh



    Here is a gist with my local script (based on the link above). Line 76 in the bash script is where files are copied into the iso and the last line of the seed file is where it's copied into the final system and potentially executed.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 28 '18 at 9:21

























    answered May 28 '18 at 8:58









    Mikael KjærMikael Kjær

    1,200313




    1,200313













    • What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

      – Zeedinstein
      May 28 '18 at 9:20











    • The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

      – Mikael Kjær
      May 28 '18 at 9:23











    • Thanks, I'm taking a look at your script and I will give it a try manually.

      – Zeedinstein
      May 28 '18 at 9:42











    • Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

      – Mikael Kjær
      May 28 '18 at 9:49











    • You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

      – Zeedinstein
      May 28 '18 at 12:55



















    • What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

      – Zeedinstein
      May 28 '18 at 9:20











    • The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

      – Mikael Kjær
      May 28 '18 at 9:23











    • Thanks, I'm taking a look at your script and I will give it a try manually.

      – Zeedinstein
      May 28 '18 at 9:42











    • Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

      – Mikael Kjær
      May 28 '18 at 9:49











    • You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

      – Zeedinstein
      May 28 '18 at 12:55

















    What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

    – Zeedinstein
    May 28 '18 at 9:20





    What have you done here? Have you mounted an ISO, then editing the pool to added the current packages installed under /usr/local/bin?

    – Zeedinstein
    May 28 '18 at 9:20













    The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

    – Mikael Kjær
    May 28 '18 at 9:23





    The script in link 2 and 3 will download ISO files, mount them, do some changes and then write a new ISO file. The late_command option I added was just to show that it's also possible to run a script after end installation.

    – Mikael Kjær
    May 28 '18 at 9:23













    Thanks, I'm taking a look at your script and I will give it a try manually.

    – Zeedinstein
    May 28 '18 at 9:42





    Thanks, I'm taking a look at your script and I will give it a try manually.

    – Zeedinstein
    May 28 '18 at 9:42













    Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

    – Mikael Kjær
    May 28 '18 at 9:49





    Great and just ask question so I can update along the way. It's not a very complicated process but it requires some trial and error.

    – Mikael Kjær
    May 28 '18 at 9:49













    You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

    – Zeedinstein
    May 28 '18 at 12:55





    You are using mkisofs, mkpasswd and isohybrid in your script which is not available to my OS (Debian Jessie 8.5) it seems. Also how does this line know what packages there are? if [[ -d "packages" ]]; then

    – Zeedinstein
    May 28 '18 at 12:55













    0














    There's also a project for unattended Debian and Ubuntu intsallations. It's called FAI. You can easily create your own ISO image containing a mix of official packages and you own software packages. FAI does the usual preseeding, but can do much more. For an easy start there's a web service for creating customized ISO images. Have a look at fai-project.org/FAIme
    There's an option to use the backports kernel for Debian stable, or to use Debian testing.






    share|improve this answer




























      0














      There's also a project for unattended Debian and Ubuntu intsallations. It's called FAI. You can easily create your own ISO image containing a mix of official packages and you own software packages. FAI does the usual preseeding, but can do much more. For an easy start there's a web service for creating customized ISO images. Have a look at fai-project.org/FAIme
      There's an option to use the backports kernel for Debian stable, or to use Debian testing.






      share|improve this answer


























        0












        0








        0







        There's also a project for unattended Debian and Ubuntu intsallations. It's called FAI. You can easily create your own ISO image containing a mix of official packages and you own software packages. FAI does the usual preseeding, but can do much more. For an easy start there's a web service for creating customized ISO images. Have a look at fai-project.org/FAIme
        There's an option to use the backports kernel for Debian stable, or to use Debian testing.






        share|improve this answer













        There's also a project for unattended Debian and Ubuntu intsallations. It's called FAI. You can easily create your own ISO image containing a mix of official packages and you own software packages. FAI does the usual preseeding, but can do much more. For an easy start there's a web service for creating customized ISO images. Have a look at fai-project.org/FAIme
        There's an option to use the backports kernel for Debian stable, or to use Debian testing.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 17 at 21:55









        Mister FAIMister FAI

        6




        6






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1326524%2fcreate-debian-iso-with-custom-kernels-and-packages%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Index of /

            Tribalistas

            Listed building