# PXE problem



## andrebarradas (Jul 4, 2013)

Hello everyone,

I'm trying to configure _a_ PXE Server. I configured DHCP and TFTP. I'm trying to install SmartOs via PXE. When *I* boot one machine over _the_ network *I* can see that *I* received TCP/IP configurations, but when it tries to download _the_ image boot file *I* get an error as you can see in _the_ attachments. I'm not sure if is some TFTP configuration or not. *I* followed this tutorial:

http://blog.smartcore.net.au/smartos-network-boot-with-pxe/

I installed _A_pache and from _a_ browser *I* can access my PXE server and download the boot image.

I appreciate who can help me, this is very important 

PS.: If you need further information to help solve my problem just tell me and *I*'ll give you what you need*.*

My best regards,

AndrÃ© Barradas


----------



## wblock@ (Jul 4, 2013)

That tutorial has remarkable similarities to mine: PXE Booting Utilities With FreeBSD.  I apologize for being annoyed enough at the lack of credit that I can't really concentrate on the question right now.


----------



## andrebarradas (Jul 4, 2013)

I found that tutorial on Internet, but thanks for give that link too  But I'll be glad if someone knows what can be the problem here. By the way I'm using virtual machines with Vmware Player.


----------



## wblock@ (Jul 6, 2013)

Why are you using VMWare player rather than VirtualBox?


----------



## andrebarradas (Jul 6, 2013)

do i will Will I have problems if *I* use _VM_ware instead of _V_irtual_B_ox? *I* don*'*t have any reason to use _VM_ware, just because *I* used it before in my classes, _I_ don't have any preference... _BTW_ *I* advanced in my problem, now *I* got this problem:
http://img33.imageshack.us/img33/2424/fu8i.jpg


----------



## wblock@ (Jul 7, 2013)

andrebarradas said:
			
		

> Will I have problems if I use VMware instead of VirtualBox?



Maybe not.  I don't know, I use VirtualBox and know that it works there.



> BTW I advanced in my problem, now I got this problem:
> http://img33.imageshack.us/img33/2424/fu8i.jpg



That is a new problem, Ubuntu failing to boot.  Without knowing what is in /usr/tftpboot/pxelinux.cfg/default, it's hard to identify the problem.  I suggest following my PXE article in post #2, the procedures were tested.


----------



## nORKy (Jul 9, 2013)

*Y*our gPXE version is old. Try iPXE*.*


----------



## andrebarradas (Jul 9, 2013)

I'm go_ing to_ try to use iPXE with _the_ tutorial that @wblock gave.


----------



## wblock@ (Jul 9, 2013)

To get the menus, see this: https://coderwall.com/p/0sq9gg.  A Linux system is needed to build it, or a net-booted VM.  But it's still a pain.


----------



## andrebarradas (Jul 10, 2013)

When I tried to boot Xubuntu, an error appeared saying 
	
	



```
(initramfs)Unable to find a medium containing a live file system
```


----------



## andrebarradas (Jul 10, 2013)

```
label xubuntu
  menu label Xubuntu
  kernel memdisk
  initrd [url]http://192.168.61.198/images/xubuntu-13.04-desktop-i386.iso[/url]
  append iso raw
```

This is what I have in menu, I tried with kernel vmlinuz but it didn't run when I press xubuntu in the client. With memdisk it started, *X*ubuntu started loading, but after that it gave that error above.


----------



## wblock@ (Jul 10, 2013)

With the information you have given, there is just no way to tell what the problem might be.  It could be that some of the configuration was missed, or file permissions.  I've found with Syslinux that I had to rename some files to 8.3 format or they would not be found.


----------



## andrebarradas (Jul 10, 2013)

Which information do you need to help me to solve this problem?


----------



## wblock@ (Jul 10, 2013)

I just tested here, and XUbuntu 13.04 does not load from a CD.  It works fine with NFS as shown in my article:

