PXE troubles

Hello,

I need to install some machines via pxe+network. I wanted to try the setup of an install.cfg in a virtualbox host, but I'm having some troubles getting pxe-boot to work.

VirtualBox reports that it can't load the pxeboot file, but it can load and execute the pxelinux.0 file just fine. I then tried the same on my old laptop, and the same problem here, although the pxeboot file results in a loop with assembly all over the screen. pxelinux.0 still works.

I've tried with a pxeboot file built on the following machine/OS combos:
  • 7.1-RELEASE i386 cdrom
  • 8.0-STABLE amd64
  • 8.0-RELEASE-p2 i386
However a pxeboot file from 4.11 worked. One difference I can spot is the size difference, newer files seems to be much bigger.

Anyone else noticed any problems? Any ideas?

Best regards
andrnils
 
I use PXE booting all the time on my office network. Right now I'm using FreeBSD 7.3-RELEASE amd64. I've been able to pxe boot ESXi and Vmware workstation virtual machines with no problem. I've also booted several physical boxes off of the network too.

In my dhcpd.conf for the subnet section these hosts are on, I have these options:

Code:
        next-server 192.168.100.15;
        filename "/boot/pxeboot";
        option root-path "192.168.100.15:/freebsd/tftproot";

On 192.168.100.15 I have inetd(8) configured to run tftpd(8) and ftpd(8) for fetching the boot/pxeboot file, and then doing an ftp installation from my local ftp server. The inetd.conf configuration looks like this:

Code:
ftp     stream  tcp     nowait  root    /usr/libexec/ftpd       ftpd -l
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /freebsd/tftproot

I also have nfs configured via /etc/exports to allow nfs mounts for the /freebsd filesystem. This is so pxeboot can transfer the mfsroot image over nfs.

Code:
/freebsd -maproot=root -network 192.168.100.0 -mask 255.255.255.0 -alldirs
 
Ok, that is encouraging.

I guess that my hardware (t61p) and virtualbox-3.1.8-ose on freebsd are somehow flawed then.

Did you specify the LOADER_TFTP_SUPPORT when you built the loader? Without that I cant seem to get even the kernel over tftp. For me it would be ideal to get the necessary files over tftp ( loader.rc loader.conf kernel mfsroot and friends ), and then use ftp for install, i.e. I would rather avoid nfs if possible.

It does get the loader.rc file, but I don't think it fetches loader.conf. I'm unsure if it gets the mfsroot, but the boot fail as no root is specified.

Best regards
andrnils
 
andrnils said:
Did you specify the LOADER_TFTP_SUPPORT when you built the loader? Without that I cant seem to get even the kernel over tftp. For me it would be ideal to get the necessary files over tftp ( loader.rc loader.conf kernel mfsroot and friends ), and then use ftp for install, i.e. I would rather avoid nfs if possible.

No, I'm using the stock /boot directory copied to /freebsd/tftproot/ right off the 7.3-RELEASE ISO image.

The only thing special I had to do was a:

Code:
find /freebsd/tftproot -type f -print0 | xargs -0 -n 1 chmod 644
find /freebsd/tftproot -type d -print0 | xargs -0 -n 1 chmod 755

To make sure all the files where readable by the tftp daemon.

Concidering your having problems now, I'd suggest you try to keep it as "stock" as possible to eliminate untested configurations.

andrnils said:
It does get the loader.rc file, but I don't think it fetches loader.conf. I'm unsure if it gets the mfsroot, but the boot fail as no root is specified.


My /freebsd/tftproot/boot/loader.conf looks like this:

Code:
# loader.conf
mfsroot_load="YES"
mfsroot_type="mfs_root"
mfsroot_name="/boot/mfsroot"
vfs.root.mountfrom="ufs:/dev/md0c"
beastie_disable="YES"
autoboot_delay="3"

If your not giving it an mfsroot, then it will blow up after the kernel hardware probe because it doesn't know what the root device is.
 
Hi,

I copied the /boot from my install media, and things now seems to be working better, thanks! I must have missed something doing it by hand...

I still had to use a pxeboot compiled with LOADER_TFTP_SUPPORT to get the mfsroot over tftp. Now I've set up my install.cfg to do the rest ( setup partitions, ftp-path and distributions ), now the only trouble seems to be the actual getting of files over ftp, as the the transfer hangs transfering the base distribution. But as this is just a proof of concept that doesn't really matter, I'll try it in the real setup after my exams.

Thanks again!

Best regards
andrnils
 
Back
Top