Remastering (snapshot) a new ISO with kernel modules?

Forum Forums New users New Users and General Questions Remastering (snapshot) a new ISO with kernel modules?

  • This topic has 7 replies, 3 voices, and was last updated Sep 16-8:56 am by abc-nix.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #116644
    Member
    paf

      I am creating an antiX live cd with software development tools.

      All the software runs ok, and the snapshot app does all I need.

      But, I need some modules on the live CD.

      So in the base antiX installation, in order to load the modules I have added them to:
      /etc/initramfs-tools/modules

      then run
      sudo update-initramfs -u

      After a reboot the modules are loaded and everything works ok.

      But after creating the ISO, the modules “disappear”, as they are not copied into the ISO.

      Could you please point me in the right direction?

      And, many MANY THANKS to all the antiX developers!

      #116646
      Moderator
      Brian Masinick

        I don’t know how everyone builds their system or how they use it; there are many ways to create an environment and reuse it.

        1) Persistence – there are multiple persistent states possible, Frugal persist is one that is particularly efficient. To build and save any persistent state, you have to first create persistence from a live system, using Set Persistence, then save the persistent state you intend to use.

        2) Remastering – again there are multiple ways to do this. From a live system, you can remaster the configuration that you have set up. From an installed system you can create an ISO Snapshot of your installed system at any time, which you can then run live on your systems OR install it on multiple systems.

        • This reply was modified 9 months, 2 weeks ago by Brian Masinick. Reason: Persistent

        --
        Brian Masinick

        #116660
        Member
        abc-nix

          Hi.
          The live kernel updater creates its own initrd so that it can include all the live init scripts that make the antiX Magic possible. It doesn’t read the initramfs-tools configuration, so you need to adjust it yourself.

          You will need to use the live-kernel-updater to update the initramdisk for the live USB and include the modules you need.

          Boot into the live system and use something similar to:
          sudo live-kernel-updater --modules=<list> copy
          Replace <list> with the listed modules.

          You will have to study the live-kernel-updater yourself to be sure what is the proper command, as I haven’t tested my suggestion.
          live-kernel-updater --help

          #116669
          Member
          paf

            Many thanks for the help!

            I was creating the ISO from a HD installation.
            It seems that the way to go is to create a live USB, and on the live USB update the kernel and modules.

            Will try that and will report the results.

            #116740
            Member
            paf

              So, the recipe for adding an already compiled kernel module to a live CD ISO is very simple.

              It is only a matter of adding the name(s) of the module(s) to the file:
              /etc/modules

              Then, those modules will be loaded when the live CD boots.

              Many thanks for antiX, once again!

              #116842
              Member
              abc-nix

                Sorry, I understood wrong. I thought you wanted them included in the initrd.
                You can also load kernel modules using the load=<module-name> boot parameter, as described in the FAQ.

                Thanks for providing a fixed alternative.

                #116936
                Member
                paf

                  Complete history:

                  I need(ed) a 64 bit Linux live CD with developer tools to teach C and Assembly programming, in a Virtual Machine.

                  Yes, installing Linux one learns more, but with a live CD the students can use Virtual Box (on Windows or Intel Mac) or UTM (on Arm Mac).
                  The students save their work on a folder shared with the host machine.

                  If something goes wrong, one just needs to reboot the virtual machine, and everything is working once again.

                  Summary of where the changes were made:

                  modules to be loaded:
                  /etc/modules
                  tasks to run at startup:
                  /etc/rc.local
                  tasks to run after X has started:
                  ~/.desktop-session/startup

                  #116960
                  Member
                  abc-nix

                    Thanks for explaining your process and the solutions you found for adding instructions to each step of the booting process.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.