Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenBSD.md #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Update OpenBSD.md #12

wants to merge 4 commits into from

Conversation

pkubaj
Copy link

@pkubaj pkubaj commented Aug 29, 2017

Update of OpenBSD doc to describe autoinstall mode.

@pietrushnic
Copy link
Member

@miczyg1 please test updated procedure.

docs/OpenBSD.md Outdated
wget http://ftp.icm.edu.pl/pub/OpenBSD/5.9/amd64/bsd.rd
wget http://ftp.icm.edu.pl/pub/OpenBSD/5.9/amd64/pxeboot
wget http://ftp.icm.edu.pl/pub/OpenBSD/6.1/amd64/bsd.rd
wget http://ftp.icm.edu.pl/pub/OpenBSD/6.1/amd64/pxeboot
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkubaj You have changed BSD version to 6.1, so please update it also in PXE menu.cfg

docs/OpenBSD.md Outdated

5. In order to use Autoinstall mode, a few more adjustments need to be made.

The binary you set to load in "filename" directive in DHCP server needs to be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkubaj What if I do not have DHCP running?

@@ -48,23 +48,14 @@ Install OpenBSD over PXE
menu default
kernel OpenBSD/amd64/pxeboot.0
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkubaj consider adding some earlyprint over COM. I have no idea if the booting is proceeding or not when I run that menu option.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the option in PXELINUX or the autoboot option in iPXE? Generally, both load very quickly and it's usually you environment (dhcpd or tftpd configuration) which is bad.

docs/OpenBSD.md Outdated

5. In order to use Autoinstall mode, a few more adjustments need to be made.

The binary you set to load in "filename" directive in DHCP server needs to be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkubaj what if I do not have a DHCP server running?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this procedure, it won't work. I'll prepare another one, for when there's no DHCP.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify now.

@@ -48,23 +48,14 @@ Install OpenBSD over PXE
menu default
kernel OpenBSD/amd64/pxeboot.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkubaj please consider adding some earlyprint over COM. Running this option in PXE menu causes no output and restarts apu2 after a while

@miczyg1
Copy link
Member

miczyg1 commented Aug 31, 2017

I could not reproduce the procedure to boot BSD installation. Possible reason is that I have no DHCP server running. @pkubaj think about some workaround so I could try it too.

Copy link
Author

@pkubaj pkubaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed version to 6.1 and whitespace fix. Another procedure for use without DHCP will be prepared later.

Add info about SHA256, signatures and booting without DHCP.
Copy link
Author

@pkubaj pkubaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add info about signatures, SHA256 and booting without DHCP.

@@ -48,23 +48,14 @@ Install OpenBSD over PXE
menu default
kernel OpenBSD/amd64/pxeboot.0
```
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the option in PXELINUX or the autoboot option in iPXE? Generally, both load very quickly and it's usually you environment (dhcpd or tftpd configuration) which is bad.

docs/OpenBSD.md Outdated

5. In order to use Autoinstall mode, a few more adjustments need to be made.

The binary you set to load in "filename" directive in DHCP server needs to be
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify now.

Note that it has to be in tftpd root directory, not the directory where bsd
files are!

You need to adjust IP's and netmask to your own environment.
3. Boot configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkubaj add a new line before "3. Boot configuration" because it appends to the previous line.

@miczyg1
Copy link
Member

miczyg1 commented Sep 1, 2017

I still could not reproduce it. Steps I did:

  1. Download pxeboot and bsd.rd
  2. Copy to netboot directory and rename to pxeboot.0 and bsd
  3. Reate symlink auto_install to pxeboot.0
  4. Add entry in the menu:
    label open-bsd
    menu label ^OpenBSD-6.1
    menu default
    kernel pxeboot.0
  5. Create install.conf and put in netboot directory
  6. Power up apu2 board and enter ipxe shell
  7. Type commands:
    dhcp net0 --- (because I have added static IP address to aup2c MAC)
    set filename pxelinux.0
    set next-server 192.168.0.109 --- (docker host ip)
    chain tftp://${next-server}/${filename}
    8 Choose OpenBSD-6.1 option

Note: changing filename to pxeboot.0 or auto_install results in reboot after ~15 seconds.
Providing pxelinux.0 as filename allows me to get PXE menu. Choosing option OpenBSD-6.1
either with kernel pxeboot.0 or kernel auto_install causes reboot of the APU board.

@pkubaj
Copy link
Author

pkubaj commented Sep 1, 2017

To simplify things, I set up to only boot OpenBSD directly from dhcpd. Here's my environment:
dhcpd.conf

default-lease-time 604800;
option ntp-servers 192.168.0.1;
option domain-name-servers 192.168.0.1;
subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers 192.168.0.1;
        range 192.168.0.4 192.168.0.254;
	filename "auto_install";
}

My TFTP root:

lrwxr-xr-x   1 pkubaj  pkubaj         7 Sep  1 19:35 auto_install -> pxeboot
-rw-r--r--   1 pkubaj  pkubaj   9431142 Aug 24 21:05 bsd
-rwxr-xr-x   1 pkubaj  pkubaj     24560 Aug 24 08:51 chain.c32
drwxr-xr-x   3 pkubaj  pkubaj       512 Jul 19 20:10 debian-installer
drwxr-xr-x   2 pkubaj  pkubaj       512 Aug 24 21:00 etc
drwxr-xr-x   3 pkubaj  wheel        512 Aug 29 18:58 images
-rw-r--r--   1 pkubaj  pkubaj    122308 Aug 29 19:11 ldlinux.c32
-rwxr-xr-x   1 pkubaj  pkubaj    181944 Aug 24 19:14 libcom32.c32
-rwxr-xr-x   1 pkubaj  pkubaj     23628 Aug 24 19:14 libutil.c32
-rwxr-xr-x   1 pkubaj  pkubaj     26596 Aug 24 08:51 menu.c32
-rw-r--r--   1 pkubaj  pkubaj  29780689 Aug 23 21:33 netboot.tar.gz
-rw-r--r--   1 pkubaj  pkubaj     97996 Sep  1 19:34 pxeboot
-rw-r--r--   1 pkubaj  pkubaj     42146 Sep  1 19:31 pxeboot.0
lrwxr-xr-x   1 pkubaj  pkubaj        33 Jul 19 20:10 pxelinux.0 -> debian-installer/amd64/pxelinux.0
lrwxr-xr-x   1 pkubaj  pkubaj        35 Jul 19 20:10 pxelinux.cfg -> debian-installer/amd64/pxelinux.cfg
-rwxr-xr-x   1 pkubaj  pkubaj      1376 Aug 24 08:51 reboot.c32
drwxr-xr-x  33 pkubaj  pkubaj      1024 Oct  6  2014 syslinux-6.03
-rw-r--r--   1 pkubaj  pkubaj        62 Jul 19 20:10 version.info
-rwxr-xr-x   1 pkubaj  pkubaj     26684 Aug 24 19:17 vesamenu.c32

pxeboot is this file:
https://mirror.leaseweb.com/pub/OpenBSD/6.1/amd64/pxeboot
bsd is this file:
https://mirror.leaseweb.com/pub/OpenBSD/6.1/amd64/bsd.rd
This should be all you need to boot via PXE.

Copy link
Author

@pkubaj pkubaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some corrections, putting auto_install to dhcpd.conf gives me:

Failed to load ldlinux.c32

Unfortunately, this introduces another Enter that user needs to press.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants