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 19th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default OpenBSD Installer / Install Script Basic Questions

Had a few questions about when I am installing:
  1. When I am installing I have 2 nics.

    If I configure em0 first, then configure em1, em1 will prompt for the etc/host "friendly name" not em0.

    If I configure em1 first, then configure em0, it prompts for the friendly hostname for em0 not em1.

    Now being that em0 will be my link to the cable modem and em1 will be my internal lan, wouldn't it make sense to have the friendly name be on the internal lan (em1) so they would be looking to that hostname?
  2. I have my external interface set as DHCP and being that this will be my firewall/router, I have my lan facing interface declared with ip values. When it asks for my "default route," would I just say dhcp since everything will be dhcp from the external nic, or should I make the default route the same ip as em1 (lan facing nic)? My guess is that since this embedded device will be the dhcp server as well, I should just say DHCP, however, if there was a router or other dhcp server inline between this device and the cable modem, I would declare that as my gateway/default route. Can I get some clarification on this?
  3. The DNS domain name. Does this matter? It's Not going to be a forward facing server, so i don't feel the need for a FQDN, nor am I hosting sites here. Would gobblygook or jibberish suffice or does it want a foo.bar setup?
  4. When PXE booting, it will not pick up em1, it fails connection. However, em0 picks up pxeboot right away. If I exit out of the installer to the shell, I switch interfaces and then make sure em1 is now active then it works and can continue install from that interface. Is this a concern or sign of future failure or is it only looking on one interface during PXE install?
  5. The auto partitioning scheme is unacceptable to me so I am making a custom partition scheme with the correct allocation.

    I know that OpenBSD is smart enough to apply proper values and nosuid/etc to the fstab based on the auto layout it generates. My question is that if I am to 'Z' out and delete the whole partition table and create one from scratch, as long as I name the mount points correctly, {/, /var, /tmp, /usr, /usr/local, /usr/src, /var etc etc}, will it still intelligently construct these partitions with the proper settings even though I removed the auto allocation? My guess it goes off mount point declarations.

Thanks all! Feel free to inquire on any questions you may have.
Reply With Quote
  #2   (View Single Post)  
Old 20th May 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Please provide the complete output of dmesg(8). The install script is constantly being tweaked by the developers, & without knowing what version of OpenBSD is being used, little can be said to answer your questions.
Reply With Quote
  #3   (View Single Post)  
Old 20th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

Using 5.7 the latest amd64. This is the initial install of the system. Nothing more.

Is this in regards to question 4?

Any input on the others?
Reply With Quote
  #4   (View Single Post)  
Old 20th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I don't have the install script available at this moment, so I can only provide limited answers.
Quote:
Originally Posted by daemonbak View Post
...wouldn't it make sense to have the friendly name be on the internal lan (em1) so they would be looking to that hostname?
From memory, this value is concatenated with your domain name to populate myname(5) with an FQDN. This FQDN must be resolvable, as discussed below.
Quote:
... When it asks for my "default route," would I just say dhcp since everything will be dhcp from the external nic...?
Yes. This is the default route for this system, which in your case will be provided by an upstream DHCP server.
Quote:
...The DNS domain name. Does this matter? It's Not going to be a forward facing server, so i don't feel the need for a FQDN, nor am I hosting sites here. Would gobblygook or jibberish suffice or does it want a foo.bar setup?
The default, if not provided by upstream DHCP during install, is "my.domain" which will work for this purpose or you can change to whatever you wish. This does not need to be resolvable from the Internet, but must be locally resolvable on this installed system. The install script should insure this by populating hosts(5) with whatever you provide in answer to the question. You could use the default "my.domain" or "daemonbaK" or the oft used "local" as long as the domain name is resolvable and does not introduce any conflicts with actual Internet domain name resolution.
Quote:
...When PXE booting, it will not pick up em1...Is this a concern or sign of future failure or is it only looking on one interface during PXE install?
PXE boot requires integration between BIOS, NIC, and the bootloader. My experience with pxeboot(8) on multi-NIC machines has been limited to systems where the BIOSes only permit a single, on-motherboard NIC to be used for PXE boot. That NIC is then used by the pxeboot(8) bootloader for tftp file transfers of boot configuration files and kernels. I've never had a problem with PXE for installation, because whenever I've used PXE boot for installs -- and I use PXE for installation more than any other media -- I've always used the same NIC for boot and the filesets. And even when I've run diskless(8) systems, I've always used the same PXE boot NIC for diskless provisioning -- connections to servers providing rarpd(8), rpc.bootparamd(8), and nfsd(8) services.

