Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  Development/Documentation» Development» How can i make a image with custom configfiles???
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: How can i make a image with custom configfiles???  (Read 3271 times)
0 Members and 1 Guest are viewing this topic.
Thowie
Newbie
*
Offline Offline

Posts: 7


View Profile WWW
« on: August 24, 2006, 01:56:42 pm »

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

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

Logged
MrMoo
Jr. Member
**
Offline Offline

Posts: 86



View Profile WWW
« Reply #1 on: August 24, 2006, 09:50:29 pm »

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

Code:
mount -t cd9660 /dev/`mdconfig -af pfSense.iso` /mnt
Logged
Thowie
Newbie
*
Offline Offline

Posts: 7


View Profile WWW
« Reply #2 on: September 01, 2006, 10:09:06 am »

Hi,
sry for this late answer...

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

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 Wink
Logged
aldo
Full Member
***
Offline Offline

Posts: 202


View Profile
« Reply #3 on: September 09, 2006, 02:25:54 pm »

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
Logged
Gertjan
Full Member
***
Offline Offline

Posts: 273



View Profile
« Reply #4 on: September 20, 2006, 01:20:30 pm »

Just mount the release ISO and edit the files in place?
Code:
mount -t cd9660 /dev/`mdconfig -af pfSense.iso` /mnt

Nearly  Wink

Code:
# # 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  Sad). I'll be back.

[edit] Back !

Bad news: doing it all by hand :
Code:
# 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 ..... Embarrassed

Long live custom_overlay
« Last Edit: September 20, 2006, 02:43:15 pm by Gertjan » Logged
jeroen234
Sr. Member
****
Offline Offline

Posts: 506


View Profile
« Reply #5 on: September 20, 2006, 05:43:33 pm »

and if you copy it to a normal dir afther mounting ?
umount it
add/chance files
then make a new image
Logged
Gertjan
Full Member
***
Offline Offline

Posts: 273



View Profile
« Reply #6 on: September 21, 2006, 02:02:51 am »

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.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.028 seconds with 20 queries.