www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

[2.0 RC3] PXE error

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Thu Aug 22, 2013 4:30 pm    Post subject: [2.0 RC3] PXE error Reply with quote

Hello,

I followed the guide to enable the tftp server.

My advanced dhcp options are like this :
Code:
if exists user-class and option user-class = "iPXE" {
    filename "menu.ipxe";
} else {
    filename "undionly.kpxe";
}


I have these files into /tftpboot :
Code:
tftpboot> ll
total 76
drwxr-xr-x    2 root     root         4096 Aug 22 17:25 memtest
-rw-r--r--    1 root     root         1218 Aug 22 17:42 menu.ipxe
drwxr-xr-x    3 root     root         4096 Aug 22 17:13 smartos
-rw-r--r--    1 root     root        64343 Oct  6  2012 undionly.kpxe


Here's my menu.ipxe :
Code:
#!ipxe

set smartos-build 20130808T195337Z

######## MAIN MENU ###################
:start
menu Welcome to iPXE's Boot Menu
item
item --gap -- ------------------------- Operating systems ------------------------------
item smartos    Boot SmartOS (${smartos-build})
item --gap -- ------------------------------ Utilities ---------------------------------
item shell      Enter iPXE shell
item reboot     Reboot
item --gap -- ---------------------------- Diagnostics ---------------------------------
item memtest    Memtest86+
item
item exit       Exit (boot local disk)
choose --default smartos --timeout 5000 target && goto ${target}


########## UTILITY ITEMS ####################
:shell
echo Type exit to get the back to the menu
shell
set menu-timeout 0
goto start

:reboot
reboot

:exit
exit

########## MENU ITEMS #######################
:smartos
kernel /smartos/${smartos-build}/platform/i86pc/kernel/amd64/unix -B root_shadow='$6$C0GGZZ0n$HV6Zkqdzw6aBtcTlyT60BMtxq0PmhvX1O4p2XFteOW2FwfgSIoUwB12BENYjbsK
0x19J/bZoJtJEaFvB8khSb.'
initrd /smartos/${smartos-build}/platform/i86pc/amd64/boot_archive
boot
goto start

########## DIAGNOSTICS ITEMS #################
:memtest
kernel /memtest/memtest86+
boot
goto start


Here's the boot error :
Code:

iPXE 1.0.0+ ..
Features: HTTP iSCSI DNS TFTP AoE bzImage ELF MBOOT PXE PXEXT Menu
...
net0: 192.168.1.26/255.255.255.0 gw 192.168.1.1
Filename: menu.ipxe
Could not start download: operation not supported
No more network devices


I don't understand why it can't find my menu.ipxe file.

Any hint ?

Thanks.
Back to top
View user's profile Send private message
renato.morano



Joined: 21 Apr 2011
Posts: 49

PostPosted: Fri Aug 23, 2013 7:38 am    Post subject: Reply with quote

Hi,