I've never run into your use case, which appears to be using different network interfaces for boot and install.
Quote:
The auto partitioning scheme is unacceptable to me so I am making a custom partition scheme with the correct allocation.
Absolutely fine to do so.
Quote:
...I know that OpenBSD is smart enough to apply proper values and nosuid/etc to the fstab based on the auto layout it generates. My question is that if I am to 'Z' out and delete the whole partition table and create one from scratch, as long as I name the mount points correctly, {/, /var, /tmp, /usr, /usr/local, /usr/src, /var etc etc}, will it still intelligently construct these partitions with the proper settings even though I removed the auto allocation? My guess it goes off mount point declarations.
To the best of my recollection, the installer will use mount options based on its table of best practices for known mount points. Your custom configuration may use different mount points, though, and you're welcome to add or remove options as you see fit in fstab(5). In most of my systems I add the softdep mount option as a matter of course, and if I want to add or remove other options I can do so when I'm editing the file after installation has completed.
Reply With Quote
  #5   (View Single Post)  
Old 27th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

ok so for #1:

When I am installing I have 2 nics.

Now being that em0 will be my link to the cable modem and em1 will be my internal lan, wouldn't it make sense to have the friendly name be on the internal lan (em1) so they would be looking to that hostname?

This is the "symbolic" hostname for the interface not the system hostname. Which one should i pick to apply the symbolic. it allows me to choose em0 or em1.

Should i pick the egress or should i pick the lan facing nic? the egress will of course be the default route since it is forward facing the internet

-------------------------
Reply With Quote
  #6   (View Single Post)  
Old 27th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Perhaps I wasn't clear. That name is not assigned to a network interface. It's combined with your selected domain name (which can come from dhcp, or if dhcp is not used, can be "my.domain" or any name you select. This only populates the /etc/myname file. See myname(5) for more information.
Reply With Quote
  #7   (View Single Post)  
Old 27th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

yes i understand that, however we aren't talking about the hostname we're talking about the symbolic hostname. it associates it with that specific IP which is unique to that interface in /etc/hosts not /etc/myname.

If i select during install to setup em0 first, it will NOT prompt for symbolic name. But when setting up em 1 it will then prompt me for em1s symbolic name but not prompt for em0

If i select during install to setup em1 first, it will NOT prompt for symbolic name. But when setting up em 1 it will then prompt me for em0s symbolic name but not prompt for em1

See the confusion, it only prompts for the second interface configured. i will have 2 lan facing nics (em1, em2). Each for a different subnet and network and one nic for egress.

Therefore it only wants it on one interface. I can't have the same host name in /etc/hosts for 3 separate ips (em0, em1, em2).
Reply With Quote
  #8   (View Single Post)  
Old 27th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Ah. Oh, now I have a clearer understanding of the question. The term used in the script is "symbolic name" and the default is the system name you choose earlier. This will be used in /etc/hosts, to provide an FQDN if you wish it for different addresses. That's all.

Here's an install script excerpt from a virtual machine I just checked with. There are 3 vio(4) NICs -- vio0 gets configured with DHCP, vio1 and vio2 are statically assigned. I chose "daemonbak" as the system name, which occurred before this fragment, and "local" for the domain name, after the NICs had been provisioned.
Code:
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0]
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp]
DHCPDISCOVER on vio0 - interval 1
DHCPOFFER from 10.0.2.2 (52:55:0a:00:02:02)
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 10.0.2.2 (52:55:0a:00:02:02)
bound to 10.0.2.15 -- renewal in 43200 seconds.
IPv6 address for vio0? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [done] vio1
Symbolic (host) name for vio1? [daemonbak] vio1-name
IPv4 address for vio1? (or 'dhcp' or 'none') 10.1.1.1
Netmask for vio1? [255.255.255.0]
IPv6 address for vio1? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [done] vio2
Symbolic (host) name for vio2? [daemonbak] vio2-name
IPv4 address for vio2? (or 'dhcp' or 'none') 10.2.2.2
Netmask for vio2? [255.255.255.0]
IPv6 address for vio2? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [done]
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') [dhcp]
DNS domain name? (e.g. 'bar.com') [my.domain] local
DNS nameservers? (IP address list or 'none') [10.0.2.3]

