LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PXE boot with pfSense and Slack (https://www.linuxquestions.org/questions/slackware-14/pxe-boot-with-pfsense-and-slack-830395/)

lpallard 09-04-2010 09:44 PM

PXE boot with pfSense and Slack
 
Hello!

I am trying to setup a PXE booting environment in my network and I almost got it to work... Only it does not quite work yet... Basically, I want my laptop or any other machines to boot from my network. I followed the instructions from AlienBob to do so.

I setup my laptop to boot from the NIC, it automatically gets an IP from the DHCP server (pfSense);

I setup my gateway/DHCP server (pfSense) as is:
-The IP address from the network boot server: 192.168.0.101 (the server where my slackware mirror and all tftp boot files are)
-The filename used for network booting: /mnt/it-maintenance/tftpboot/slackware-13.1/pxelinux.0 (the absolute address of pxelinux.0 in my server)

I setup the network boot server (running slack 13.1) as is:
-uncommented the line in inetd.conf to have:
Code:

tftp  dgram  udp    wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize
-added a NFS share to /etc/exports to have:
Code:

/mnt/it-maintenance/operating-systems/slackware-13.1
192.168.0.106(ro,sync,insecure,all_squash)

-and finally in /mnt/it-maintenance/tftpboot/ I have a folder named slackware-13.1 which contains:
Code:

-rw-r--r-- 1 root root    1697 2010-07-04 22:26 README.TXT
-rw-r--r-- 1 root root      41 2010-07-04 22:26 VERSIONS.TXT
-rwxr-xr-x 1 root root    2311 2010-07-04 22:26 compile_kern.sh
-rw-r--r-- 1 root root      793 2010-07-04 22:26 f2.txt
drwxr-xr-x 2 root root      128 2010-09-04 21:53 huge.s
drwxr-xr-x 2 root root      128 2010-09-04 21:53 hugesmp.s
-rw-r--r-- 1 root root 16902288 2010-07-04 22:26 initrd.img
-rw-r--r-- 1 root root    99315 2010-07-04 22:26 loadlin16d.zip
-rw-r--r-- 1 root root      758 2010-07-04 22:26 message.txt
-rw-r--r-- 1 root root    16466 2010-01-25 15:34 pxelinux.0
drwxr-xr-x 2 root root      72 2010-09-04 21:54 pxelinux.cfg
drwxr-xr-x 2 root root      160 2010-09-04 21:53 speakup.s

Now when I try to boot from that my laptop complains with:

PXE-E32: TFTP open timeout

According to google, E32 error means that the machine found a boot file but could not download it...

What do I need to do to make it work???

XGizzmo 09-04-2010 10:03 PM

tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot -r blksize

Note the -s /tftpboot that is more or less a chroot. All your tftpboot files have to
be located in /tftpboot.

lpallard 09-04-2010 10:18 PM

Well that did it! but now I have a new problem...

I booted and got to the "boot:" prompt... I pressed enter to select the default hugesmp.s and it said:

Could not find kernel image: kernels/hugesmp.s/bxImage

and the content of pxelinux.cgf/default is:

Code:

default hugesmp.s
prompt 1
timeout 1200
display message.txt
F1 message.txt
F2 f2.txt
label huge.s
  kernel kernels/huge.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=huge.s
label hugesmp.s
  kernel kernels/hugesmp.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=hugesmp.s
label speakup.s
  kernel kernels/speakup.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=speakup.s

I imagine the "kernels" prefixes are wrong.. what should I modify to?

lpallard 09-04-2010 10:51 PM

got it! I just removed the /kernels from the addresses... the root was already at the good place... now that I can almost have a perfect setup I noticed before it display the welcome messages, I see some messages:
Code:

Trying to load: pxelinux.cfg/01-00-a0-cc-de-21-39
Trying to load: pxelinux.cfg/C0A8010F
Trying to load: pxelinux.cfg/C0A8010
Trying to load: pxelinux.cfg/C0A801
Trying to load: pxelinux.cfg/C0A80
Trying to load: pxelinux.cfg/C0A8
Trying to load: pxelinux.cfg/C0A
Trying to load: pxelinux.cfg/C0
Trying to load: pxelinux.cfg/C
Trying to load: pxelinux.cfg/default

what does it mean?

XGizzmo 09-05-2010 05:34 AM

That is pxelinux looking for a specific configuration based on mac address then ip address in hex.

lpallard 09-05-2010 08:56 AM

So it does not represent a problem then?

Now that I have a working setup, how complicated it would be to have the opportunity to boot other kind of troubleshooting appz like clonezilla, slax live distro, UBCD, etc??

Alien Bob 09-05-2010 10:25 AM

Quote:

Originally Posted by lpallard (Post 4088613)
So it does not represent a problem then?

No, that text does not indicate a problem - on the contrary it shows that you can create a per-computer PXE configuration file, instead of using the file "default" for all connecting PXE clients.

Quote:

Now that I have a working setup, how complicated it would be to have the opportunity to boot other kind of troubleshooting appz like clonezilla, slax live distro, UBCD, etc??
Just add more boot entries to your pxelinux.cfg/default file (and copy the corresponding kernels/images into your /tftpboot directory).

For instance, this is my /tftpboot/pxelinux.cfg/default file:
Code:

default hugesmp.s
prompt 1
timeout 1200
display slackware64-current/message.txt
F1 f1.txt
F2 slackware-current/f2.txt
F3 slackware64-current/f2.txt
F4 pmagic-pxe-4.5/boot/syslinux/message.txt
F5 pmagic-pxe-4.5/boot/syslinux/message2.txt
F6 pmagic-pxe-4.5/boot/syslinux/message3.txt
F7 pmagic-pxe-4.5/boot/syslinux/message4.txt
F8 pmagic-pxe-4.5/boot/syslinux/message5.txt

label huge.s
  kernel slackware-current/kernels/huge.s/bzImage
  append initrd=slackware-current/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=huge.s

label hugesmp.s
  kernel slackware-current/kernels/hugesmp.s/bzImage
  append initrd=slackware-current/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=hugesmp.s

label slack64
  kernel slackware64-current/kernels/huge.s/bzImage
  append initrd=slackware64-current/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=huge.s

label pmagic
  kernel pmagic-pxe-4.5/pmagic/bzImage
  append initrd=pmagic-pxe-4.5/pmagic/initramfs load_ramdisk=1 prompt_ramdisk=0 rw sleep=10 livemedia

label memtest
  kernel memtest/memtest

and this is my f1.txt:
Code:

----| Boot Options |-----------------
|                                  |
| hugesmp.s  - slackware-current    |
| huge.s    - slackware-current    |
| slack64    - slackware64-current  |
| pmagic    - PartEd Magic        |
| memtest    - memtest86+          |
|                                  |
-------------------------------------

<F1> this menu  <F2> slackware-current help  <F3> slackware64 help
<F4> pmagic help <F5>, <F6>, <F7> and <F8> pmagic additional help

Default image (hugesmp.s) will boot in 120 seconds...

Eric

lpallard 09-05-2010 02:43 PM

hey Eric! Thanks for the instructions! Precious stuff...
I guess since I am going deeper into this, now I have several questions:

1-I added Clonezilla to my PXE setup and it kinda works but when I type "clonezilla" to the boot: prompt, it seems to load the kernel and work fine until I can read "Enter 1 to select a keyboard map". From a USB keyboard, I wont be able to type anything at this point...
Is this normal that the USB attached keyboard does not work? it works with all the other slackware kernels...

Edit to #1: Solved.. it does that for anything before the USB driver is loaded..

2-Also just before this prompt, I can read:
Code:

/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with Kernel device-mapper driver.

Is that normal?

lpallard 09-28-2010 11:13 AM

Thanks Eric (and all the others) for your help!


All times are GMT -5. The time now is 05:13 PM.