1) have you patch the dhcp as suggested by z.c ( http://www.zeroshell.org/forum/viewtopic.php?t=2989&highlight=dhcp+howto) ?

I did the same and works Wink http://www.renatomorano.net/?p=1944

I'll try to translate my post in English so can be more useful, too

ps.
after patch dhcpd, my advanced options are:
next-server IP_ZEROSHELL_ON_THE_SUBNET;
if exists user-class and option user-class = "iPXE" {
filename = "smartos.ipxe";
} else {
filename = "undionly.kpxe";
}
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Mon Aug 26, 2013 7:22 pm    Post subject: Reply with quote

I'll give it a try tomorrow, thanks Smile
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Tue Aug 27, 2013 8:12 am    Post subject: Reply with quote

I checked and i already applied this patch Smile
Back to top
View user's profile Send private message
renato.morano



Joined: 21 Apr 2011
Posts: 49

PostPosted: Tue Aug 27, 2013 9:14 am    Post subject: Reply with quote

Hi,

so after you applied the patch, you have added all these parameters in
your /Database/var/register/system/dhcp/Global_Parameters file

Code:
option space ipxe;
  option ipxe-encap-opts code 175 = encapsulate ipxe;
  option ipxe.priority code 1 = signed integer 8;
  option ipxe.keep-san code 8 = unsigned integer 8;
  option ipxe.skip-san-boot code 9 = unsigned integer 8;
  option ipxe.syslogs code 85 = string;
  option ipxe.cert code 91 = string;
  option ipxe.privkey code 92 = string;
  option ipxe.crosscert code 93 = string;
  option ipxe.no-pxedhcp code 176 = unsigned integer 8;
  option ipxe.bus-id code 177 = string;
  option ipxe.bios-drive code 189 = unsigned integer 8;
  option ipxe.username code 190 = string;
  option ipxe.password code 191 = string;
  option ipxe.reverse-username code 192 = string;
  option ipxe.reverse-password code 193 = string;
  option ipxe.version code 235 = string;
  option iscsi-initiator-iqn code 203 = string;
  # Feature indicators
  option ipxe.pxeext code 16 = unsigned integer 8;
  option ipxe.iscsi code 17 = unsigned integer 8;
  option ipxe.aoe code 18 = unsigned integer 8;
  option ipxe.http code 19 = unsigned integer 8;
  option ipxe.https code 20 = unsigned integer 8;
  option ipxe.tftp code 21 = unsigned integer 8;
  option ipxe.ftp code 22 = unsigned integer 8;
  option ipxe.dns code 23 = unsigned integer 8;
  option ipxe.bzimage code 24 = unsigned integer 8;
  option ipxe.multiboot code 25 = unsigned integer 8;
  option ipxe.slam code 26 = unsigned integer 8;
  option ipxe.srp code 27 = unsigned integer 8;
  option ipxe.nbi code 32 = unsigned integer 8;
  option ipxe.pxe code 33 = unsigned integer 8;
  option ipxe.elf code 34 = unsigned integer 8;
  option ipxe.comboot code 35 = unsigned integer 8;
  option ipxe.efi code 36 = unsigned integer 8;
  option ipxe.fcoe code 37 = unsigned integer 8;


in this case plase try to add in your DHCP advanced option also next-server IP_ZEROSHELL;
I have:

Code:
next-server 192.168.4.75;
    if exists user-class and option user-class = "iPXE" {
      filename = "smartos.ipxe";
    } else {
      filename = "undionly.kpxe";
    }


where 192.168.4.75 is IP of the zersoshell box

My menu.ipxe is smartos.ipxe

Code:
root@labtest tftpboot> cat smartos.ipxe
#!ipxe
# /tftpboot/smartos.ipxe.tpl

set smartos-build    20130808T195337Z
set smartos-latest   20130822T211238Z

######## MAIN MENU ###################
:start
menu Welcome to iPXE's Boot Menu
item
item --gap -- ------------------------- Operating systems ------------------------------
item smartos    Boot SmartOS (${smartos-build})
item smartos-latest    Boot SmartOS (${smartos-latest})
item --gap -- ------------------------------ Utilities ---------------------------------
item shell      Enter iPXE shell
item reboot     Reboot
item
item exit       Exit (boot local disk)
choose --default smartos-latest --timeout 30000 target && goto ${target}


########## UTILITY ITEMS ####################
:shell
echo Type exit to get the back to the menu
shell
set menu-timeout 0
goto start

:reboot
reboot

:exit
exit

########## MENU ITEMS #######################
# SmartOS
:smartos
kernel /smartos/${smartos-build}/platform/i86pc/kernel/amd64/unix -B smartos=true
initrd /smartos/${smartos-build}/platform/i86pc/amd64/boot_archive
boot
goto start


# SmartOS Latest
:smartos-latest
kernel /smartos/${smartos-latest}/platform/i86pc/kernel/amd64/unix -B smartos=true
initrd /smartos/${smartos-latest}/platform/i86pc/amd64/boot_archive
boot
goto start



I hope this can be useful to you



and




. Very Happy

just a question but your dhcpd range of ip address is more than one ?
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Tue Aug 27, 2013 10:11 am    Post subject: Reply with quote

I have the same settings as you have.

The strange thing is that I don't have any tftp section entry in the log viewer although I have the verbose flag when calling tftp :
Code:
gateway> ps -ef -www |grep tftp
root      1901 32074  0 12:09 pts/0    00:00:00 grep tftp
root      2985     1  0 10:41 ?        00:00:00 /Database/opt/x.x/packages/sbin/in.tftpd --listen --user apache --secure /Database/tftpboot --verbose


No tftp log file in /Database/LOG/2013/Aug/27/gateway.

(i rebooted my gateway to be sure)


Last edited by Shadok on Tue Aug 27, 2013 10:14 am; edited 1 time in total
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Tue Aug 27, 2013 10:12 am    Post subject: Reply with quote

Here's my dhcpd.conf :
Code:
authoritative;
ddns-update-style interim;
ignore client-updates;
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;
option ipxe.priority code 1 = signed integer 8;
option ipxe.keep-san code 8 = unsigned integer 8;
option ipxe.skip-san-boot code 9 = unsigned integer 8;
option ipxe.syslogs code 85 = string;
option ipxe.cert code 91 = string;
option ipxe.privkey code 92 = string;
option ipxe.crosscert code 93 = string;
option ipxe.no-pxedhcp code 176 = unsigned integer 8;
option ipxe.bus-id code 177 = string;
option ipxe.bios-drive code 189 = unsigned integer 8;
option ipxe.username code 190 = string;
option ipxe.password code 191 = string;
option ipxe.reverse-username code 192 = string;
option ipxe.reverse-password code 193 = string;
option ipxe.version code 235 = string;
option iscsi-initiator-iqn code 203 = string;
# Feature indicators
option ipxe.pxeext code 16 = unsigned integer 8;
option ipxe.iscsi code 17 = unsigned integer 8;
option ipxe.aoe code 18 = unsigned integer 8;
option ipxe.http code 19 = unsigned integer 8;
option ipxe.https code 20 = unsigned integer 8;
option ipxe.tftp code 21 = unsigned integer 8;
option ipxe.ftp code 22 = unsigned integer 8;
option ipxe.dns code 23 = unsigned integer 8;
option ipxe.bzimage code 24 = unsigned integer 8;
option ipxe.multiboot code 25 = unsigned integer 8;
option ipxe.slam code 26 = unsigned integer 8;
option ipxe.srp code 27 = unsigned integer 8;
option ipxe.nbi code 32 = unsigned integer 8;
option ipxe.pxe code 33 = unsigned integer 8;
option ipxe.elf code 34 = unsigned integer 8;
option ipxe.comboot code 35 = unsigned integer 8;
option ipxe.efi code 36 = unsigned integer 8;
option ipxe.fcoe code 37 = unsigned integer 8;
subnet 192.168.1.0 netmask 255.255.255.0 {
  option routers 192.168.1.1;
  option subnet-mask 255.255.255.0;
  option domain-name "localdomain.com";
  option domain-name-servers 192.168.1.1, 8.8.8.8, 8.8.4.4;
  option ntp-servers 192.168.1.1;
next-server 192.168.1.1;
if exists user-class and option user-class = "iPXE" {
    filename "menu.ipxe";
} else {
    filename "undionly.kpxe";
}

  default-lease-time 3600;
  max-lease-time 86400;
  range 192.168.1.70 192.168.1.89;
  range 192.168.1.140 192.168.1.199;
  range 192.168.1.210 192.168.1.249;


And preboot script :
Code:
# Patch DHCP config scripts to include a Global_Parameters section, and pass config testing
touch /Database/var/register/system/dhcp/Global_Parameters
sed -i 's/^EOF$/EOF\ncat \$REGISTER\/system\/dhcp\/Global_Parameters/g' /root/kerbynet.cgi/scripts/dhcp_configfile
sed -i 's/echo \"ignore client-updates;\" >>\$FILE/echo \"ignore client-updates;\" >>\$FILE\ncat \$REGISTER\/system\/dhcp\/Global_Parameters >>\$FILE/g' /root/kerbynet.cgi/scripts/dhcp_checkopt


/tftpboot/menu.ipxe :
Code:
#!ipxe

set smartos-build 20130808T195337Z

######## MAIN MENU ###################
:start
menu Welcome to iPXE's Boot Menu
item
item --gap -- ------------------------- Operating systems ------------------------------
item smartos    Boot SmartOS (${smartos-build})
item --gap -- ------------------------------ Utilities ---------------------------------
item shell      Enter iPXE shell
item reboot     Reboot
item --gap -- ---------------------------- Diagnostics ---------------------------------
item memtest    Memtest86+
item
item exit       Exit (boot local disk)
choose --default smartos --timeout 5000 target && goto ${target}


########## UTILITY ITEMS ####################
:shell
echo Type exit to get the back to the menu
shell
set menu-timeout 0
goto start

:reboot
reboot

:exit
exit

########## MENU ITEMS #######################
:smartos
kernel /smartos/${smartos-build}/platform/i86pc/kernel/amd64/unix -B root_shadow='XXXXXX'
initrd /smartos/${smartos-build}/platform/i86pc/amd64/boot_archive
boot
goto start

########## DIAGNOSTICS ITEMS #################
:memtest
kernel /memtest/memtest86+
boot
goto start
Back to top
View user's profile Send private message
renato.morano



Joined: 21 Apr 2011
Posts: 49

PostPosted: Tue Aug 27, 2013 1:37 pm    Post subject: Reply with quote

Hi,

my dhcpd.conf is:

Code:
root@labtest tftpboot> cat /tmp/dhcpd.conf
authoritative;
ddns-update-style interim;
ignore client-updates;
  option space ipxe;
  option ipxe-encap-opts code 175 = encapsulate ipxe;
  option ipxe.priority code 1 = signed integer 8;
  option ipxe.keep-san code 8 = unsigned integer 8;
  option ipxe.skip-san-boot code 9 = unsigned integer 8;
  option ipxe.syslogs code 85 = string;
  option ipxe.cert code 91 = string;
  option ipxe.privkey code 92 = string;
  option ipxe.crosscert code 93 = string;
  option ipxe.no-pxedhcp code 176 = unsigned integer 8;
  option ipxe.bus-id code 177 = string;
  option ipxe.bios-drive code 189 = unsigned integer 8;
  option ipxe.username code 190 = string;
  option ipxe.password code 191 = string;
  option ipxe.reverse-username code 192 = string;
  option ipxe.reverse-password code 193 = string;
  option ipxe.version code 235 = string;
  option iscsi-initiator-iqn code 203 = string;
  # Feature indicators
  option ipxe.pxeext code 16 = unsigned integer 8;
  option ipxe.iscsi code 17 = unsigned integer 8;
  option ipxe.aoe code 18 = unsigned integer 8;
  option ipxe.http code 19 = unsigned integer 8;
  option ipxe.https code 20 = unsigned integer 8;
  option ipxe.tftp code 21 = unsigned integer 8;
  option ipxe.ftp code 22 = unsigned integer 8;
  option ipxe.dns code 23 = unsigned integer 8;
  option ipxe.bzimage code 24 = unsigned integer 8;
  option ipxe.multiboot code 25 = unsigned integer 8;
  option ipxe.slam code 26 = unsigned integer 8;
  option ipxe.srp code 27 = unsigned integer 8;
  option ipxe.nbi code 32 = unsigned integer 8;
  option ipxe.pxe code 33 = unsigned integer 8;
  option ipxe.elf code 34 = unsigned integer 8;
  option ipxe.comboot code 35 = unsigned integer 8;
  option ipxe.efi code 36 = unsigned integer 8;
  option ipxe.fcoe code 37 = unsigned integer 8;

#host SmartOS {
#        hardware ethernet 00:e0:81:5d:c2:5e;
#        fixed-address 192.168.4.40;
#        next-server 192.168.4.75;
#       if exists user-class and option user-class = "iPXE" {
#      filename = "smartos.ipxe";
#      } else {
#      filename = "undionly.kpxe";
#    }
#}
subnet 192.168.4.0 netmask 255.255.255.0 {
  option routers 192.168.4.75;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 192.168.4.75, 8.8.8.8, 8.8.4.4;
next-server 192.168.4.75;
     if exists user-class and option user-class = "iPXE" {
      filename = "smartos.ipxe";
      } else {
      filename = "undionly.kpxe";
    }

  default-lease-time 28800;
  max-lease-time 28800;
  range 192.168.4.20 192.168.4.30;
  host 3232236554_00237DFDB8F1 {
    hardware ethernet 00:23:7D:FD:B8:F1;
    fixed-address 192.168.4.10;


  }
  host 3232236566_00237DFDB936 {
    hardware ethernet 00:23:7D:FD:B9:36;
    fixed-address 192.168.4.22;


  }
  host 3232236594_08002766168D {
    hardware ethernet 08:00:27:66:16:8D;
    fixed-address 192.168.4.50;


  }
}


but I have just one IP range and if I add a new range all is still working.

So can be related to undionly.kpxe binary ?

I use undionly.kpxe dowloaded from http://boot.ipxe.org/undionly.kpxe [iPXE 1.0.0+ (5520)] but is working also undionly.kpxe from http://cuddletech.com/IPXE-100612_undionly.kpxe [iPXE 1.0.0+ (a712)] as suggested by Ben Rockwood [ http://wiki.smartos.org/display/DOC/PXE+Booting+SmartOS ]


As last resouces you can test if something change if you add "Speeding up DHCP"
Quote:

[http://ipxe.org/howto/dhcpd ]
The PXE specification requires iPXE to wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay using:

option ipxe.no-pxedhcp 1;

(Do not do this if you are using a ProxyDHCP server; it will cause iPXE to ignore whatever the ProxyDHCP server sends!)


Let me know ...

see you Wink
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Wed Aug 28, 2013 10:45 am    Post subject: Reply with quote

It works fine now, thank you Smile
Back to top
View user's profile Send private message
renato.morano



Joined: 21 Apr 2011
Posts: 49

PostPosted: Wed Aug 28, 2013 3:23 pm    Post subject: Reply with quote

Hi,

please let us know what has been the solution ?

1) undionly.kpxe binary

2) just one range of ip in dhcpd configuration

3) or just we have been lucky Laughing

