I've been trying to integrate my config.xml file to my CD so my firewall runs read-only and only needs the CD to run.
I found this link in my search ---
http://doc.m0n0.ch/handbook/faq-configonCD.htmlBut the information in the link looks to be out of date, the references to the file structure in the ISO do not match up to the file structure of the ISO i'm looking at, so basically I need to find out how and where to place the config.xml into the current release ISO. Any and all help will be greatly appreciated. Thanks guys.
I found out how to do it. You need to install a copy of bsd. I use pcbsd to work with the iso image. I have not found a way to do this in linux anyway here is the steps I go through. I found this on the internet several years ago and don't know who to give credit to. I wish I did because I would like to thank them. You will need to update the version number and change the directory names for your setup. Here is the recipe.
Can I put my configuration file into the m0n0wall CD and not have to use the floppy?
Yes, but keep in mind this means you will need to burn a new CD any time you want to change anything on the configuration.
To do this, replace the file /conf.default/config.xml on the iso with your config.xml file.
This has to be done in BSD!!!!
DO AS ROOT (Be sure you are in the root directory and not your home)
mount cd image
localhost# mdconfig -a -t vnode -f /root/cdrom-1.22.iso -u 0 (or 4)
localhost# mount -t cd9660 /dev/md0 /mnt/iso (use 0 or 4 to match the above command)
COPY CONTENTS OF ISO TO /root/m0n0 THEN COPY /mfsroot.gz to /root also
keeping the one in m0n0 as a backup for now.
localhost# umount /mnt/iso
localhost# cd /root (If not already there)
localhost# gunzip mfsroot.gz (uncompress it can us ark also)
NOW MOUNT mfsroot
localhost# mdconfig -a -t vnode -f /root/mfsroot -u 4
localhost# mount /dev/md4 /mnt/iso
OPEN /MNT/ISO AND REPLACE THE /conf.default/config.xml WITH THE
CUSTOMIZED ONE AND THEN CLOSE OUT BACK TO /MNT
Once you are done working with the image, unmount the md device and detach it.
localhost# umount /mnt/iso
localhost# mdconfig -d -u 4
If there are other md devices configured, use the proper device number. In case you forgot the number, just ask mdconfig, like:
# mdconfig -l
md7
# mdconfig -d -u 7
Recompress mfsroot
localhost# gzip mfsroot
Now put the customized mfsroot.gz back in with the files in m0n0
COPY THE NEW mfsroot.qz from /root to /root/m0n0 overwriting the one there.
NOW MAKE NEW ISO CHECK NAME OF ISO SO YOU DON'T OVERWRITE THE LAST ONE
IF YOU DON'T INTEND TO.
localhost# mkisofs -l -r -L -o yourisoname.iso -b boot/cdboot -no-emul-boot m0n0
BURN NEW ISO
Occasionally I get this message when trying to mount and umount the iso
mdconfig: ioctl(/dev/mdctl): Device busy
I have googled and they say there is no know fix for this problem. I just have to restart pcbsd. I run it in vmplayer so it doesn't take long. It will do it with DesktopBSD also. I don't use BSD so I don't know if this is a common problem with it. This is an old post so I hope you find it.