Hi All,
The OpenBSD version that I am using is 4.8 and the default source file is at
/usr/src
I was trying to make a new release using site48.tgz. I have plan to put
/etc/pf.conf, /etc/rc.firsttime and /etc/backup.sh inside site48.tgz
Below is my steps:
1.I need to prepare of /etc/rc.firsttime and /etc/pf.conf and /etc/backup.sh.
2.After that I compress and zip using tar and gzip:
tar -czf site48.tgz pf.conf rc.firsttime backup.sh
3.Once site48.tgz is done, I will copy it inside /usr/src and follow the
instruction to make release ( http://www.openbsd.org/faq/faq5.html#Release ).
Are my steps correct?
Regards,
Stefan
Close, but install sets are created in /usr/release and extracted
relative to root so you need something more like this:
tar -czf /usr/release/site48.tgz etc/pf.conf etc/rc.firsttime etc/backup.sh
Although I would also recommend creating site49.tgz and installing 4.9.
l8rZ,
--
andrew - http://afresh1.com
There are two ways to write error-free programs;
only the third one works.
Hi Andrew,
Thanks. By the way, I don't see the release directory inside the source
file(/usr/src) directory.
Does it mean that I need to create directory mkdir /usr/release first if my
source files is at /usr/src?
Regards.
Stefan
you don't need to build your own release for this, just put the siteXX.tgz
file with the base*.tgz man*.tgz and other files from a normal release on
an ftp/http server / burned CD / etc.
The release man page does describe creating RELEASEDIR
# mkdir -p ${DESTDIR} ${RELEASEDIR}
I generally set RELEASEDIR=/usr/release, but it can really be a path
anywhere you want your sets. The important part is that site48.tgz is
in the same directory as the rest of the install sets.
l8rZ,
--
andrew - http://afresh1.com
Computer Science: solving today's problems tomorrow.
Ok, I got it. The siteXX.tgz must be placed inside release directory.
Thanks.
Regards,
Stefan
Hi Stuart,
It sounds that is the faster way instead of creating from the scratch.
Thanks!
Regards,
Stefan
* Andrew Fresh <andrew*******> [2011-05-10 02:20]:
no. they are created in $RELEASEDIR. this is the first time i see
/usr/release. you might be the only one using that.
I use /snapshots/$arch-$timestamp. theo uses a dir under /home. art is
using sth else. thib is using something different. as in, there is no
one well known (let alone standard) $RELEASEDIR.
in the end siteXY.tgz just needs to be in the same dir as baseXZ.tgz
and friends (ok, not even really necessarily, but easier that way).
--
Henning Brauer, hb*******
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting
OMG, that does it.
We really need the Filesystem Hierarchy Standard to help us here! ;-)
* Alexander Hall <halex*******> [2011-05-10 11:33]:
oh yeah, let us find a solution for that.
and afterwards we can make up a problem that this solution solves.
--
Henning Brauer, hb*******
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting
I was making the site48.tgz for testing and there is only /etc/rc.firsttime.
There is a command line to create some new users for this purpose.
The next step was I put the site48.tgz on /home/OpenBSD/4.8/amd64 (the same
folder where base48.tgz, etc48.tgz etc there) and make iso file using mkhybrid.
During the installation using the new iso file, the site48.tgz is displayed on
the menu and I was able to include in as a set (by clicking +site48.tgz) and the
installation was successfull.
However, after I log in to the new system, the new users that I created (using
some command line on /etc/rc.firsttime file inside site48.tgz) do not exist at
all. I have tested /etc/rc.firsttime on another machine by copying rc.firsttime
on /etc folder and reboot manually and it works normally.
Is there a way to check what went wrong here?
Below is the sample of the content of rc.firsttime:
#!/bin/ksh
#creating the detail for fwadmin account
groupadd -g 1011 fwadmin
useradd -p '$2a$06$rJ5kpL.4nZ.qQPHnbO' -u 1011 -s /bin/ksh -m -g fwadmin fwadmin
Regards,
Stefanus
Hi Stefanus,
That's the one file you don't want to put in there.
Quoting from
http://www.openbsd.org/faq/faq4.html#site
"This will happen if install.site is used to append any such commands
to an rc.firsttime(8) file (appending to this file is neccessary since
the installer itself may write to this file)."
I guess your rc.firsttime was overwritten by the installer.
Yours,
Ingo
Hi Ingo,
So what you meant is:
I need to create the install.site script with the content of some commands that
I made for rc.firsttime.
After that I need to put install.site script inside site48.tgz?
I am quite confused with the explanation from FAQ.
In this case, I can create site48.tgz with the content of (install.site, sudoers
etc etc)
For the install.site script , I can write some commands like:
#!/bin/ksh
#creating the detail for fwadmin account
groupadd -g 1011 fwadmin
useradd -p '$2a$06$rJ5kpL.4nZ.qQPHnbO' -u 1011 -s /bin/ksh -m -g fwadmin fwadmin
For customized /etc/sudoers, I will add in inside site48.tgz.
Regards,
Stefanus
Hi Stefanus,
No, that is not what i meant and not what the FAQ says.
However, in your particular case, it might work as well,
given that you only want to run groupadd and useradd.
That will probably work even before the first reboot.
What the FAQ says it that the install.site script can write commands
to /etc/rc.firsttime, keeping any existing content, appending them
at the end, as in
echo 'groupadd -g 1011 fwadmin' >> /etc/rc.firsttime
Yes.
Suggestions for improvement are always welcome; however, i don't see
anything right now that might cause confusion.
Yes.
Yours,
Ingo
Hi Ingo,
Thanks a lot. I will try again.
Regards,
Stefanus
Hi Ingo,
I tried using install.site, sudoers and backup script inside site48.tgz and it
still didn't work as expected.
I was trying again to create site48.tgz with etc/rc.firsttime, /etc/sudoers and
/etc/backup.sh inside.
groupadd -g 1011 fwadmin and other commands
once it is done,I made it as bootable iso file and try to install to the pc and
it works as expected.
Regards,
Stefan