Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2001 22:08:05 -0400
From:      Brian Dean <bsd@bsdhome.com>
To:        Jordan Hubbard <jkh@FreeBSD.ORG>
Cc:        chad@DCFinc.com, freebsd-stable@FreeBSD.ORG, clarso@eldocomp.com
Subject:   Re: Making a bootable disk2 from a make release?
Message-ID:  <20010915220805.B42156@neutrino.bsdhome.com>
In-Reply-To: <20010915163220X.jkh@freebsd.org>; from jkh@FreeBSD.ORG on Sat, Sep 15, 2001 at 04:32:20PM -0700
References:  <20010915214842.F1466-100000@sanctuary.magill.unisa.edu.au> <20010915115221N.jkh@freebsd.org> <20010915134955.A18734@freeway.dcfinc.com> <20010915163220X.jkh@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 15, 2001 at 04:32:20PM -0700, Jordan Hubbard wrote:
> 
> There's nothing like that, either in docs or tools.  Contributions
> always accepted. :)
> 
> - Jordan

Feel free to take a look at:

	http://people.freebsd.org/~bsd/cdroot/

These are the scripts that I use to create a full FreeBSD installation
that runs from CD-ROM.  While these scripts have a few issues (they
require /bin/ksh for one thing) they work quite well.  If there is
general interest in something like this, I will remove the requirement
on /bin/ksh, and tidy things up and commit these somewhere (somewhere
under /usr/src/release, or as a port if that is preferred).

I even use this method these days in place of sysinstall.  In a
nutshell, here's what you do:

	1) download the tar file and extract it somewhere
	2) edit the Makefile, adust BINDIR, LIBDIR accordingly
	3) make install
	4) as root:

	   Make sure you've got a recent buildworld in /usr/obj.
	   Install a kernel config file named ROROOT in
	   /usr/src/sys/i386/conf.  There's nothing special about the
	   config file, mine is at the above url.

	  a) mkdir -p /scratch/cdroot/roroot
	  b) mkroroot roroot

	     That last step essentially exports DESTDIR to
	     /scratch/cdroot/roroot, does an installworld there, does
	     a buildkernel and installkernel there, and then installs
	     some customized startup code in the etc directory.  This
	     custom startup code essentially replaces the system
	     /etc/rc script with another one which tries to mount
	     /dev/fd0, to install override files for the running /etc.
	     It proceeds to set up MFS filesystems for /etc, /var,
	     /tmp, /dev, etc, very similar to the diskless startup
	     code (that's what I based this on).  Then it runs the
	     original system supplied /etc/rc file.

	     Of course, to just create a bootable CD with a complete
	     FreeBSD install on it, you don't need to provide any
	     overrides, etc.  However, if you want to have a running
	     system on CD that functions as your firewall (no need for
	     tripwire - nearly the whole system is read-only), having
	     /etc overrides come off floppy is real handy for keeping
	     your firewall rules, hostname, and other system specific
	     information.  It let's you use the same CD image for
	     multiple machines and allows system specific data to be
	     kept on a floppy.

	  c) If you want to use this as a sysinstall replacement,
	     notice the directory named 'dist' at
	     /scratch/cdroot/roroot/dist.

            i) Build a release as normal

            ii) Copy all of disc1 from the relase to
                /scratch/cdroot/roroot/dist:

	        cd /scratch/cdroot/roroot/dist
                cp -rp /scratch/release/R/cdrom/disc1/* .

	  d) Generate your ISO image:

	     mkisofs -d -T -R -N -D -b boot/boot.fd -o roroot.iso roroot

	  e) Burn the cd, and boot from it

	  f) You're now running a complete FreeBSD installation
	     entirely from CD.  If you copied the release bits to
	     /dist of the CD, you can install them by typing:

	       /etc/inst

	     This script does not have _near_ the installation options
	     of sysinstall, but it does what I want a lot quicker than
	     I can do with sysinstall.  If you install this way, that
	     is pretty much equivalent to doing a full install from
	     sysinstall.  The resulting system will have inetd, sshd,
	     nfs, and moused enabled.

It's not highly polished, but again, if there is interest, I'll be
happy to get it into commit-shape.

-Brian

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010915220805.B42156>