OpenWrt Forum Archive

Topic: PXE Booting wiki not working for me

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello i am new to the forums, been using openwrt for over a month, i tried dd-wrt also but i don't like the fact that i have to install new packages manually although i feel dd-wrt is a more complete firmware to a newbie like me. Openwrt comes already with OPKG installed smile

D-Link DIR-835 A1 BARRIER BREAKER (14.07, r42625)
syslinux-6.03
portmap 6.0-4
nfs-kernel-server 1.3.0-1
odhcpd 2014-08-23
dnsmasq 2.71-4
firewall 2014-09-19
kernel 3.10.49-1

I am running a few packages like samba, openssh and luci-ssl, it's working. I am trying to get the PXE Boot working but i am facing a "file not found error". I followed this guide from the openwrt wiki:
http://wiki.openwrt.org/doc/howto/tftp.pxe-server

The part i didn't touch was about the USB mount section since i am already running samba, the usb stick is already mounted and working as EXT4 file format. I did not edit /etc/fstab.

/dev/sda3                27.4G      1.4G     24.6G   5% /mnt/storage

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock5 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda3 on /mnt/storage type ext4 (rw,sync,noatime)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)


When i start the laptop using the network PXE mode, it loads and i see the PXE menu from OpenWRT. But when it comes to running an installers it just fails saying file not found error (or similar phrase)...

Here is my pxelinux.cfg/default file:

DEFAULT vesamenu.c32
PROMPT 0
MENU BACKGROUND pxelinux.cfg/background.png
MENU TITLE PXE-Boot Menu
TIMEOUT 600
ONTIMEOUT BootLocal
NOESCAPE 1

label LocalHD
        MENU LABEL Boot from local hard drive
        localboot 0
        TEXT HELP
                Boot from local hard drive
        ENDTEXT

label Ubuntu
        MENU LABEL Ubuntu Live 14.04 32-Bit
        KERNEL ubuntu/casper/vmlinuz
        APPEND boot=casper ide=nodma netboot=nfs nfsroot=192.101.0.2:/mnt/storage/home/PXE-Boot/tftp/disks/ubuntu/ initrd=disks/ubuntu/casper/initrd.lz noipv6
        TEXT HELP
                Starts Ubuntu Linux - version 14.04 32-Bit
        ENDTEXT

label OpenELEC
    MENU LABEL OpenELEC Media Center
    KERNEL openelec/KERNEL
    APPEND ip=dhcp boot=NFS=192.101.0.2:/mnt/storage/home/PXE-Boot/tftp/disks/openelec disk=NFS=192.101.0.2:/mnt/storage/home/PXE-Boot/tftp/disks/openelec/storage overlay noipv6
    TEXT HELP
        Starts OpenELEC Media Center - version generic 4.2.1
    ENDTEXT

/etc/config/dhcp

config dnsmasq
        option enable_tftp '1'
        option tftp_root '/mnt/storage/home/PXE-Boot/tftp'
        option dhcp_boot 'pxelinux.0'

config boot 'linux'
        option filename 'pxelinux.0'
        option serveraddress '192.101.0.2'
        option servername 'deployment'
        list   dhcp_option 'option:root-path,192.101.0.2:/mnt/storage/home/PXE-Boot/tftp'

/etc/config/firewall

config rule
        option name 'pxe-boot'
        option target 'ACCEPT'
        option proto 'udp'
        option dest_port '69'
        option src 'lan'

config rule
        option name 'openelec'
        option src 'lan'
        option proto 'tcp'
        option dest_port '111'
        option target 'ACCEPT'

/etc/exports

/mnt/storage/home/PXE-Boot/tftp  *(ro,async,no_subtree_check)


Can anybody help me get this setup properly please.


*** i don't know if this matters to what i am trying to setup right now (PXE) but i want to install STUNNEL and OpenVPN after.. will the PXE configuration change?

(Last edited by bcus on 17 Nov 2014, 07:11)

hi

tcp port 111 is portmap, you need to open other ports  or port range for accessing  nfs service ( I found that http://wiki.openwrt.org/doc/howto/nfs.server)

for my though, run live linux on nfs openwrt will be slow...you will take long time to boot (compare to locale  boot or decent NAS)

PXE configure would not change for stunnel/openvpn, but you expect to boot on pxe tough a vpn , for some remote hosts ? if so, maybe firewall rules  may need to be added...

Brice

The discussion might have continued from here.