Alpine Linux - how do I define packages to load on boot?












0















It seems that Alpine Linux loads packages up when it boots. How do I add openssh to the packages that are loaded at boot time?



When I am logged in I do "apk info" which lists 16 packages as follows:



localhost:~# apk info
musl
busybox
alpine-baselayout
openrc
alpine-conf
zlib
libcrypto1.0
libssl1.0
apk-tools
busybox-suid
busybox-initscripts
scanelf
musl-utils
libc-utils
alpine-keys
alpine-base
localhost:~#


The following messages from the boot log show these 16 packages being loaded:



* Installing packages to root filesystem: (1/16) Installing musl (1.1.14-r12)
7 0% [ ][ 3.787784] tsc: Refined TSC clocksource calibration: 2600.002 MHz
[ 3.788821] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x257a3e40e8d, max_idle_ns: 440795298933 ns
8[0K(2/16) Installing busybox (1.24.2-r11)
7 7% [### ]8[0K7 17% [####### ]8[0KExecuting busybox-1.24.2-r11.post-install
(3/16) Installing alpine-baselayout (3.0.3-r0)
7 18% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.pre-install
7 18% [######## ]8[0K7 19% [######## ]8[0K7 20% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.post-install
(4/16) Installing openrc (0.21-r2)
7 23% [########## ]8[0K7 24% [########## ]8[0K7 25% [########## ]8[0K7 25% [########### ]8[0K7 26% [########### ]8[0K7 27% [########### ]8[0K7 28% [############ ]8[0K7 29% [############ ]8[0K7 30% [############ ]8[0K7 30% [############# ]8[0K7 31% [############# ]8[0K7 32% [############# ]8[0K7 32% [############## ]8[0K7 33% [############## ]8[0K7 34% [############## ]8[0K7 35% [############### ]8[0K7 36% [############### ]8[0K7 37% [############### ]8[0K7 37% [################ ]8[0K7 38% [################ ]8[0K7 39% [################ ]8[0K7 39% [################# ]8[0K7 40% [################# ]8[0K7 41% [################# ]8[0K7 42% [################## ]8[0K7 43% [################## ]8[0K7 44% [################## ]8[0K7 44% [################### ]8[0K7 45% [################### ]8[0K7 46% [################### ]8[0K7 46% [#################### ]8[0K7 47% [#################### ]8[0KExecuting openrc-0.21-r2.post-install
(5/16) Installing alpine-conf (3.4.1-r5)
7 49% [##################### ]8[0K7 50% [##################### ]8[0K7 51% [##################### ]8[0K7 51% [###################### ]8[0K(6/16) Installing zlib (1.2.8-r2)
7 52% [###################### ]8[0K(7/16) Installing libcrypto1.0 (1.0.2j-r0)
7 53% [###################### ]8[0K7 80% [################################## ]8[0K7 81% [################################### ]8[0K7 82% [################################### ]8[0K7 83% [################################### ]8[0K7 83% [#################################### ]8[0K7 84% [#################################### ]8[0K7 85% [#################################### ]8[0K(8/16) Installing libssl1.0 (1.0.2j-r0)
7 85% [#################################### ]8[0K(9/16) Installing apk-tools (2.6.7-r0)
7 91% [####################################### ]8[0K(10/16) Installing busybox-suid (1.24.2-r11)
7 94% [######################################## ]8[0K(11/16) Installing busybox-initscripts (3.0-r3)
7 94% [######################################## ]8[0K7 95% [######################################## ]8[0K7 95% [######################################### ]8[0K7 96% [######################################### ]8[0KExecuting busybox-initscripts-3.0-r3.post-install
(12/16) Installing scanelf (1.1.6-r0)
7 96% [######################################### ]8[0K(13/16) Installing musl-utils (1.1.14-r12)
7 97% [########################################## ]8[0K7 98% [########################################## ]8[0K(14/16) Installing libc-utils (0.7-r0)
7 99% [########################################## ]8[0K(15/16) Installing alpine-keys (1.1-r0)
7 99% [########################################## ]8[0K(16/16) Installing alpine-base (3.4.4-r0)
7 99% [########################################## ]8[0K7100% [###########################################]8[0KExecuting busybox-1.24.2-r11.trigger
OK: 7 MiB in 16 packages
ok.









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    It seems that Alpine Linux loads packages up when it boots. How do I add openssh to the packages that are loaded at boot time?



    When I am logged in I do "apk info" which lists 16 packages as follows:



    localhost:~# apk info
    musl
    busybox
    alpine-baselayout
    openrc
    alpine-conf
    zlib
    libcrypto1.0
    libssl1.0
    apk-tools
    busybox-suid
    busybox-initscripts
    scanelf
    musl-utils
    libc-utils
    alpine-keys
    alpine-base
    localhost:~#


    The following messages from the boot log show these 16 packages being loaded:



    * Installing packages to root filesystem: (1/16) Installing musl (1.1.14-r12)
    7 0% [ ][ 3.787784] tsc: Refined TSC clocksource calibration: 2600.002 MHz
    [ 3.788821] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x257a3e40e8d, max_idle_ns: 440795298933 ns
    8[0K(2/16) Installing busybox (1.24.2-r11)
    7 7% [### ]8[0K7 17% [####### ]8[0KExecuting busybox-1.24.2-r11.post-install
    (3/16) Installing alpine-baselayout (3.0.3-r0)
    7 18% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.pre-install
    7 18% [######## ]8[0K7 19% [######## ]8[0K7 20% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.post-install
    (4/16) Installing openrc (0.21-r2)
    7 23% [########## ]8[0K7 24% [########## ]8[0K7 25% [########## ]8[0K7 25% [########### ]8[0K7 26% [########### ]8[0K7 27% [########### ]8[0K7 28% [############ ]8[0K7 29% [############ ]8[0K7 30% [############ ]8[0K7 30% [############# ]8[0K7 31% [############# ]8[0K7 32% [############# ]8[0K7 32% [############## ]8[0K7 33% [############## ]8[0K7 34% [############## ]8[0K7 35% [############### ]8[0K7 36% [############### ]8[0K7 37% [############### ]8[0K7 37% [################ ]8[0K7 38% [################ ]8[0K7 39% [################ ]8[0K7 39% [################# ]8[0K7 40% [################# ]8[0K7 41% [################# ]8[0K7 42% [################## ]8[0K7 43% [################## ]8[0K7 44% [################## ]8[0K7 44% [################### ]8[0K7 45% [################### ]8[0K7 46% [################### ]8[0K7 46% [#################### ]8[0K7 47% [#################### ]8[0KExecuting openrc-0.21-r2.post-install
    (5/16) Installing alpine-conf (3.4.1-r5)
    7 49% [##################### ]8[0K7 50% [##################### ]8[0K7 51% [##################### ]8[0K7 51% [###################### ]8[0K(6/16) Installing zlib (1.2.8-r2)
    7 52% [###################### ]8[0K(7/16) Installing libcrypto1.0 (1.0.2j-r0)
    7 53% [###################### ]8[0K7 80% [################################## ]8[0K7 81% [################################### ]8[0K7 82% [################################### ]8[0K7 83% [################################### ]8[0K7 83% [#################################### ]8[0K7 84% [#################################### ]8[0K7 85% [#################################### ]8[0K(8/16) Installing libssl1.0 (1.0.2j-r0)
    7 85% [#################################### ]8[0K(9/16) Installing apk-tools (2.6.7-r0)
    7 91% [####################################### ]8[0K(10/16) Installing busybox-suid (1.24.2-r11)
    7 94% [######################################## ]8[0K(11/16) Installing busybox-initscripts (3.0-r3)
    7 94% [######################################## ]8[0K7 95% [######################################## ]8[0K7 95% [######################################### ]8[0K7 96% [######################################### ]8[0KExecuting busybox-initscripts-3.0-r3.post-install
    (12/16) Installing scanelf (1.1.6-r0)
    7 96% [######################################### ]8[0K(13/16) Installing musl-utils (1.1.14-r12)
    7 97% [########################################## ]8[0K7 98% [########################################## ]8[0K(14/16) Installing libc-utils (0.7-r0)
    7 99% [########################################## ]8[0K(15/16) Installing alpine-keys (1.1-r0)
    7 99% [########################################## ]8[0K(16/16) Installing alpine-base (3.4.4-r0)
    7 99% [########################################## ]8[0K7100% [###########################################]8[0KExecuting busybox-1.24.2-r11.trigger
    OK: 7 MiB in 16 packages
    ok.









    share|improve this question
















    bumped to the homepage by Community 1 hour ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      It seems that Alpine Linux loads packages up when it boots. How do I add openssh to the packages that are loaded at boot time?



      When I am logged in I do "apk info" which lists 16 packages as follows:



      localhost:~# apk info
      musl
      busybox
      alpine-baselayout
      openrc
      alpine-conf
      zlib
      libcrypto1.0
      libssl1.0
      apk-tools
      busybox-suid
      busybox-initscripts
      scanelf
      musl-utils
      libc-utils
      alpine-keys
      alpine-base
      localhost:~#


      The following messages from the boot log show these 16 packages being loaded:



      * Installing packages to root filesystem: (1/16) Installing musl (1.1.14-r12)
      7 0% [ ][ 3.787784] tsc: Refined TSC clocksource calibration: 2600.002 MHz
      [ 3.788821] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x257a3e40e8d, max_idle_ns: 440795298933 ns
      8[0K(2/16) Installing busybox (1.24.2-r11)
      7 7% [### ]8[0K7 17% [####### ]8[0KExecuting busybox-1.24.2-r11.post-install
      (3/16) Installing alpine-baselayout (3.0.3-r0)
      7 18% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.pre-install
      7 18% [######## ]8[0K7 19% [######## ]8[0K7 20% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.post-install
      (4/16) Installing openrc (0.21-r2)
      7 23% [########## ]8[0K7 24% [########## ]8[0K7 25% [########## ]8[0K7 25% [########### ]8[0K7 26% [########### ]8[0K7 27% [########### ]8[0K7 28% [############ ]8[0K7 29% [############ ]8[0K7 30% [############ ]8[0K7 30% [############# ]8[0K7 31% [############# ]8[0K7 32% [############# ]8[0K7 32% [############## ]8[0K7 33% [############## ]8[0K7 34% [############## ]8[0K7 35% [############### ]8[0K7 36% [############### ]8[0K7 37% [############### ]8[0K7 37% [################ ]8[0K7 38% [################ ]8[0K7 39% [################ ]8[0K7 39% [################# ]8[0K7 40% [################# ]8[0K7 41% [################# ]8[0K7 42% [################## ]8[0K7 43% [################## ]8[0K7 44% [################## ]8[0K7 44% [################### ]8[0K7 45% [################### ]8[0K7 46% [################### ]8[0K7 46% [#################### ]8[0K7 47% [#################### ]8[0KExecuting openrc-0.21-r2.post-install
      (5/16) Installing alpine-conf (3.4.1-r5)
      7 49% [##################### ]8[0K7 50% [##################### ]8[0K7 51% [##################### ]8[0K7 51% [###################### ]8[0K(6/16) Installing zlib (1.2.8-r2)
      7 52% [###################### ]8[0K(7/16) Installing libcrypto1.0 (1.0.2j-r0)
      7 53% [###################### ]8[0K7 80% [################################## ]8[0K7 81% [################################### ]8[0K7 82% [################################### ]8[0K7 83% [################################### ]8[0K7 83% [#################################### ]8[0K7 84% [#################################### ]8[0K7 85% [#################################### ]8[0K(8/16) Installing libssl1.0 (1.0.2j-r0)
      7 85% [#################################### ]8[0K(9/16) Installing apk-tools (2.6.7-r0)
      7 91% [####################################### ]8[0K(10/16) Installing busybox-suid (1.24.2-r11)
      7 94% [######################################## ]8[0K(11/16) Installing busybox-initscripts (3.0-r3)
      7 94% [######################################## ]8[0K7 95% [######################################## ]8[0K7 95% [######################################### ]8[0K7 96% [######################################### ]8[0KExecuting busybox-initscripts-3.0-r3.post-install
      (12/16) Installing scanelf (1.1.6-r0)
      7 96% [######################################### ]8[0K(13/16) Installing musl-utils (1.1.14-r12)
      7 97% [########################################## ]8[0K7 98% [########################################## ]8[0K(14/16) Installing libc-utils (0.7-r0)
      7 99% [########################################## ]8[0K(15/16) Installing alpine-keys (1.1-r0)
      7 99% [########################################## ]8[0K(16/16) Installing alpine-base (3.4.4-r0)
      7 99% [########################################## ]8[0K7100% [###########################################]8[0KExecuting busybox-1.24.2-r11.trigger
      OK: 7 MiB in 16 packages
      ok.









      share|improve this question
















      It seems that Alpine Linux loads packages up when it boots. How do I add openssh to the packages that are loaded at boot time?



      When I am logged in I do "apk info" which lists 16 packages as follows:



      localhost:~# apk info
      musl
      busybox
      alpine-baselayout
      openrc
      alpine-conf
      zlib
      libcrypto1.0
      libssl1.0
      apk-tools
      busybox-suid
      busybox-initscripts
      scanelf
      musl-utils
      libc-utils
      alpine-keys
      alpine-base
      localhost:~#


      The following messages from the boot log show these 16 packages being loaded:



      * Installing packages to root filesystem: (1/16) Installing musl (1.1.14-r12)
      7 0% [ ][ 3.787784] tsc: Refined TSC clocksource calibration: 2600.002 MHz
      [ 3.788821] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x257a3e40e8d, max_idle_ns: 440795298933 ns
      8[0K(2/16) Installing busybox (1.24.2-r11)
      7 7% [### ]8[0K7 17% [####### ]8[0KExecuting busybox-1.24.2-r11.post-install
      (3/16) Installing alpine-baselayout (3.0.3-r0)
      7 18% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.pre-install
      7 18% [######## ]8[0K7 19% [######## ]8[0K7 20% [######## ]8[0KExecuting alpine-baselayout-3.0.3-r0.post-install
      (4/16) Installing openrc (0.21-r2)
      7 23% [########## ]8[0K7 24% [########## ]8[0K7 25% [########## ]8[0K7 25% [########### ]8[0K7 26% [########### ]8[0K7 27% [########### ]8[0K7 28% [############ ]8[0K7 29% [############ ]8[0K7 30% [############ ]8[0K7 30% [############# ]8[0K7 31% [############# ]8[0K7 32% [############# ]8[0K7 32% [############## ]8[0K7 33% [############## ]8[0K7 34% [############## ]8[0K7 35% [############### ]8[0K7 36% [############### ]8[0K7 37% [############### ]8[0K7 37% [################ ]8[0K7 38% [################ ]8[0K7 39% [################ ]8[0K7 39% [################# ]8[0K7 40% [################# ]8[0K7 41% [################# ]8[0K7 42% [################## ]8[0K7 43% [################## ]8[0K7 44% [################## ]8[0K7 44% [################### ]8[0K7 45% [################### ]8[0K7 46% [################### ]8[0K7 46% [#################### ]8[0K7 47% [#################### ]8[0KExecuting openrc-0.21-r2.post-install
      (5/16) Installing alpine-conf (3.4.1-r5)
      7 49% [##################### ]8[0K7 50% [##################### ]8[0K7 51% [##################### ]8[0K7 51% [###################### ]8[0K(6/16) Installing zlib (1.2.8-r2)
      7 52% [###################### ]8[0K(7/16) Installing libcrypto1.0 (1.0.2j-r0)
      7 53% [###################### ]8[0K7 80% [################################## ]8[0K7 81% [################################### ]8[0K7 82% [################################### ]8[0K7 83% [################################### ]8[0K7 83% [#################################### ]8[0K7 84% [#################################### ]8[0K7 85% [#################################### ]8[0K(8/16) Installing libssl1.0 (1.0.2j-r0)
      7 85% [#################################### ]8[0K(9/16) Installing apk-tools (2.6.7-r0)
      7 91% [####################################### ]8[0K(10/16) Installing busybox-suid (1.24.2-r11)
      7 94% [######################################## ]8[0K(11/16) Installing busybox-initscripts (3.0-r3)
      7 94% [######################################## ]8[0K7 95% [######################################## ]8[0K7 95% [######################################### ]8[0K7 96% [######################################### ]8[0KExecuting busybox-initscripts-3.0-r3.post-install
      (12/16) Installing scanelf (1.1.6-r0)
      7 96% [######################################### ]8[0K(13/16) Installing musl-utils (1.1.14-r12)
      7 97% [########################################## ]8[0K7 98% [########################################## ]8[0K(14/16) Installing libc-utils (0.7-r0)
      7 99% [########################################## ]8[0K(15/16) Installing alpine-keys (1.1-r0)
      7 99% [########################################## ]8[0K(16/16) Installing alpine-base (3.4.4-r0)
      7 99% [########################################## ]8[0K7100% [###########################################]8[0KExecuting busybox-1.24.2-r11.trigger
      OK: 7 MiB in 16 packages
      ok.






      alpine-linux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 26 '16 at 11:08







      Duke Dougal

















      asked Oct 26 '16 at 11:03









      Duke DougalDuke Dougal

      343217




      343217





      bumped to the homepage by Community 1 hour ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 1 hour ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Assuming that you are booting via USB, and you have lbu properly configured, after you install openssh you should run:



           lbu commit


          This will save the /etc dir in the apkovl overlay file in /media/usb/yourhostname.apkovl.tar.gz



          Packages installed on boot are located in /etc/apk/world, and when you save with "lbu commit" this file will be saved as well.



          For the record, to check if lbu is properly configured, (still assuming that you are booting via USB), run:



           cat /etc/lbu/lbu.conf | grep LBU_MEDIA


          it should return:



           LBU_MEDIA=usb





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f319035%2falpine-linux-how-do-i-define-packages-to-load-on-boot%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Assuming that you are booting via USB, and you have lbu properly configured, after you install openssh you should run:



             lbu commit


            This will save the /etc dir in the apkovl overlay file in /media/usb/yourhostname.apkovl.tar.gz



            Packages installed on boot are located in /etc/apk/world, and when you save with "lbu commit" this file will be saved as well.



            For the record, to check if lbu is properly configured, (still assuming that you are booting via USB), run:



             cat /etc/lbu/lbu.conf | grep LBU_MEDIA


            it should return:



             LBU_MEDIA=usb





            share|improve this answer




























              0














              Assuming that you are booting via USB, and you have lbu properly configured, after you install openssh you should run:



               lbu commit


              This will save the /etc dir in the apkovl overlay file in /media/usb/yourhostname.apkovl.tar.gz



              Packages installed on boot are located in /etc/apk/world, and when you save with "lbu commit" this file will be saved as well.



              For the record, to check if lbu is properly configured, (still assuming that you are booting via USB), run:



               cat /etc/lbu/lbu.conf | grep LBU_MEDIA


              it should return:



               LBU_MEDIA=usb





              share|improve this answer


























                0












                0








                0







                Assuming that you are booting via USB, and you have lbu properly configured, after you install openssh you should run:



                 lbu commit


                This will save the /etc dir in the apkovl overlay file in /media/usb/yourhostname.apkovl.tar.gz



                Packages installed on boot are located in /etc/apk/world, and when you save with "lbu commit" this file will be saved as well.



                For the record, to check if lbu is properly configured, (still assuming that you are booting via USB), run:



                 cat /etc/lbu/lbu.conf | grep LBU_MEDIA


                it should return:



                 LBU_MEDIA=usb





                share|improve this answer













                Assuming that you are booting via USB, and you have lbu properly configured, after you install openssh you should run:



                 lbu commit


                This will save the /etc dir in the apkovl overlay file in /media/usb/yourhostname.apkovl.tar.gz



                Packages installed on boot are located in /etc/apk/world, and when you save with "lbu commit" this file will be saved as well.



                For the record, to check if lbu is properly configured, (still assuming that you are booting via USB), run:



                 cat /etc/lbu/lbu.conf | grep LBU_MEDIA


                it should return:



                 LBU_MEDIA=usb






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 25 '17 at 9:21









                Francesco ColistaFrancesco Colista

                307210




                307210






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f319035%2falpine-linux-how-do-i-define-packages-to-load-on-boot%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

                    宮崎県

                    濃尾地震

                    シテ島