|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
Autoinstall step-by-step guide
Hello,
I'd like to install OpenBSD automatically. I already have my install.conf but I don't know what to do next. I've already been here: https://man.openbsd.org/autoinstall.8 https://man.openbsd.org/httpd.conf https://www.openbsd.org/faq/faq4.html https://openbsd.amsterdam/setup.html Ideally I'd like you to provide a step-by-step guide on how to "use" install.conf during automatic installation, because at this point it says somethink like "at this IP I could not find your install.conf"... Thank you. |
|
||||
It might also help if you can show us your "install.conf ", and as jggimi said, but I am going to put in different words, we need to know what you will be trying to install to, using the autoinstall feature, and from, as well, for example, " Autoinstall to a webserver, from my PC ", I can't say I have ever tried the Autoinstall, to anything myself, so can't really give any kind of step by step, however the link you showed, seems pretty straight forward, : https://man.openbsd.org/autoinstall.8 , almost like a step by step, but obviously would vary depending on what one is installing to and from where,...
In a way, this error is pretty clear, but it would be better if you could show exactly what the error says, (I know, sometimes that is not so easy) : Quote:
__________________
My best friends are parrots |
|
|||
It has been a while since I used it but in http://daemonforums.org/showthread.php?t=8825 I attached a tarball that has a Makefile that uploads the install.conf to a (local) web server.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Hi,
the error looks like this: Code:
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? a vio0: bound to 100.64.3.3 from 100.64.3.2 (fe:e1:bb:d1:73:e7) Could not determine auto mode. Response file location? [http://100.64.3.2/install.conf] Fetching http://100.64.3.2/install.conf No response file found; non-interactive mode aborted. Code:
Terminal type? = vt220 System hostname = test Which network interface do you wish to configure? = vio0 IPv4 address for = dhcp Password for root account? = Start sshd(8) by default? = yes Change the default console to com0? = yes Setup a user? = user1 Full name for user user1? = user Password for user user1? = Allow root ssh login? = no Do you expect to run the X Window System? = no Do you want the X Window System to be started by xdm(1)? = no Which disk is the root disk? = sd0 Use (W)hole disk or (E)dit the MBR? = w Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? = a Location of sets? = cd0 Pathname to the sets? = 6.5/amd64 Set name(s) = all Location of sets? = done Directory does not contain SHA256.sig. Continue without verification? = yes What timezone are you in? = Europe/Berlin |
|
|||
Hi,
I think most suitable are the second and the third option. Could possibly be my host system the webserver while performing autoinstall on my guest system (VM)? If the answer is yes, I choose the second option. If not, I choose the third option. Thanks. |
|
||||
Look at the messages from the autoinstall carefully:
Code:
vio0: bound to 100.64.3.3 from 100.64.3.2 (fe:e1:bb:d1:73:e7) Code:
Could not determine auto mode. Code:
Response file location? [http://100.64.3.2/install.conf] Code:
Fetching http://100.64.3.2/install.conf Code:
No response file found; non-interactive mode aborted.
|
|
|||
If you use a web server you need to (re)generate an index.txt file.
From the Makefile that I referred to in http://daemonforums.org/showthread.p...034#post66836: Code:
upload: ${CONF} egrep ${ARCH_TEST} ${CONF} sudo cp -p ${CONF} ${DEST}/${UPLOAD} # regenerate directory listing ls -lt ${DEST} >${DEST}/index.txt You can check the web server error log file to see which request it received. (You may have to increase the log level ;-) )
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
Responding again for additional clarity.
Setting up a local webserver is as simple as a short httpd:conf(5) file and enabling/starting httpd(8). Each time you need to change your install.conf or add a machine-specific install.conf, you edit or add files in the /var/www/htdocs/ directory. Editing the contents of the RAMDISK kernel's directory structure requires the use of rdsetroot(8), vnconfig(8), mount(8), and umount(8). |
|
|||
So you say all I need to do is edit my httpd.conf as it's done here: https://openbsd.amsterdam/setup.html and edit the index.html file? If yes, I need to know what they mean by
Code:
root "/htdocs/<install>" By the way thank you all for your help, I really appreciate it. |
|
||||
I have questions, and answers.
|
|
|||
I'm sorry. I think I probably didn't explain my situation correctely.
I have a computer with internet connection and OpenBSD 6.4 installed on it. I know how to install OpenBSD the usual way and I know how to create and use a VM. What I want to do is to create a VM and install OpenBSD as a guest system on it with the autoinstall method. I have my install.conf and I don't know how to "serve it" to the installer. I don't have any webserver. I'm not a customer of openbsd.amsterdam. I'm just trying to use their work as a hint. I know my english is not perfect so I hope you'll understand. Thanks. |
|
||||
You will need to setup, and start a "localhost "server , on the host PC, the VM will need to be able to access that server. It might be relevant to know what kind of VM this is, for example I tried experiment with this my self, using a Qemu VM, hosted on my PC, also OpenBsd 6.5.
Quote:
Your local OpenBsd system , should have the httpd webserver, is that working ? You can test it by trying to connect, use your browser and try to connect to "localhost" or "127.0.0.1" In my case I am using Nginx, and needed to start the server first:
__________________
My best friends are parrots |
|
||||
Thank you! Now I have a better understanding of the situation, and your needs. You can either:
|
|
||||
===edited-----
Strange, for some reason I did not see the above posted by jggimi , when I posted this, any way, jggimi is much more of a expert then I am, I am no expert at all, so best pay attention to him. =====end edit---and thanks jggimi---- Additional note: In the link you showed: https://openbsd.amsterdam/setup.html Where they say: Code:
/var/www/htdocs/<install>/fe:e1:bb:d1:c8:01-install.conf I am not sure why the say : <install>, that could be a directory, and you could name it what ever you want. The point is, you path to it must be correct. From the above link again: Code:
server "default" { listen on * port 80 root "/htdocs/<install>" location "/pub/OpenBSD/6.5/amd64/*" { root "/htdocs/amd64" request strip 4 directory { auto index } } } Note:, the "auto index", this is important, it will solve any problems you may have with accessing the "install.conf" file, and the need for a index.html, or index.txt, but it is good practice to include a "index.html" file, in the root directory of your server: Example, mine: Code:
garry% cd /var/www/htdocs garry% ls Images fluxbb-1.5.10.tar.gz public app.php hugotest report.php assets images search.php bgplg index.html sfsdiag.php birds index.php styles common.php info.php ucp.php composer.json mcp.php viewforum.php composer.lock memberlist.php viewonline.php config.php myforum viewtopic.php cron.php news web.config downloads old-index.html x-index.html ex-index.php phpBB-3.2.2.zip zbblock faq.php phpBB3 zbblock_0_4_10a3.tar.gz feed.php posting.php fluxbb posts.php garry% After all said and done though, to setup a "autoinstall" configuration, for a VM on a local PC, seems like a comlicated way, when it is simple to just install normally, on the VM, unless you have some reason that makes it essential to do it this way, I will maybe give it a try, and see myself. Another screen shot, to demonstrate what the Code:
directory { auto index }
__________________
My best friends are parrots Last edited by PapaParrot; 19th June 2019 at 06:11 PM. |
|
||||
I have (just now) succeeded in doing the Autoinstall, from my PC, to a Qemu VM, using the "localhost" server, but there are some differences in what I am using, since I used qemu,
But any way, now I do see how this could be useful, and it (autoinstall) is a pretty neat feature, now that I have a install.conf file that works for me, setting up new VM's is pretty easy, pretty slick really, .. I made the directory "install", and have the install.conf file there, : Code:
garry$ pwd /var/www/htdocs/install garry$ ls install.conf garry$ My install.conf : Code:
System hostname = parrot Which network interface do you wish to configure? = em0 IPv4 address for em0 = dhcp Password for root account? = **** Start sshd(8) by default? = yes Do you expect to run the X Window System? = yes Do you want the X Window System to be started by xenodm(1)? = yes Change the default console to com0? = no Setup a user? = no no What timezone are you in? = America/Mexico_City wd0 W a Location of sets? = cd0 Set name(s)? = all done Directory does not contain SHA256.sig. Continue without verification? = yes
__________________
My best friends are parrots Last edited by PapaParrot; 20th June 2019 at 12:46 PM. |
|
|||
You can use the following simple /etc/httpd.conf to start httpd(8)
Code:
# $OpenBSD: httpd.conf,v 1.20 2018/06/13 15:08:24 reyk Exp $ # simplified for serving 'install.conf' server "example.com" { listen on * port 80 location * { directory auto index } } Code:
hp_server# rcctl enable httpd hp_server# cat /etc/rc.conf.local httpd_flags= xenodm_flags= hp_server# rcctl start httpd httpd(ok) hp_server# netstat -an -f inet | grep '\.80' tcp 0 0 *.80 *.* LISTEN
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
Additional tip or note:
I had a lot of trouble when I used the various "examples", for my install.conf, all though it was connecting and finding the file ok, it would get to a point and error with something like "not a valid response", or "no response",... So any way, what I finally did was start a install, normal, manually, and I made notes of my responses, and the order, etc, so then I used those notes to make my install.conf file. Hope that makes sense, another thing that helped me, when it aborted, it does show a path to a log, and that log showed me which response, or lack of response triggered the error. The only thing I have not figured out, if anyone knows: When I start the Autoinstall, and it prompts for the location of the "install.conf" file, it gives me a default url, that is not correct for me, so I have to manually type in the url. Is there a way to modify the Autoinstall, so that it has the correct url for me ? if the manual explains on that, I am not seeing it, or understanding it . Thanks
__________________
My best friends are parrots |
|
|||
Quote:
|
Tags |
autoinstall, guide, install.conf, not working, openbsd |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autoinstall, best thing since sliced bread. | fvgit | OpenBSD Installation and Upgrading | 0 | 10th January 2017 01:27 AM |
autoinstall in virtualbox | mfaridi | OpenBSD Installation and Upgrading | 6 | 12th July 2015 10:45 PM |
OpenBSD autoinstall | J65nko | OpenBSD Installation and Upgrading | 4 | 12th December 2014 01:15 AM |
*pkg removal .. when is it an obligatory step? | daemonfowl | OpenBSD Installation and Upgrading | 6 | 8th May 2012 03:51 AM |
phpMyAdmin 3.4.0 is a "huge step" | J65nko | News | 0 | 12th May 2011 07:19 PM |