Password for root account? (will not echo)
.
.
.
And here's the resulting /etc files:
Code:
# cat /etc/hosts
127.0.0.1       localhost
::1             localhost
10.1.1.1        vio1-name.local vio1-name
10.2.2.2        vio2-name.local vio2-name

# cat /mnt/etc/myname
daemonbak.local
Reply With Quote
  #9   (View Single Post)  
Old 28th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

Quote:
Originally Posted by jggimi View Post
Ah. Oh, now I have a clearer understanding of the question. The term used in the script is "symbolic name" and the default is the system name you choose earlier. This will be used in /etc/hosts, to provide an FQDN if you wish it for different addresses. That's all.

Here's an install script excerpt from a virtual machine I just checked with. There are 3 vio(4) NICs -- vio0 gets configured with DHCP, vio1 and vio2 are statically assigned. I chose "daemonbak" as the system name, which occurred before this fragment, and "local" for the domain name, after the NICs had been provisioned.
Code:
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0]
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp]
DHCPDISCOVER on vio0 - interval 1
DHCPOFFER from 10.0.2.2 (52:55:0a:00:02:02)
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 10.0.2.2 (52:55:0a:00:02:02)
bound to 10.0.2.15 -- renewal in 43200 seconds.
IPv6 address for vio0? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [done] vio1
Symbolic (host) name for vio1? [daemonbak] vio1-name
IPv4 address for vio1? (or 'dhcp' or 'none') 10.1.1.1
Netmask for vio1? [255.255.255.0]
IPv6 address for vio1? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [done] vio2
Symbolic (host) name for vio2? [daemonbak] vio2-name
IPv4 address for vio2? (or 'dhcp' or 'none') 10.2.2.2
Netmask for vio2? [255.255.255.0]
IPv6 address for vio2? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vio1 vio2 vlan0.
Which network interface do you wish to configure? (or 'done') [done]
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') [dhcp]
DNS domain name? (e.g. 'bar.com') [my.domain] local
DNS nameservers? (IP address list or 'none') [10.0.2.3]

Password for root account? (will not echo)
.
.
.
And here's the resulting /etc files:
Code:
# cat /etc/hosts
127.0.0.1       localhost
::1             localhost
10.1.1.1        vio1-name.local vio1-name
10.2.2.2        vio2-name.local vio2-name

# cat /mnt/etc/myname
daemonbak.local
Bingo, now it makes sense! 3 easy questions for you:

Can I change it after the fact?
The only place I would need to change it is in /etc/hosts?

naming convention is:
<IP ADDRESS of INT> arbitraryname1.<domainname> arbitraryname1
<IP ADDRESS of INT> arbitraryname2.<domainname> arbitraryname1

That about it?
Reply With Quote
Old 28th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Yes, you can edit the file. The format generally for each record is <ip address> <FQDN> [<alias1> ... [<aliasN>]] . See hosts(5) for details.

Remember, this is just the local hosts file, a local-system-only text-based domain name resolver which is only used when your resolv.conf(5) configuration specifies its use. Which the installer will do, and, like all other files in /etc, you can change.

It's been my experience that, most often, you'll want all IP addresses on your host to resolve to the same name, which is why the default at install is the system name you defined. But you may also want to refer to your NIC addresses with unique FQDNs, so you have the option to change them.
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some basic questions regarding pkgsrc use gezley NetBSD Package System (pkgsrc) 15 30th April 2015 04:25 PM
How to create a portable, bootable OpenBSD -NOT INSTALLER-? Crypto333 OpenBSD Installation and Upgrading 35 29th December 2014 07:44 AM
openbsd basic questions barti OpenBSD General 12 17th July 2012 08:38 PM
basic rsync questions unixjingleman FreeBSD General 5 27th May 2011 04:39 AM
Basic starter questions ??? dennky OpenBSD Installation and Upgrading 10 5th December 2009 07:21 PM


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


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