Scripting sysinstall(8) to create & use multiple slices on a disk?

Josh Paetzel jpaetzel at freebsd.org
Sat Mar 6 13:45:59 UTC 2010


On Saturday 06 March 2010 02:41:30 Garrett Cooper wrote:

> (Attempts to avoid shoe flying in his direction from randi@ :/),
> 
> FWIW, sysinstall(8) is a good starter tool and it has a lot of the
> information that you need in order to complete an install (especially
> if you're doing it from scratch), but the amount of effort for using
> sysinstall(8)'s install.cfg, etc has the greater potential to change
> in the future when compared with a shell scripted method which is less
> likely to change; granted gpart vs fdisk is in transition, but the
> number of steps and the simplicity required to get everything up and
> going is trivial, and I did so in < 100 lines of bourne shell.
> 
> I'd be happy to share my custom script if desired as well to provide
> you a general idea of what could be done to solve your problem.
> 
> Cheers,
> -Garrett

One of my main issues with using sysinstall comes from an intersection of it's 
lack of documentation, and the way it can arbitrarily change over time.  For 
instance, this week I was working on an install for a number of machines that 
had to be imaged with an early 7.x version of FreeBSD, and were specified to 
be installed with "distSet${OBFUSICATED}"  In order to determine what 
distSet${OBFUSICATED} installs on 7.${EARLY} involves either installing a 
system via sysinstall and noting what it installs, or reading the source code.  
Where this becomes an issue is sysinstall changes over time, 
distSet${OBFUSICATED} is not necessarily the same between 7.${EARLY} and say 
8.0.  Since there is no documentation you either end up tracking the changes 
to sysinstall, or sorting it out at upgrade time.

I'd also like to mention John saying you can build a custom mfsroot to use 
additional tools during install...I go a different tack on this.  I'm a huge 
fan of python, and like to use it for installers.  Rather than build a custom 
mfsroot with python what I prefer to do is build a chroot that the target 
machine boots diskless off.  Then I chroot into that directory and install 
whatever tools I want using ports/packages.  I find that getting FreeBSD to 
boot diskless is so easy that I've had it accidentally happen more than once 
when I wanted something else to happen.  Installing ports in a chroot is also 
pretty trivial.  Building a custom mfsroot has a bit of a learning curve with 
a fairly expensive trial and error penalty.

At any rate.  There are a lot of compelling reasons to not use sysinstall for 
automated installs.  And while there are compelling reasons to use sysinstall 
for this task, most of them involve things like "I'm a masochist." or "It was 
there so I thought I'd use it."

-- 
Thanks,

Josh Paetzel
FreeBSD -- The power to serve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100306/66b72e96/attachment.pgp


More information about the freebsd-hackers mailing list