Koozali.org: home of the SME Server

modify hdstg1.img etc

Offline commanda

  • **
  • 30
  • +0/-0
    • http://swafl.org (not smeserver)
modify hdstg1.img etc
« on: July 25, 2005, 11:41:33 AM »
Still can't figure this one out. I can mount -o loopback hdstg1.img /tmp
and can see the files, but can't write to it, so I'm obviously missing something.
I've searched contribs.org, smeserver.sourceforge.net (slow as a wet week), and googled extensively to no avail.
There must be a document somewhere that explains how to do this.

how to edit files in /etc, and add files in /usr.
After loopback mounting the .iso, do I copy out various .img files (which ones?) and loopback mount them seperately?


I could just add my modified & extra files to the cd, and add a call to a script at the end of installation to brute force copy them over, but that's not elegant.

Amanda
...

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: modify hdstg1.img etc
« Reply #1 on: July 25, 2005, 11:14:57 PM »
Quote from: "commanda"
Still can't figure this one out. I can mount -o loopback hdstg1.img /tmp
and can see the files, but can't write to it, so I'm obviously missing something.


It would help if you told us what you were trying to achieve.
............

Offline commanda

  • **
  • 30
  • +0/-0
    • http://swafl.org (not smeserver)
modify hdstg1.img etc
« Reply #2 on: July 26, 2005, 01:13:44 AM »
I have a php document management system. It runs on a master server in Sydney, with slaves in Perth & Mackay. The slaves run a vpn into Sydney through a Windows 2000 gateway, to the master on the internal network. File sync daily using rsync. Mysql replication. Database writes at the remote offices are actually written to the database in Sydney; it then propagates back to the slaves via replication.

The Queensland office has proven problematic, due to lousy mains supply destroying the power supplies. Despite my frequent recommendations that a UPS is in order. We recently had to build a new slave for them in a hurry after theirs failed. It's now in Queensland, but with no vpn. I've been encouraging the boss's son to get involved, because currently I'm the only one here with any Linux know-how. I wrote a large How-To document, which I thought was quite explicit.

What I want to do now is create a custom install cd with all our customizations. Adding the pptp-linux rpm was easy, following the excellent howto here on contribs.org.

This is taken directly from my howto;

16: List of new/modified files

/etc/cron.d/chmodibays         *new

/etc/cron.daily/sync-up         *new
/etc/cron.daily/sync-up-jungle           *new
/etc/cron.daily/flush-backups      *new

/etc/cron.hourly/getclonedata      *new

/etc/rc.d/rc.local         *modified

/etc/rc.d/init.d/firewall-pptp   *new
/etc/rc.d/init.d/heartbeat      *new

/etc/fstab               *modified if adding extra hard drives
/etc/logrotate.conf         *modified
/etc/rsync.list            *new
/etc/motd            *modified
/usr/sbin/chmodibays         *new


/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/05UserGroup      *new
/etc/e-smith/templates-custom/etc/my.cnf/005mysqld
/etc/e-smith/templates-custom/etc/my.cnf/009socket
/etc/e-smith/templates-custom/etc/php.ini/60FileUploads
/etc/e-smith/templates-custom/etc/php.ini/80ModuleSettings

mkdir /var/log/jungle

SO, what I want to do is incorporate all these new & modified files into my custom cd.

Amanda
...

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
modify hdstg1.img etc
« Reply #3 on: July 26, 2005, 02:45:34 AM »
Quote from: "commanda"

SO, what I want to do is incorporate all these new & modified files into my custom cd.


Thanks for the details. You don't need to modify hdstg1.img or any of the other "installer" files to do what you want to do.

You have a few options:

- Modify the kickstart install.cfg or upgrade.cfg to make those modifications in the %post section. This is not a very flexible way to do things, and is likely to cause conflicts with other things people might do in those files.
- Use the standard ISO and just install extra RPM(s) to make the custom changes you need.
- Make a custom ISO with the extra RPM(s).

Once you create the RPM(s), you just:

- Put them in e-smith/RPMS (CentOS/RPMS in 7.0alpha)
- Modify the comps (comps.xml in 7.0alpha)
- Follow the custom CD building HOWTOs to build a new ISO

BTW: Only put templates in templates-custom if they conflict with existing templates. If they don't conflict, put them in the standard 'templates' hierarchy. And please log a bug suggesting the change - someone else may want it.
............

Offline commanda

  • **
  • 30
  • +0/-0
    • http://swafl.org (not smeserver)
modify hdstg1.img etc
« Reply #4 on: July 26, 2005, 09:05:28 AM »
Well, after thinking about it for a while;

I currently have 3 slightly different setups. A master and 2 slaves. I've decided to take the brute force approach. :hammer:
I've added 3 directories to my cd; master, slave 1, slave 2. In each of these I've added the mod'd files with their directory structure. I've added a script for each, which basically has a cp command in it, followed with expand-template.

This way, I can have the correct setup for each machine, with only 1 cd. It also makes it easy to upgrade to a new release. Also easy to add more slave setups in future if required.

Amanda
...