Preseed Ubiquity success command executed incompletely












0














I'm currently in the process of building an automated installation of Ubuntu 16.04 desktop. As custom command in my preseed file I'm using this



# Custom Commands
ubiquity ubiquity/success_command
string mkdir /target/install/;
cp -R /cdrom/scripts/* /target/install/;
chroot /target chmod +x /install/postinstall.sh;
chroot /target bash /install/postinstall.sh;


and postinstall.sh has this content



# Install Chrome
cd /install
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
# Delete Chrome install
rm google-chrome-stable_current_amd64.deb


But Chrome doesn't get installed. The script itself is successfully copied to /install and also marked as executable



Hopefully somebody has an idea where my error is located.










share|improve this question





























    0














    I'm currently in the process of building an automated installation of Ubuntu 16.04 desktop. As custom command in my preseed file I'm using this



    # Custom Commands
    ubiquity ubiquity/success_command
    string mkdir /target/install/;
    cp -R /cdrom/scripts/* /target/install/;
    chroot /target chmod +x /install/postinstall.sh;
    chroot /target bash /install/postinstall.sh;


    and postinstall.sh has this content



    # Install Chrome
    cd /install
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    dpkg -i google-chrome-stable_current_amd64.deb
    # Delete Chrome install
    rm google-chrome-stable_current_amd64.deb


    But Chrome doesn't get installed. The script itself is successfully copied to /install and also marked as executable



    Hopefully somebody has an idea where my error is located.










    share|improve this question



























      0












      0








      0







      I'm currently in the process of building an automated installation of Ubuntu 16.04 desktop. As custom command in my preseed file I'm using this



      # Custom Commands
      ubiquity ubiquity/success_command
      string mkdir /target/install/;
      cp -R /cdrom/scripts/* /target/install/;
      chroot /target chmod +x /install/postinstall.sh;
      chroot /target bash /install/postinstall.sh;


      and postinstall.sh has this content



      # Install Chrome
      cd /install
      wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
      dpkg -i google-chrome-stable_current_amd64.deb
      # Delete Chrome install
      rm google-chrome-stable_current_amd64.deb


      But Chrome doesn't get installed. The script itself is successfully copied to /install and also marked as executable



      Hopefully somebody has an idea where my error is located.










      share|improve this question















      I'm currently in the process of building an automated installation of Ubuntu 16.04 desktop. As custom command in my preseed file I'm using this



      # Custom Commands
      ubiquity ubiquity/success_command
      string mkdir /target/install/;
      cp -R /cdrom/scripts/* /target/install/;
      chroot /target chmod +x /install/postinstall.sh;
      chroot /target bash /install/postinstall.sh;


      and postinstall.sh has this content



      # Install Chrome
      cd /install
      wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
      dpkg -i google-chrome-stable_current_amd64.deb
      # Delete Chrome install
      rm google-chrome-stable_current_amd64.deb


      But Chrome doesn't get installed. The script itself is successfully copied to /install and also marked as executable



      Hopefully somebody has an idea where my error is located.







      system-installation automation preseed ubiquity






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 26 '16 at 7:40







      danielh

















      asked Oct 26 '16 at 7:27









      danielhdanielh

      13




      13






















          3 Answers
          3






          active

          oldest

          votes


















          0














          The Chrome installer could be asking questions, maybe add yes to your install command?



          yes | dpkg -i google-chrome-stable_current_amd64.deb



          or



          apt-get -y install google-chrome-stable_current_amd64.deb






          share|improve this answer





























            0














            It will not start automatically, you should put it in the rc.local in order to start after the first login in the background.



            If you want to have it as part of the installtion process then you need to add the dep file to cdrom/pool/extras.



            A quick solution will be:



            presseed:

            ubiquity ubiquity/success_command string

            cp -a /cdrom/preseed/install.sh /target/root/install.sh;

            sed -i 's_exit 0_sh /root/install.sh_' /target/etc/rc.local



            And in your script just remove it from rc.local when it is done:

            Script:

            sed -i 's_sh /root/install.sh_exit 0_' /etc/rc.local



            I hope it make sense :)






            share|improve this answer





























              0














              Maybe :



              chroot /target bash /install/postinstall.sh;


              instead :



              chroot /target bash -c "/install/postinstall.sh";


              Following good for me(xubuntu 18.04) :



              bash -c "/cdrom/tools/run.sh";


              I use isocreator (cubic), if i want to add other deb files for my installer and I use preseed to install the system automatically.






              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "89"
                };
                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%2faskubuntu.com%2fquestions%2f841899%2fpreseed-ubiquity-success-command-executed-incompletely%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                0














                The Chrome installer could be asking questions, maybe add yes to your install command?



                yes | dpkg -i google-chrome-stable_current_amd64.deb



                or



                apt-get -y install google-chrome-stable_current_amd64.deb






                share|improve this answer


























                  0














                  The Chrome installer could be asking questions, maybe add yes to your install command?



                  yes | dpkg -i google-chrome-stable_current_amd64.deb



                  or



                  apt-get -y install google-chrome-stable_current_amd64.deb






                  share|improve this answer
























                    0












                    0








                    0






                    The Chrome installer could be asking questions, maybe add yes to your install command?



                    yes | dpkg -i google-chrome-stable_current_amd64.deb



                    or



                    apt-get -y install google-chrome-stable_current_amd64.deb






                    share|improve this answer












                    The Chrome installer could be asking questions, maybe add yes to your install command?



                    yes | dpkg -i google-chrome-stable_current_amd64.deb



                    or



                    apt-get -y install google-chrome-stable_current_amd64.deb







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 14 '17 at 17:57









                    Geoffrey TimmermanGeoffrey Timmerman

                    1




                    1

























                        0














                        It will not start automatically, you should put it in the rc.local in order to start after the first login in the background.



                        If you want to have it as part of the installtion process then you need to add the dep file to cdrom/pool/extras.



                        A quick solution will be:



                        presseed:

                        ubiquity ubiquity/success_command string

                        cp -a /cdrom/preseed/install.sh /target/root/install.sh;

                        sed -i 's_exit 0_sh /root/install.sh_' /target/etc/rc.local



                        And in your script just remove it from rc.local when it is done:

                        Script:

                        sed -i 's_sh /root/install.sh_exit 0_' /etc/rc.local



                        I hope it make sense :)






                        share|improve this answer


























                          0














                          It will not start automatically, you should put it in the rc.local in order to start after the first login in the background.



                          If you want to have it as part of the installtion process then you need to add the dep file to cdrom/pool/extras.



                          A quick solution will be:



                          presseed:

                          ubiquity ubiquity/success_command string

                          cp -a /cdrom/preseed/install.sh /target/root/install.sh;

                          sed -i 's_exit 0_sh /root/install.sh_' /target/etc/rc.local



                          And in your script just remove it from rc.local when it is done:

                          Script:

                          sed -i 's_sh /root/install.sh_exit 0_' /etc/rc.local



                          I hope it make sense :)






                          share|improve this answer
























                            0












                            0








                            0






                            It will not start automatically, you should put it in the rc.local in order to start after the first login in the background.



                            If you want to have it as part of the installtion process then you need to add the dep file to cdrom/pool/extras.



                            A quick solution will be:



                            presseed:

                            ubiquity ubiquity/success_command string

                            cp -a /cdrom/preseed/install.sh /target/root/install.sh;

                            sed -i 's_exit 0_sh /root/install.sh_' /target/etc/rc.local



                            And in your script just remove it from rc.local when it is done:

                            Script:

                            sed -i 's_sh /root/install.sh_exit 0_' /etc/rc.local



                            I hope it make sense :)






                            share|improve this answer












                            It will not start automatically, you should put it in the rc.local in order to start after the first login in the background.



                            If you want to have it as part of the installtion process then you need to add the dep file to cdrom/pool/extras.



                            A quick solution will be:



                            presseed:

                            ubiquity ubiquity/success_command string

                            cp -a /cdrom/preseed/install.sh /target/root/install.sh;

                            sed -i 's_exit 0_sh /root/install.sh_' /target/etc/rc.local



                            And in your script just remove it from rc.local when it is done:

                            Script:

                            sed -i 's_sh /root/install.sh_exit 0_' /etc/rc.local



                            I hope it make sense :)







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 23 '17 at 14:30









                            Avraham CohenAvraham Cohen

                            1




                            1























                                0














                                Maybe :



                                chroot /target bash /install/postinstall.sh;


                                instead :



                                chroot /target bash -c "/install/postinstall.sh";


                                Following good for me(xubuntu 18.04) :



                                bash -c "/cdrom/tools/run.sh";


                                I use isocreator (cubic), if i want to add other deb files for my installer and I use preseed to install the system automatically.






                                share|improve this answer




























                                  0














                                  Maybe :



                                  chroot /target bash /install/postinstall.sh;


                                  instead :



                                  chroot /target bash -c "/install/postinstall.sh";


                                  Following good for me(xubuntu 18.04) :



                                  bash -c "/cdrom/tools/run.sh";


                                  I use isocreator (cubic), if i want to add other deb files for my installer and I use preseed to install the system automatically.






                                  share|improve this answer


























                                    0












                                    0








                                    0






                                    Maybe :



                                    chroot /target bash /install/postinstall.sh;


                                    instead :



                                    chroot /target bash -c "/install/postinstall.sh";


                                    Following good for me(xubuntu 18.04) :



                                    bash -c "/cdrom/tools/run.sh";


                                    I use isocreator (cubic), if i want to add other deb files for my installer and I use preseed to install the system automatically.






                                    share|improve this answer














                                    Maybe :



                                    chroot /target bash /install/postinstall.sh;


                                    instead :



                                    chroot /target bash -c "/install/postinstall.sh";


                                    Following good for me(xubuntu 18.04) :



                                    bash -c "/cdrom/tools/run.sh";


                                    I use isocreator (cubic), if i want to add other deb files for my installer and I use preseed to install the system automatically.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Dec 6 '18 at 9:06

























                                    answered Dec 5 '18 at 14:47









                                    GuestGuest

                                    11




                                    11






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Ask Ubuntu!


                                        • 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.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • 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%2faskubuntu.com%2fquestions%2f841899%2fpreseed-ubiquity-success-command-executed-incompletely%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

                                        How to change which sound is reproduced for terminal bell?

                                        Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                                        Can I use Tabulator js library in my java Spring + Thymeleaf project?