DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th May 2008
gamaliel gamaliel is offline
New User
 
Join Date: May 2008
Posts: 5
Default OBSD 4.3 Customize site43 & install.site problems

All:

I am trying to get a custom installation of OpenBSD 4.3 going, and I am just having issues. What I did was copy the main install cd's files and then added to that my site43.tgz file, with an included install.site script. After that, I created a bootable iso from the files, and burn it, install, all goes normally.

Except!

The install is totally normal, it doesn't run my script. All the packages that were in the site43.tgz are just sitting in the root directory of my install, uninstalled! The script was obviously not run. What am I missing here?
Reply With Quote
  #2   (View Single Post)  
Old 29th May 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

I do custom installations with a local ftp server, much more easier then from a CD.
In your install.site script you will have to use pkg_add to add the packages.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 29th May 2008
gamaliel gamaliel is offline
New User
 
Join Date: May 2008
Posts: 5
Default Yes, I get that

Thanks for the help, but I wasn't clear:

Yeah, I understand the fact that I should put those lines in the install.site. Actually, that is all that is in there right now, just the pkg_add lines, as I am simply trying to get it going as a proof of concept (it was a little more extensive, but I edited it down to commands that I knew would work). The script works, no doubt about it, as I can run it as soon as the install is done and it works perfectly. It just doesn't run by default. It is just sitting there in the / directory when I reboot the machine after the install. As soon as I login for the first time I can run the script and it works.

As to the ftp, I know that that would be the easiest way to provide it, but the problem is my boss wants CDs to hand out to our distributed computing areas. Eventually, I may be able to convince him to change to a ftp service (way easier on our end) but right now, he wants an iso.

So I am trying to it that way, and am thinking that maybe it has to do with my file structure, or maybe permissions? I put the site43.tgz in the 43/i386 directory, and tarzipped it with tar -czvf options, if that helps. Thanks again!
Reply With Quote
  #4   (View Single Post)  
Old 30th May 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

The install.site script will be run at the end of the install after you configured the time zone. Not when you reboot the computer

Ftp is a more environment friendly way to experiment with a customized install then burning an ISO each time. After you figured everything out and everything is working OK from a local ftp server, only then you burn your CD.

I use custom installs by using bsd.rd and a serial console to log everything. I also use tee to provide a log of all output produced by the install.site script.

BTW your tar command is missing the p option to preserve the permissions. The script needs root ownership and execute permissions.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 2nd June 2008
gamaliel gamaliel is offline
New User
 
Join Date: May 2008
Posts: 5
Default Interesting

Thanks for those pointers. I think that I will try to get my installs going via ftp until I am reasonably sure that they will work with a cd iso.

Even with the -p option in place, I don't see my install.site script working. These are the direct contents, maybe I am missing something obvious:

pkg_add libiconv
pkg_add gettext
pkg_add vim
pkg_add nano
pkg_add pftop
pkg_add bash

I stripped it down, just because it wasn't working. The various packages are in the same directory.

I know that it should run near the last stages of the install, but it simply does not. What does happen, is the contents of the site43.tgz are simply dumped into my root directory: nice, but not at all what I wanted. Ie, if, from the initial reboot after the install, I can use these commands:

cd /
sh install.site

and everything runs, etc. All the changes that I want (at this point as you can see, I am just settling for files) are then performed.

There are no folders in the zipped file, there were, but I took them out on the off chance that that was causing it not to work. I would really love to get this custom install going, I love the OpenBSD project, I love its ability to be a transparent firewall, but maybe I am just being obtuse about something, missing something basic. Thanks for all the help so far! Has somebody actually done this that could give a quick and dirty way that they got it working? Thanks again!
Reply With Quote
  #6   (View Single Post)  
Old 2nd June 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Quote:
Originally Posted by gamaliel View Post
.....from the initial reboot after the install, I can use these commands:

cd /
sh install.site

and everything runs, etc.
Can you do a ?
Code:
cd / 
./install.site
In other words : does install.site have the "x' or execute permission?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #7   (View Single Post)  
Old 2nd June 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

I use a Makefile to customize my installs for each different box. My install.site script is just a wrapper for the install.site.${BOX} script. A snippet from that Makefile
Code:
install.site: install.site.${BOX}
        @echo --- Creating ${.TARGET}
        @echo "#!/bin/sh" >${.TARGET}
        @echo ". ./install.site.${BOX} 2>&1 | tee ./install.report" >>${.TARGET}
        @chmod u+x ${.TARGET}

install.site.${BOX}: ${SCRIPT}
        @echo --- Creating ${.TARGET}
        @cat ${.ALLSRC} >${.TARGET}
When the value of $BOX is "protogoras" the install.site target will create this install.site script
Code:
#!/bin/sh
. ./install.site.protogoras 2>&1 | tee ./install.report
That way I have a log of everything install.site.protogoras has done. in the file ./install.report.
Note the chmod u+x command to make the file executable.

The following is what I use to add packages
Code:
# --- configure shared library cache with code stolen from "/etc/rc"

if [ -f /sbin/ldconfig ]; then
        echo 'creating runtime link editor directory cache.'
        if [ -d /usr/local/lib ]; then
                shlib_dirs="/usr/local/lib $shlib_dirs"
        fi
        if [ -d /usr/X11R6/lib ]; then
                shlib_dirs="/usr/X11R6/lib $shlib_dirs"
        fi
        ldconfig $shlib_dirs
fi

# ---
export PKG_PATH="ftp://mirror.hostfuss.com/pub/OpenBSD/snapshots/packages/i386/"

export PKG_CACHE=/home/packages
mkdir -p ${PKG_CACHE}

PACKAGES="fetchmail-6.3.8p0.tgz ghostscript-8.54p1-a4-no_x11.tgz a2ps-4.13bp4-a4.tgz apsfilter-7.2.8p0.tgz courier-imap-4.1.1p2.tgz "

echo Installing the following packages from $PKG_PATH
echo $PACKAGES | tr ' ' '\n'
echo -------------------------------------------------
pkg_add -v $PACKAGES
Last time I I used all this stuff was in October 2007, so YMMV
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #8   (View Single Post)  
Old 3rd June 2008
gamaliel gamaliel is offline
New User
 
Join Date: May 2008
Posts: 5
Default Great! Thanks A Ton

Thanks for all your help J65nko!

I finally got it working with your advice, I knew it was going to be something simple that I was just missing (in this case, for your info, it was chmod, totally forgot about doing that before I would actually go ahead and zip it up). But not only did I finally get the problem that I needed solved, I got a bunch of other good advice, that I am putting into practice.

Thanks again
Reply With Quote
Reply

Tags
custom, install.site, openbsd, sitexx.tgz

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote OpenBSD ssh-based install problems artix OpenBSD Installation and Upgrading 7 13th March 2009 08:52 PM
customize install cd milo974 OpenBSD General 7 7th November 2008 03:43 AM
Routing between site-to-site tunnels docrice OpenBSD General 5 26th September 2008 09:21 AM
unable to install Postfix from ports on OBSD 4.3 Pollywog OpenBSD Packages and Ports 25 22nd July 2008 03:32 AM
Bare Minimum Site-to-Site VPN on OpenBSD ai-danno Guides 0 20th May 2008 12:45 AM


All times are GMT. The time now is 02:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick