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

2010-06-04 Thread Stefan Miklosovic

Hi,

could you please send me those installers you have written?

I would like to write up mine and I dont have an idea how to do that.

Your scripts would really helped me a lot.

Be so kind and please send me to like attachment or to
miklosovic.free...@gmail.com

god bless you :)

jpaetzel wrote:
> 
> On Friday 05 March 2010 07:01:00 John Baldwin wrote:
>> On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote:
>> > For reasons that may well be idiosyncratic, I like to set up FreeBSD
>> > machines to have at least 2 bootable slices -- e.g., one can act as a
>> > fallback if an attempted software upgrade proves to have been
>> ill-timed.
>> > 
>> > In the past, I've done this manually; while a bit tedious & fairly
>> > "target-rich" with opportunities for human error, it's something that
>> is
>> > typically done infrequently (i.e., once) in the life of a machine (or
>> at
>> > least its boot drive).
>> > 
>> > At work, the IT folks use a scripted sysinstall(8) to set machines up;
>> > to increase the probability that I'll be able to get 3 "special"
>> > machines set up the way I want, I'm trying to set up a sysinstall
>> config
>> > file to make this as painless as possible.
>> > 
>> > I managed to get a copy of the config script IT uses, so I had a
>> > starting-point ... but they were setting the machines up with
>> > 
>> > partition=exclusive
>> > 
>> > which doesn't seem like a good choice for what I'm doing.  :-}
>> > 
>> > 
>> > After my first attempt failed, I poked around on the Net & found
>> >
>> > > le-
>> 
>> slices-4387807/>,
>> 
>> > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something
>> > 
>> > similar to what I was about to try next, and writes:
>> > | My intent here is to create three slices-one 6GB in size, another 1GB
>> > | in size, and the third sized to consume the remaining free space.
>> When
>> > | I run this through sysinstall, it complains that it can't find the
>> > | space for the partitions. It even complains that it can't find any
>> > | free space. Because the slices don't get created, the subsequent
>> label
>> > | assignments fail as well. What is the proper commands for creating
>> > | multiple slices in install.cfg?
>> > 
>> > In a foillowup, he writes:
>> > | After a lot of experimenting, my impression is that sysinstall simply
>> > | doesn't support multiple slice installations. It works to a point,
>> but
>> > | I get some unexpected errors, e.g.
>> > | 
>> > | Unable to make device node for /dev/ad0s1a in /dev
>> > 
>> > which doesn't seem very encouraging.
>> > 
>> > 
>> > Would someone please either confirm the limitation or provide a
>> > suitable excerpt from a sysinstall config script to demonstrate
>> > that it is actually possible?  (Or show me where it's spelled out in
>> the
>> > man page)
>> > 
>> > (I'm using 7.x sysinstall, if that matters.)
>> 
>> If you are doing a fully scripted install you may be better off just
>> using
>> a dedicated shell script to format your disks and mount them and then use
>> the various *-install.sh scripts from the release distributions to
>> install
>> the code.  You could still do this via sysinstall by sticking your shell
>> script in /stand in the MFS root and having your sysinstall script just
>> run that script. You might want to build a custom mfsroot to add some
>> more
>> useful tools though.
>> 
>> I really think sysinstall needs to support a disk "backdoor" whereby the
>> user can either manually partition disks and then mount them at /mnt (or
>> have a script do it), and tell sysinstall to just skip the disk stuff and
>> assume /mnt is mounted.
> 
> David,
> 
> I second the ditching sysinstall for a shell script idea.  A shell script
> that 
> replaces sysinstall is nearly as short as the install.cfg and a lot easier
> to 
> figure out.  I've written a half dozen auto installers for FreeBSD, from 
> trivial to complex and would be more than willing to help you get
> something 
> set up.  I can send you code if you want as well.
> 
> -- 
> Thanks,
> 
> Josh Paetzel
> FreeBSD -- The power to serve
> 
>  
> 

-- 
View this message in context: 
http://old.nabble.com/Scripting-sysinstall%288%29-to-create---use-multiple-slices-on-a-disk--tp27786883p28784339.html
Sent from the freebsd-hackers mailing list archive at Nabble.com.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


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

2010-03-08 Thread John Baldwin
On Saturday 06 March 2010 8:28:54 am Josh Paetzel wrote:
> 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.

I agree that building a custom mfsroot from scratch would be a bit of a PITA.
I generally cheat by just patching src/release//boot_crunch.conf to add
the tools I want to use.  I find dialog(1) useful for popping up
sysinstall-style dialog boxes from shell scripts.  I have also seen folks
build a completely separate MFS root separate from the release process.  While
that was more tedious to get started, it was certainly more flexible.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


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

2010-03-06 Thread Josh Paetzel
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


signature.asc
Description: This is a digitally signed message part.


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

2010-03-06 Thread Garrett Cooper
On Fri, Mar 5, 2010 at 10:33 AM, Josh Paetzel  wrote:
> On Friday 05 March 2010 07:01:00 John Baldwin wrote:
>> On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote:
>> > For reasons that may well be idiosyncratic, I like to set up FreeBSD
>> > machines to have at least 2 bootable slices -- e.g., one can act as a
>> > fallback if an attempted software upgrade proves to have been ill-timed.
>> >
>> > In the past, I've done this manually; while a bit tedious & fairly
>> > "target-rich" with opportunities for human error, it's something that is
>> > typically done infrequently (i.e., once) in the life of a machine (or at
>> > least its boot drive).
>> >
>> > At work, the IT folks use a scripted sysinstall(8) to set machines up;
>> > to increase the probability that I'll be able to get 3 "special"
>> > machines set up the way I want, I'm trying to set up a sysinstall config
>> > file to make this as painless as possible.
>> >
>> > I managed to get a copy of the config script IT uses, so I had a
>> > starting-point ... but they were setting the machines up with
>> >
>> > partition=exclusive
>> >
>> > which doesn't seem like a good choice for what I'm doing.  :-}
>> >
>> >
>> > After my first attempt failed, I poked around on the Net & found
>> > > > le-
>>
>> slices-4387807/>,
>>
>> > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something
>> >
>> > similar to what I was about to try next, and writes:
>> > | My intent here is to create three slices-one 6GB in size, another 1GB
>> > | in size, and the third sized to consume the remaining free space. When
>> > | I run this through sysinstall, it complains that it can't find the
>> > | space for the partitions. It even complains that it can't find any
>> > | free space. Because the slices don't get created, the subsequent label
>> > | assignments fail as well. What is the proper commands for creating
>> > | multiple slices in install.cfg?
>> >
>> > In a foillowup, he writes:
>> > | After a lot of experimenting, my impression is that sysinstall simply
>> > | doesn't support multiple slice installations. It works to a point, but
>> > | I get some unexpected errors, e.g.
>> > |
>> > | Unable to make device node for /dev/ad0s1a in /dev
>> >
>> > which doesn't seem very encouraging.
>> >
>> >
>> > Would someone please either confirm the limitation or provide a
>> > suitable excerpt from a sysinstall config script to demonstrate
>> > that it is actually possible?  (Or show me where it's spelled out in the
>> > man page)
>> >
>> > (I'm using 7.x sysinstall, if that matters.)
>>
>> If you are doing a fully scripted install you may be better off just using
>> a dedicated shell script to format your disks and mount them and then use
>> the various *-install.sh scripts from the release distributions to install
>> the code.  You could still do this via sysinstall by sticking your shell
>> script in /stand in the MFS root and having your sysinstall script just
>> run that script. You might want to build a custom mfsroot to add some more
>> useful tools though.
>>
>> I really think sysinstall needs to support a disk "backdoor" whereby the
>> user can either manually partition disks and then mount them at /mnt (or
>> have a script do it), and tell sysinstall to just skip the disk stuff and
>> assume /mnt is mounted.
>
> David,
>
> I second the ditching sysinstall for a shell script idea.  A shell script that
> replaces sysinstall is nearly as short as the install.cfg and a lot easier to
> figure out.  I've written a half dozen auto installers for FreeBSD, from
> trivial to complex and would be more than willing to help you get something
> set up.  I can send you code if you want as well.

(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
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


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

2010-03-05 Thread Josh Paetzel
On Friday 05 March 2010 07:01:00 John Baldwin wrote:
> On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote:
> > For reasons that may well be idiosyncratic, I like to set up FreeBSD
> > machines to have at least 2 bootable slices -- e.g., one can act as a
> > fallback if an attempted software upgrade proves to have been ill-timed.
> > 
> > In the past, I've done this manually; while a bit tedious & fairly
> > "target-rich" with opportunities for human error, it's something that is
> > typically done infrequently (i.e., once) in the life of a machine (or at
> > least its boot drive).
> > 
> > At work, the IT folks use a scripted sysinstall(8) to set machines up;
> > to increase the probability that I'll be able to get 3 "special"
> > machines set up the way I want, I'm trying to set up a sysinstall config
> > file to make this as painless as possible.
> > 
> > I managed to get a copy of the config script IT uses, so I had a
> > starting-point ... but they were setting the machines up with
> > 
> > partition=exclusive
> > 
> > which doesn't seem like a good choice for what I'm doing.  :-}
> > 
> > 
> > After my first attempt failed, I poked around on the Net & found
> >  > le-
> 
> slices-4387807/>,
> 
> > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something
> > 
> > similar to what I was about to try next, and writes:
> > | My intent here is to create three slices-one 6GB in size, another 1GB
> > | in size, and the third sized to consume the remaining free space. When
> > | I run this through sysinstall, it complains that it can't find the
> > | space for the partitions. It even complains that it can't find any
> > | free space. Because the slices don't get created, the subsequent label
> > | assignments fail as well. What is the proper commands for creating
> > | multiple slices in install.cfg?
> > 
> > In a foillowup, he writes:
> > | After a lot of experimenting, my impression is that sysinstall simply
> > | doesn't support multiple slice installations. It works to a point, but
> > | I get some unexpected errors, e.g.
> > | 
> > | Unable to make device node for /dev/ad0s1a in /dev
> > 
> > which doesn't seem very encouraging.
> > 
> > 
> > Would someone please either confirm the limitation or provide a
> > suitable excerpt from a sysinstall config script to demonstrate
> > that it is actually possible?  (Or show me where it's spelled out in the
> > man page)
> > 
> > (I'm using 7.x sysinstall, if that matters.)
> 
> If you are doing a fully scripted install you may be better off just using
> a dedicated shell script to format your disks and mount them and then use
> the various *-install.sh scripts from the release distributions to install
> the code.  You could still do this via sysinstall by sticking your shell
> script in /stand in the MFS root and having your sysinstall script just
> run that script. You might want to build a custom mfsroot to add some more
> useful tools though.
> 
> I really think sysinstall needs to support a disk "backdoor" whereby the
> user can either manually partition disks and then mount them at /mnt (or
> have a script do it), and tell sysinstall to just skip the disk stuff and
> assume /mnt is mounted.

David,

I second the ditching sysinstall for a shell script idea.  A shell script that 
replaces sysinstall is nearly as short as the install.cfg and a lot easier to 
figure out.  I've written a half dozen auto installers for FreeBSD, from 
trivial to complex and would be more than willing to help you get something 
set up.  I can send you code if you want as well.

-- 
Thanks,

Josh Paetzel
FreeBSD -- The power to serve


signature.asc
Description: This is a digitally signed message part.


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

2010-03-05 Thread John Baldwin
On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote:
> For reasons that may well be idiosyncratic, I like to set up FreeBSD
> machines to have at least 2 bootable slices -- e.g., one can act as a
> fallback if an attempted software upgrade proves to have been ill-timed.
> 
> In the past, I've done this manually; while a bit tedious & fairly
> "target-rich" with opportunities for human error, it's something that is
> typically done infrequently (i.e., once) in the life of a machine (or at
> least its boot drive).
> 
> At work, the IT folks use a scripted sysinstall(8) to set machines up;
> to increase the probability that I'll be able to get 3 "special"
> machines set up the way I want, I'm trying to set up a sysinstall config
> file to make this as painless as possible.
> 
> I managed to get a copy of the config script IT uses, so I had a
> starting-point ... but they were setting the machines up with
> 
> partition=exclusive
> 
> which doesn't seem like a good choice for what I'm doing.  :-}
> 
> 
> After my first attempt failed, I poked around on the Net & found
> ,
> (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something
> similar to what I was about to try next, and writes:
> 
> | My intent here is to create three slices-one 6GB in size, another 1GB in
> | size, and the third sized to consume the remaining free space. When I
> | run this through sysinstall, it complains that it can't find the space
> | for the partitions. It even complains that it can't find any free space.
> | Because the slices don't get created, the subsequent label assignments
> | fail as well. What is the proper commands for creating multiple slices
> | in install.cfg?
> 
> In a foillowup, he writes:
> 
> | After a lot of experimenting, my impression is that sysinstall simply
> | doesn't support multiple slice installations. It works to a point, but I
> | get some unexpected errors, e.g.
> |
> | Unable to make device node for /dev/ad0s1a in /dev
> 
> which doesn't seem very encouraging.
> 
> 
> Would someone please either confirm the limitation or provide a
> suitable excerpt from a sysinstall config script to demonstrate
> that it is actually possible?  (Or show me where it's spelled out in the
> man page)
> 
> (I'm using 7.x sysinstall, if that matters.)

If you are doing a fully scripted install you may be better off just using a 
dedicated shell script to format your disks and mount them and then use the 
various *-install.sh scripts from the release distributions to install the 
code.  You could still do this via sysinstall by sticking your shell script in 
/stand in the MFS root and having your sysinstall script just run that script.  
You might want to build a custom mfsroot to add some more useful tools though.

I really think sysinstall needs to support a disk "backdoor" whereby the user 
can either manually partition disks and then mount them at /mnt (or have a 
script do it), and tell sysinstall to just skip the disk stuff and assume /mnt 
is mounted.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


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

2010-03-04 Thread David Wolfskill
For reasons that may well be idiosyncratic, I like to set up FreeBSD
machines to have at least 2 bootable slices -- e.g., one can act as a
fallback if an attempted software upgrade proves to have been ill-timed.

In the past, I've done this manually; while a bit tedious & fairly
"target-rich" with opportunities for human error, it's something that is
typically done infrequently (i.e., once) in the life of a machine (or at
least its boot drive).

At work, the IT folks use a scripted sysinstall(8) to set machines up;
to increase the probability that I'll be able to get 3 "special"
machines set up the way I want, I'm trying to set up a sysinstall config
file to make this as painless as possible.

I managed to get a copy of the config script IT uses, so I had a
starting-point ... but they were setting the machines up with

partition=exclusive

which doesn't seem like a good choice for what I'm doing.  :-}


After my first attempt failed, I poked around on the Net & found
,
(dated 18-11-08, 10:40 PM ), in which Peter Steele describes something
similar to what I was about to try next, and writes:

| My intent here is to create three slices-one 6GB in size, another 1GB in
| size, and the third sized to consume the remaining free space. When I
| run this through sysinstall, it complains that it can't find the space
| for the partitions. It even complains that it can't find any free space.
| Because the slices don't get created, the subsequent label assignments
| fail as well. What is the proper commands for creating multiple slices
| in install.cfg?

In a foillowup, he writes:

| After a lot of experimenting, my impression is that sysinstall simply
| doesn't support multiple slice installations. It works to a point, but I
| get some unexpected errors, e.g.
|
| Unable to make device node for /dev/ad0s1a in /dev

which doesn't seem very encouraging.


Would someone please either confirm the limitation or provide a
suitable excerpt from a sysinstall config script to demonstrate
that it is actually possible?  (Or show me where it's spelled out in the
man page)

(I'm using 7.x sysinstall, if that matters.)

Thanks!

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpn6D3n7Q5CS.pgp
Description: PGP signature