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

Create PfSense.md #13

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

Create PfSense.md #13

wants to merge 7 commits into from

Conversation

pkubaj
Copy link

@pkubaj pkubaj commented Aug 30, 2017

This PR adds the configuration necessary to boot the PfSense install ISO.

docs/PfSense.md Outdated
In order to boot PfSense via PXE and use unattended install,
you need the following:

1. Extracted PfSense installation ISO exported via NFS.
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 provide link to PfSense image you tested, so there will be no confusion in future. Please provide method of extracting or link to relevant documentation in the web.

label PfSense
menu label PfSense
pxe images/pfsense/boot/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 why don't you add this entry to our configuation of PXE server ?

Copy link
Author

Choose a reason for hiding this comment

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

sure

The path `images/pfsense/boot/pxeboot` is relative to TFTP root directory.
It's a path to the PXE loader in the extracted PfSense installation image.

Unfortunately, there's no mechanism for unattended installation of PfSense.
Copy link
Member

Choose a reason for hiding this comment

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

@pkubaj any reference about that ?

Copy link
Author

Choose a reason for hiding this comment

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

There's just no reference to unattended installation in the docs or in the official forum. It's possible though too install with Foreman.
https://doc.pfsense.org/index.php/Installing_pfSense - nothing here
Other people also ask about it:
https://forum.pfsense.org/index.php?topic=87212.0
https://forum.pfsense.org/index.php?topic=61112.0
https://forum.pfsense.org/index.php?topic=66024.0

Also, OPNSense, which forked from PfSense, also doesn't support it.

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 add this information as note to documentation. It would be very helpful for future developers.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

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.

I removed a comment promising that this how to documents unattended installation.

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 the FS to the real one.

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 SHA256.


In order to extract the contents, you need to mount
the ISO with following commands (example from FreeBSD):
`mount_cd9660 /dev/$(mdconfig -a -t vnode -f pfSense-CE-2.3.4-RELEASE-amd64.iso) /mnt`
Copy link
Member

Choose a reason for hiding this comment

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

@pkubaj on Debian like systems it would be easier to use this:
mount -o loop pfSense-CE-2.3.4-RELEASE-amd64.iso /mnt and then rsync.
It also mounts an ISO image to target directory and creates a device node with name loopX.
I do not have mount_cd9660 command.
I got some errors when running rsync:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

Copy link

Choose a reason for hiding this comment

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

Considering that most of our target audience (and our validation team) use Linux, please provide examples using some modern, popular distro (e.g. Debian). FreeBSD examples are also welcome, but shouldn't be the only one - sorry :)

Copy link

Choose a reason for hiding this comment

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

@miczyg1 it looks that rsync couldn't transfer some files attributes exactly (like read/write/execute permissions).

Copy link
Author

Choose a reason for hiding this comment

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

@mek-x is right and this shouldn't really matter.

You need to have `rsync` installed.

2. Relevant entry in DHCP server config:
`option root-path /srv/tftp/images/pfsense;`
Copy link
Member

Choose a reason for hiding this comment

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

@pkubaj I would appreciate to prepare a solution for a network without running DHCP server on linux machine. Please provide necessary kernel command line with nfs options if possible. I will be able then to reproduce it

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, this time you must adjust to the standard :)
https://www.freebsd.org/doc/handbook/network-diskless.html
"In order to provide the files needed for an operating system to boot over the network, a PXE setup also requires properly configured DHCP, TFTP, and NFS servers"


In order to extract the contents, you need to mount
the ISO with following commands (example from FreeBSD):
`mount_cd9660 /dev/$(mdconfig -a -t vnode -f pfSense-CE-2.3.4-RELEASE-amd64.iso) /mnt`
Copy link

Choose a reason for hiding this comment

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

Considering that most of our target audience (and our validation team) use Linux, please provide examples using some modern, popular distro (e.g. Debian). FreeBSD examples are also welcome, but shouldn't be the only one - sorry :)

1. Download ISO from https://nyifiles.pfsense.org/mirror/downloads/pfSense-CE-2.3.4-RELEASE-amd64.iso.gz

You should also check the SHA256 hash:
`sha256 -c 610b2a8c696e1d1854845d553ce8540debaab9d78ed6c15ce83872eaeac9d05f pfSense-CE-2.3.4-RELEASE-amd64.iso.gz`
Copy link

Choose a reason for hiding this comment

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

I believe this is redundant. Please choose between providing the hash in command to execute or asking people to check it using the site. IMHO, I'm not a huge fan of putting such "harcoded" values in documentation (it's doing redundancy with the image owner's site).

Copy link
Author

Choose a reason for hiding this comment

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

I have removed the info about website. SHA256 is hardcoded, because the command uses it.

docs/PfSense.md Outdated
@@ -0,0 +1,35 @@
In order to boot PfSense via PXE,
Copy link

Choose a reason for hiding this comment

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

PXE or iPXE? They're not exactly the same


In order to extract the contents, you need to mount
the ISO with following commands (example from FreeBSD):
`mount_cd9660 /dev/$(mdconfig -a -t vnode -f pfSense-CE-2.3.4-RELEASE-amd64.iso) /mnt`
Copy link

Choose a reason for hiding this comment

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

@miczyg1 it looks that rsync couldn't transfer some files attributes exactly (like read/write/execute permissions).

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.

Please check now.

@miczyg1
Copy link
Member

miczyg1 commented Oct 10, 2017

First thing: the iso mentioned in this paper is not appropiate. There is an image for memstick with serial console enabled: pfSense-CE-memstick-serial-2.3.4-RELEASE-amd64.img and this one should be downloaded.
The image can be mounted only with command: mount -t ufs -o loop,ufstype=5xbsd pfSense-CE-memstick-serial-2.3.4-RELEASE-amd64.img /path/.
I have prepared a DHCP server with correct root-path option, because it seems to be impossible to boot the installer without DHCP (when loading pxeboot, platform sends DHCP discover and request, like it is hardcoded; if no response with correct root-path received, the booting process hangs).
After placing pxeboot in TFTPROOT and whole filesystem in NFSROOT, I am able to boot installer and menu shows up. But nothing else happens, APU2 hangs on displaying menu. I found out that installer is calling for menu.rc.local file via NFS, but it is not present anywhere (neither in NFSROT nor in image file). However I was able to boot the installer system by burning the img to USB drive. It looks like USB booting and PXE booting have different boot paths.

@pietrushnic
Copy link
Member

@miczyg1 please update documentation.

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.

4 participants