Renato
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Wed Aug 28, 2013 3:26 pm    Post subject: Reply with quote

I already have more than one ip range so that's not it.
I tried with the old and new ndionly and it work.

Looks like I didn't have the "next-server" line Smile

EDIT: Damn, I had it. I really don't know why it works now. I'll try again with the old ndionly.


Last edited by Shadok on Wed Aug 28, 2013 8:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
renato.morano



Joined: 21 Apr 2011
Posts: 49

PostPosted: Wed Aug 28, 2013 4:23 pm    Post subject: Reply with quote

Quote:
I already have more than one ip range so that's not it.
I tried with the old and new ndionly and it work.

Looks like I didn't have the "next-server" line Smile

EDIT: Damn, I had it. I really don't know why it works now. I'll try again with the old ndionly.


Hi,

so we are in the fog ?!?
Back to top
View user's profile Send private message
renato.morano



Joined: 21 Apr 2011
Posts: 49

PostPosted: Sat Aug 31, 2013 7:56 am    Post subject: Reply with quote

Hi,
we have another option.
We can add in "Static IP Entries" all we need to net booting.



I suppose in this case no more trouble with time out or leases time of the dhcpd server.
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Sat Aug 31, 2013 12:29 pm    Post subject: Reply with quote

renato.morano wrote:
Quote:
I already have more than one ip range so that's not it.
I tried with the old and new ndionly and it work.

Looks like I didn't have the "next-server" line Smile

EDIT: Damn, I had it. I really don't know why it works now. I'll try again with the old ndionly.


Hi,

so we are in the fog ?!?


Yep, i'll need to do some more tests Smile
Back to top
View user's profile Send private message
Shadok



Joined: 10 Jan 2013
Posts: 39

PostPosted: Sat Aug 31, 2013 12:30 pm    Post subject: Reply with quote

renato.morano wrote:
Hi,
we have another option.
We can add in "Static IP Entries" all we need to net booting.



I suppose in this case no more trouble with time out or leases time of the dhcpd server.


That's interesting to have hosts-only specific boot options.
Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group