tech-install archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Anyone working on an automated install?



Josh Branning <lovell.joshyyy%gmail.com@localhost> writes:

> On 23/10/12 22:15, Aleksej Saushev wrote:
>> David Young <dyoung%pobox.com@localhost> writes:
>> 
>>> On Mon, Oct 22, 2012 at 10:17:29AM -0400, Greg Troxel wrote:
>>>>
>>>> Aleksej Saushev <asau%inbox.ru@localhost> writes:
>>>>
>>>>> Josh Branning <lovell.joshyyy%gmail.com@localhost> writes:
>>>>>
>>>>>> I am aware this has been asked several times already, but it really
>>>>>> would be nice to have some way of automating the installation for NetBSD.
>>>>>>
>>>>>> If anyone is working on this, please let me know.
>>>>>
>>>>> NetBSD installation process is straightforward, it is trivial to script 
>>>>> it.
>>>>
>>>> If you mean with expect, it's not, if you have a lot of machines and
>>>> don't have consoles wired up.  If you mean that it shouldn't take much
>>>> coding time to make sysinst take a control file, I agree.
>>>
>>> Aleksej may have meant that to write a script that sets up a disk using
>>> fdisk(8), disklabel(8), makefs(8), extracts sets with pax(1), runs
>>> etcupdate(8) to complete some essential installation steps, modifies
>>> some configuration files (e.g, sets rc_configured=YES in /etc/rc.conf)
>>> and runs installboot(8) to configure the bootloader, is trivial.
>>>
>>> I wouldn't call it trivial, but it's definitely possible.
>> 
>> In my experience, writing such a script is not more complex than using
>> some automation tool. I have to admit though that our tools could be
>> friendlier to scripting users, and this could reduce complexity
>> significantly, indeed. Still installation automation is not that trivial,
>> unless you use full disk and single partition (or just two of them).
>> I'd like to get support for this special case, and I have grown a hack
>> in my tree already, but I don't have time and resources to get it
>> read for production.
>> 
> That's a shame, if I were better at coding I'd help out.

Nothing shameful here. Installation is easily scripted, but you still
have to learn how to do that.

> Most other
> unix-like distributions have some method of automating their installer,
> it'd be great to see NetBSD have the same. It's the only downfall I can
> see for this otherwise great OS.

They have to support it in installer (e.g. due to the way they distribute
the system), NetBSD doesn't have to do that.

Seriously, if you do need to automate it, you can get it done within
few hours even if you're not a great coder.

The process goes as this (read man pages to understand what's going on):

fdisk -v -u -f -i -0 -s 169/63/2029041 wd0
# you only need to make your script to find the last number by another fdisk 
invocation

fdisk -v -f -a0 wd0

disklabel -i wd0 # or this
disklabel -FR wd0 /tmp/cf.label # you only need to learn how to generate 
correct file

newfs wd0a; mount /dev/wd0a /target

cd /target; for s in base etc text man ...; do pax -zrpe -f 
/path/to/sets/$s.tgz; done
for s in kern-GENERIC modules; do sudo pax -zrpe -f 
/path/to/kernel/sets/$s.tgz; done

cp /target/usr/mdec/boot /target/boot
/usr/sbin/installboot -vf -o timeout=2 /dev/rwd0a /target/usr/mdec/bootxx_ffsv1

Perhaps it can be simplified more, I don't remember.
I couldn't find more detailed notes from my past project.


-- 
HE CE3OH...



Home | Main Index | Thread Index | Old Index