News: This forum is now permanently frozen.
Pages: [1]
Topic: Creating a m0n0wall boot CD with config.xml on the CD ?  (Read 2831 times)
« on: May 28, 2008, 19:08:03 »
lancesaville *
Posts: 3

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

But 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.
« Reply #1 on: May 28, 2008, 19:10:18 »
adrianp918
Guest

I believe if your running the live CD your also going to be using the Config .xml from the floppy disk, so you would have to have the cd in the drive, and then have the desired config file on the floppy disk and it will read the config file
« Reply #2 on: May 28, 2008, 19:12:20 »
lancesaville *
Posts: 3

Yeah that's the default configuration, which i've been running. But what i want to do is copy the config.xml from the floppy and inject it into the ISO image and burn it, this way I can just pop in the CD and the monowall boots up with all my settings with no need for a floppy drive or USB thumb drive.
« Reply #3 on: May 28, 2008, 19:14:35 »
adrianp918
Guest

Ahh i see what you are trying to do, sorry i have not done that yet, i wish i could lend a hand to help you out, maybe someone will see then and help you out, sorry once again
« Reply #4 on: June 19, 2008, 14:56:57 »
lancesaville *
Posts: 3

Does anyone have any info on how to do this? the current FAQ appears to be outdated. Any advice would be greatly appreciated. Thanks
« Reply #5 on: October 26, 2008, 02:53:50 »
notech *
Posts: 2

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

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

 
« Last Edit: November 01, 2008, 03:10:58 by notech »
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines