Re: Assign IP address and hostname via kernel parameter
Hi, thanks for the hint, this brought me to a (IMHO) good way to accomplish this. When using FreeBSD as domU and configuring the kernel in the domU config file (rather than using pygrub) it's possible to append kernel parameters, by defining them in the variable 'extras' within the domU config file. With 'kenv' I can read them from within the bootet domU, so this should be just a simple shell script to setup all parameters. Currently I'm not sure where this script should hook into freebsd's internas. The greatest thing would be having a 'rc.conf' parameter to enable configuration from the kernel parameters. Setting this to 'true' would simply fire up the shell script to do all the stuff. Any suggestions or hints on this??? Regards, --- Mr. Olli On Wed, 2009-05-06 at 17:52 +0100, Bob Bishop wrote: > Hi, > > On 6 May 2009, at 16:20, Mister Olli wrote: > > > is there a way to configure IP address and hostname on freebsd systems > > via kernel command line parameters? [etc] > > When running diskless, the loader sets kernel variables like: > > boot.netif.gateway="192.168.198.1" > boot.netif.hwaddr="00:15:17:47:14:fc" > boot.netif.ip="192.168.198.8" > boot.netif.netmask="255.255.255.0" > > to values obtained from BOOTP or DHCP, and the right things happen. I > guess you could just set these in loader.conf or at the loader prompt. > > -- > Bob Bishop > r...@gid.co.uk > > > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Assign IP address and hostname via kernel parameter
Hi, I had a short look on google for this parameters, and from my understanding the NFS diskless client is using the informations out of it to set the appropriate settings on the network interface. So no luck when supplying them as kernel parameters. Oh and btw I'm not sure how to setup kernel options. Normally this is done in 'loader.conf', but since para-virtualized xen does start the kernel directly there's no way to do this via loader.conf. Does anyone have some idea or hints how to solve this problem? Regards, --- Mr. Olli On Wed, 2009-05-06 at 17:52 +0100, Bob Bishop wrote: > Hi, > > On 6 May 2009, at 16:20, Mister Olli wrote: > > > is there a way to configure IP address and hostname on freebsd systems > > via kernel command line parameters? [etc] > > When running diskless, the loader sets kernel variables like: > > boot.netif.gateway="192.168.198.1" > boot.netif.hwaddr="00:15:17:47:14:fc" > boot.netif.ip="192.168.198.8" > boot.netif.netmask="255.255.255.0" > > to values obtained from BOOTP or DHCP, and the right things happen. I > guess you could just set these in loader.conf or at the loader prompt. > > -- > Bob Bishop > r...@gid.co.uk > > > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Assign IP address and hostname via kernel parameter
Hi, On 6 May 2009, at 16:20, Mister Olli wrote: is there a way to configure IP address and hostname on freebsd systems via kernel command line parameters? [etc] When running diskless, the loader sets kernel variables like: boot.netif.gateway="192.168.198.1" boot.netif.hwaddr="00:15:17:47:14:fc" boot.netif.ip="192.168.198.8" boot.netif.netmask="255.255.255.0" to values obtained from BOOTP or DHCP, and the right things happen. I guess you could just set these in loader.conf or at the loader prompt. -- Bob Bishop r...@gid.co.uk ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Assign IP address and hostname via kernel parameter
Hi, I would take a look at sysctl this system takes care of kernel parameters. There are a few man pages that delineate what is read only. I'm sure you are aware of setting the hostname at boot time. It seemed like you were more curious about on the fly. I'm not familiar with xen domU's hope this helps, =jt On Wed, May 6, 2009 at 11:20 AM, Mister Olli wrote: > Hi, > > is there a way to configure IP address and hostname on freebsd systems > via kernel command line parameters? > > I have some freebsd systems in as xen domU's and it would be really > great to be able to set the ip address & hostname within the > configuration file for the domU. > > I'm aware that I could configure a static mac address and use DHCP, but > with several layer2 segments on different XEN hosts setting up DHCP > correctly would be a real pain ;-) > > --- > Regards > Mr. Olli > > ___ > freebsd-curr...@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Assign IP address and hostname via kernel parameter
Hi, is there a way to configure IP address and hostname on freebsd systems via kernel command line parameters? I have some freebsd systems in as xen domU's and it would be really great to be able to set the ip address & hostname within the configuration file for the domU. I'm aware that I could configure a static mac address and use DHCP, but with several layer2 segments on different XEN hosts setting up DHCP correctly would be a real pain ;-) --- Regards Mr. Olli ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"