DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th December 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,496
Default OpenBSD autoinstall

Just played with the the autoinstall(8) feature of the OpenBSD installer. After a couple of iterations I ended up with the following install.conf:
Code:
Terminal type? = vt220
System hostname = pxe3
Which network interface do you wish to configure? = vio0
IPv4 address for = dhcp
IPv6 address for vio0 = none
Password for root account? = $2a$08$P05SeZFa/oHACZvpFp0Lt.Llx2R8RfrQmvSjc1moSmZQcUmAdxi/z
Start sshd(8) by default?       = yes 
Start ntpd(8) by default?       = no 
Do you expect to run the X Window System? = yes 
Do you want the X Window System to be started by xdm(1)? = no 
Do you want to suspend on lid close? = no
Change the default console to com0? = no
Setup a user? = no 
What timezone are you in? = Europe/Amsterdam 
Which disk is the root disk?    = sd0
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? = a
Location of sets? = http
HTTP proxy URL? = none
HTTP Server? = hercules.utp.xnet
Server directory? = snapshots/amd64
Set name(s)? = -game*
Set name(s)? = site*
Set name(s)? = done
Checksum test for site56.tgz failed. Continue anyway? = yes
Unverified sets: site56.tgz. Continue without verification? = yes
Location of sets? = done
Having a log or transcript of an install comes very handy in writing this install.conf. With the following .tiprc file you can log a serial console install to file:
Code:
!beautify
record='LOGS/serial-log.txt'
script
verbose
The interesting part is where you select the sets. I forgot that I don't retrieve the game set anymore, but it still works:
Code:
Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-' to the set name, file name pattern or 'all'. Selected
sets are labelled '[X]'.
    [X] bsd           [X] base56.tgz    [X] xbase56.tgz   [X] xserv56.tgz
    [X] bsd.rd        [X] comp56.tgz    [X] xshare56.tgz  [ ] site56.tgz
    [X] bsd.mp        [X] man56.tgz     [X] xfont56.tgz
Set name(s)? (or 'abort' or 'done') [done] -game*
    [X] bsd           [X] base56.tgz    [X] xbase56.tgz   [X] xserv56.tgz
    [X] bsd.rd        [X] comp56.tgz    [X] xshare56.tgz  [ ] site56.tgz
    [X] bsd.mp        [X] man56.tgz     [X] xfont56.tgz
Set name(s)? (or 'abort' or 'done') [done] site*
    [X] bsd           [X] base56.tgz    [X] xbase56.tgz   [X] xserv56.tgz
    [X] bsd.rd        [X] comp56.tgz    [X] xshare56.tgz  [X] site56.tgz
    [X] bsd.mp        [X] man56.tgz     [X] xfont56.tgz
Set name(s)? (or 'abort' or 'done') [done] done
Even the answers to ignore the failing verify of my site56.tgz worked:
Code:
Get/Verify SHA256.sig   100% |**************************|  1890       00:00    
Signature Verified
Get/Verify bsd          100% |**************************|  9740 KB    00:00    
Get/Verify bsd.rd       100% |**************************|  7388 KB    00:00    
Get/Verify bsd.mp       100% |**************************|  9776 KB    00:00    
Get/Verify base56.tgz   100% |**************************| 54910 KB    00:01    
Get/Verify comp56.tgz   100% |**************************| 49861 KB    00:01    
Get/Verify man56.tgz    100% |**************************|  8757 KB    00:00    
Get/Verify xbase56.tgz  100% |**************************| 16642 KB    00:00    
Get/Verify xshare56.tgz 100% |**************************|  4458 KB    00:00    
Get/Verify xfont56.tgz  100% |**************************| 38994 KB    00:01    
Get/Verify xserv56.tgz  100% |**************************| 19382 KB    00:00    
Get/Verify site56.tgz   100% |**************************|  4866       00:00    
Checksum test for site56.tgz failed. Continue anyway? [no] yes
Unverified sets: site56.tgz. Continue without verification? [no] yes
Installing bsd          100% |**************************|  9740 KB    00:00    
Installing bsd.rd       100% |**************************|  7388 KB    00:00    
Installing bsd.mp       100% |**************************|  9776 KB    00:00    
Installing base56.tgz   100% |**************************| 54910 KB    00:02    
Extracting etc.tgz      100% |**************************|   110 KB    00:00    
Installing comp56.tgz   100% |**************************| 49861 KB    00:02    
Installing man56.tgz    100% |**************************|  8757 KB    00:00    
Installing xbase56.tgz  100% |**************************| 16642 KB    00:00    
Extracting xetc.tgz     100% |**************************|  9152       00:00    
Installing xshare56.tgz 100% |**************************|  4458 KB    00:00    
Installing xfont56.tgz  100% |**************************| 38994 KB    00:00    
Installing xserv56.tgz  100% |**************************| 19382 KB    00:01    
Installing site56.tgz   100% |**************************|  4866       00:00    
Location of sets? (disk http or 'done') [done] done
Saving configuration files...done.
Making all device nodes...done.
I wonder whether it is possible to create a custom disk layout. So that is the next thing to try......
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #2   (View Single Post)  
Old 11th December 2014
ibara's Avatar
ibara ibara is offline
AsiaBSDCon 2016 Speaker
 
Join Date: Jan 2014
Posts: 403
Default

Quote:
Originally Posted by J65nko View Post
I wonder whether it is possible to create a custom disk layout. So that is the next thing to try......
Not yet. But hopefully soon!
Reply With Quote
  #3   (View Single Post)  
Old 11th December 2014
Oko Oko is offline
Banned
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,087
Default

Admins could you please make this thread sticky?
Reply With Quote
  #4   (View Single Post)  
Old 11th December 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,496
Default

I tagged this thread, so you can easily find it http://daemonforums.org/tags.php?tag=install.conf
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 12th December 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,496
Default

Re: custom disk layout

The disklabels can be defined with a disktab(5) entry. The only other thing that would be needed is a method to supply the installer with the mount points for /etc/fstab creation.

Customized generation of install.conf

This could be done with a shell script, where at the top you only have to modify the variables, that contain the answers. For example:
Code:
#!/bin/sh
TERMINAL_TYPE=vt100
HOSTNAME=heraclitus
NIC=fxp0
NIC_IP=dhcp

cat <<END
Terminal type? = ${TERMINAL_TYPE}
System hostname = ${HOSTNAME} 
Which network interface do you wish to configure? = ${NIC} 
IPv4 address for = ${NIC_IP} 
END
This will generate:
Code:
Terminal type? = vt100
System hostname = sophocles 
Which network interface do you wish to configure? = fxp0 
IPv4 address for = dhcp
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Tags
auto install, autoinstall, install.conf, openbsd automatic install

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick