Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How can i make a image with custom configfiles???

    Development
    5
    7
    5.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Thowie
      last edited by

      Hello,
      first of all, sorry for my bad English, i can better read than write  ;)

      My question is, how can i do costum configfiles e.g. /home/pfsense/pfsense/etc/rc and other to a isoimage???

      I edit the files in the Develversion in /home/pfsense/pfsense/* and then i use build_iso.sh in the /home/tool/build_tools/.
      But after that, the edited files are overriden by the original.

      can someone help me…

      Thanks for this product it's very cool

      Bye
      Thomas

      1 Reply Last reply Reply Quote 0
      • M
        MrMoo
        last edited by

        Just mount the release ISO and edit the files in place?

        
        mount -t cd9660 /dev/`mdconfig -af pfSense.iso` /mnt
        
        
        1 Reply Last reply Reply Quote 0
        • T
          Thowie
          last edited by

          Hi,
          sry for this late answer…

          To your post, the mounting of the Image dosn't work... :(

          I searched in the buildTools and find a variable to make a custom overlay file, i think that is what i searched for... but don't know how i use this... ;(

          so i hope anybody can help me...

          Thanks...

          and SORRY for my bad English ;)

          1 Reply Last reply Reply Quote 0
          • A
            aldo
            last edited by

            make up a directory tree of the files you want to edit

            EXAMPLE

            /etc/version
            /usr/local/www/themes/new_theme

            tar -cvzf yourthemename.tgz ./*

            add the overlay *.tgz to your buiilder script in the overlay variable and run the builder_script that you want.

            simple example ask for some more and i am sure i can help here.

            maybe when we are finished you could get the guys to add it to the wiki

            1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan
              last edited by

              @MrMoo:

              Just mount the release ISO and edit the files in place?

              
              mount -t cd9660 /dev/`mdconfig -af pfSense.iso` /mnt
              
              

              Nearly  ;)

              # # mount -t cd9660 /dev/md`mdconfig -a -t vnode -f /usr/obj.pfSense/pfSense.iso -n` /mnt
              # ls /mnt
              .cshrc                  conf.default            root
              .profile                dev                     sbin
              .project                dist                    scripts
              COPYRIGHT               etc                     tmp
              RELENG_1                lib                     trigger_initial_wizard
              bin                     libexec                 usr
              boot                    mnt                     uzip
              boot.catalog            pkg_info.txt            var
              cf                      proc
              conf                    rescue
              # df
              Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
              /dev/ad0s1a   3807702 1588878 1914208    45%    /
              devfs               1       1       0   100%    /dev
              devfs               1       1       0   100%    /var/dhcpd/dev
              /dev/md0        33870   33870       0   100%    /mnt
              

              To unmount, you to know the device 'number' (name).
              While a unmount /dev/mdconfig -l will do for the umount part, you have to mdconfig -l to know the actual name of the device, md0 in my case.
              Then a mdconfig -d -u 0 will roll everything back to normal.

              Nice to mount a ISO like this…. but the real pb is : can we write to the ISO ? - I'm still on that one (the sited option -o no readonly doesn't work  :(). I'll be back.

              [edit] Back !

              Bad news: doing it all by hand :

              # mdconfig -a -t vnode -f /usr/obj.pfSense/pfSense.iso -o noreadonly
              md0
              # mount_cd9660 -o rw -s 0 /dev/md0 /mnt
              # echo hello > /mnt/etc/test
              /mnt/etc/test: Read-only file system.
              

              The -o rw option (not documented for mount_cd9600, but is exists) isn't taken.
              The final error message is my last word ….. :-[

              Long live [b]custom_overlay

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • J
                jeroen234
                last edited by

                and if you copy it to a normal dir afther mounting ?
                umount it
                add/chance files
                then make a new image

                1 Reply Last reply Reply Quote 0
                • GertjanG
                  Gertjan
                  last edited by

                  @jeroen234:

                  and if you copy it to a normal dir afther mounting ?

                  Well, if we're talking the pfSense ISO, no need to mount it. It's there already after a build_iso.sh.
                  Just modify the 'source tree', and execute the last couple of commands in this script file by hand.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.