```
label xubuntu
  menu label XUbuntu
  kernel http://192.168.1.1/images/xubuntu/casper/vmlinuz
  append boot=casper netboot=nfs nfsroot=192.168.1.1:/usr/tftpboot/images/xubuntu
  initrd http://192.168.1.1/images/xubuntu/casper/initrd.lz
```

/etc/exports

```
/usr/tftpboot -alldirs,ro -mapall=nobody:nobody -network 192.168.1.1/24
```


----------



## andrebarradas (Jul 10, 2013)

I tried that before but it gave problems as well. I'll try again and if I have problems again I'll post again.


----------



## andrebarradas (Jul 10, 2013)

Well, when I'm booting FreeBSD I can see that I got an message while booting that says 
	
	



```
NFSv4 is disabled
```
and I had enable in /etc/rc.conf like in tutorial. What's happening?


----------



## andrebarradas (Jul 10, 2013)

I tried to do what you said, and when XUbuntu is booting it gives some messages saying 
	
	



```
nfsmount:need a path
```
 sequentialy. It gives like 20 messages like that and then it says 
	
	



```
(initramfs done) Unable to find a live file system on the network
```


----------



## wblock@ (Jul 10, 2013)

Did you mount the CD and copy the files from it to the /usr/tftpboot/images/xubuntu/ directory?


----------



## andrebarradas (Jul 10, 2013)

wblock@ said:
			
		

> Did you mount the CD and copy the files from it to the /usr/tftpboot/images/xubuntu/ directory?



Problem solved... Thanks a lot for your help. 

BTW, this is for my final project of course and I'm doing two different solutions. One to boot *L*inux like this and another one to boot a *W*indows systems. I'm using Windows Deployment Services. Have you done something to boot Windows or you just know for Unix?

Thanks in advance


----------



## wblock@ (Jul 10, 2013)

Sorry, I have no idea how to boot Windows in a PXE environment.  It would be pretty hilarious to see it running on NFS, if that is even possible.


----------



## kpa (Jul 10, 2013)

Not possible directly with an NFS share because the root filesystem has to be either FAT32 or NTFS. Exporting a block device (ZVOL for example) with iSCSI is the way as far as I know.


----------



## andrebarradas (Jul 10, 2013)

BTW, just one question about PXE server in FreeBSD. In dhcpd.conf I have an option root-path pointing to /usr/tftpboot/images/xubuntu, but I want to have another Linux distro, for example Fedora, how can I change that option, if I create a directory named Fedora in /usr/tftpboot/images?


----------



## wblock@ (Jul 10, 2013)

Look at post #14.  The nfsroot parameter sets the base directory.


----------



## andrebarradas (Jul 12, 2013)

*B*ut in DHCP options you don't need to give an option like 
	
	



```
option root-path "/usr/tftpboot/images/xubuntu/";
```
?


----------



## andrebarradas (Jul 12, 2013)

I mean, if *I* have a directory like /usr/tftpboot/images/xubuntu with *X*ubuntu files after mount and another file with /usr/tftpboot/images/ubuntu with *U*buntu files after mount in /usr/tftpboot/pxelinux.cfg/default *I*'ll have this:


```
label xubuntu
  menu label XUbuntu
  kernel images/xubuntu/vmlinuz
  append boot=casper netboot=nfs nfsroot=192.168.61.198:/usr/tftpboot/images/xubuntu
  initrd images/xubuntu/initrd.lz

label ubuntu
  menu label ubuntu
  kernel images/ubuntu/vmlinuz
  append boot=casper netboot=nfs nfsroot=192.168.61.198:/usr/tftpboot/images/ubuntu
  initrd images/uubuntu/initrd.lz
```

But what I need to have in /etc/exports and in option root-path of DHCP? How *I* say in DHCP options that I have two images to boot?


----------



## wblock@ (Jul 12, 2013)

I think some PXE loaders can look for other options for the root-path, but have not investigated it.


----------



## andrebarradas (Jul 12, 2013)

*S*o I have no chances to have two different operating systems in the menu.


----------



## wblock@ (Jul 13, 2013)

No, you'll just have to research it.


----------

