Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:qemupxeknife [2009/05/22 19:18]
less1
wiki:qemupxeknife [2009/05/23 09:43] (current)
less1
Line 8: Line 8:
   - You will also need PXELinux [[http://​syslinux.zytor.com/​wiki/​index.php/​PXELINUX]]   - You will also need PXELinux [[http://​syslinux.zytor.com/​wiki/​index.php/​PXELINUX]]
 <​code>​ <​code>​
-cd /​home/​myname/​pxeknife/​pxeknife/​+mkdir /​home/​myname/​for_pxe_knife/​ 
 +$ wget http://pxeknife.erebor.org/​releases/pxeknife-0.0.2.tar.gz 
 +$ cd /home/​myname/​for_pxe_knife/​ 
 +$ tar -xvf ../​pxeknife-0.0.2.tar.gz
 $ cp /​usr/​lib/​syslinux/​pxelinux.0 . $ cp /​usr/​lib/​syslinux/​pxelinux.0 .
 $ cp /​usr/​lib/​syslinux/​*.c32 . $ cp /​usr/​lib/​syslinux/​*.c32 .
Line 16: Line 19:
 </​code>​ </​code>​
  
-Tried using http://syslinux.zytor.com/wiki/index.php/Development/​Testing but no success yet.\\ +Now, the content of my //pxelinux.cfg/default// file is  
-Commands tried+<​code>​ 
 +DEFAULT menu.c32 
 +    PROMPT 0 
 +    TIMEOUT 100 #this is optional - will start the default after 10 seconds 
 +    MENU TITLE --== Main Menu ==-- 
 + 
 +    #this allows you to exit the pxe stack and pass booting to the local system 
 +    LABEL bootlocal 
 +        MENU DEFAULT 
 +        MENU LABEL Local Boot 
 +        localboot 0 
 + 
 + 
 +    #load pxe knife 
 +    LABEL pxeknife 
 +        MENU LABEL PXE Knife ---> 
 +        kernel menu.c32 
 +        append pxeknife/pxeknife.conf 
 +</​code>​ 
 <​code>​ <​code>​
 $ cd gpxe/​bootables/​ $ cd gpxe/​bootables/​
Line 23: Line 45:
 </​code>​ </​code>​
  
-Nowtrying different commands+Here is the code which is working for  
 +<​code>​ 
 +$ qemu -net nic -net user -boot n -hda ./​testing.img -bootp /pxelinux.0 -tftp /​home/​myname/​for_pxe_knife/​ 
 +$ qemu -net nic -net user -fda ./gpxe.dsk -bootp /pxelinux.0 -tftp /​home/​myname/​for_pxe_knife/​ 
 +</​code>​ 
 +for following version of qemu version qemu version 0.10.0 
 +<​code>​ 
 +$ qemu 
 +QEMU PC emulator version 0.10.0Copyright (c) 2003-2008 Fabrice Bellard 
 +</​code>​ 
 + 
 +==== Problems ==== 
 + 
 +As per me following command should have worked, but It did not worked 
 + 
 +<​code>​ 
 +$ qemu -bootp tftp://​10.0.2.2//​pxelinux.0 -tftp /​home/​myname/​for_pxe_knife/​ -fda gpxe.dsk 
 +</​code>​ 
 +at same time command 
 +<​code>​ 
 +$ qemu -bootp /pxelinux.0 -tftp /​home/​myname/​for_pxe_knife/​ -fda gpxe.dsk 
 +</​code>​ 
 +works. 
 + 
 +Problem faced is,\\ 
 +it successfully downloads the //​pxelinux.0//​ and executes it, 
 +but it fails when it is downloading pxelinux.cfg/​default\\ 
 +It gives an error saying 
 +<​code>​ 
 +TFTP prefix: tftp://​10.0.2.2//​ 
 +Trying to load: pxelinux.cfg/​default 
 +Unable to locate configuration file 
 + 
 +Boot failed: press a key to retry, or wait for reset... 
 +</​code>​ 
 + 
 + 
 +Note : There are some versions of qemu for which network boot option did not worked.
 <​code>​ <​code>​
 $ qemu -net nic -net user -boot n -hda ./​testing.img -bootp /pxelinux.0 -tftp /​home/​minix-pravin/​Etherboot/​v2/​pxeknife/​pxeknife/ ​ $ qemu -net nic -net user -boot n -hda ./​testing.img -bootp /pxelinux.0 -tftp /​home/​minix-pravin/​Etherboot/​v2/​pxeknife/​pxeknife/ ​
Line 34: Line 93:
 </​code>​ </​code>​
  
-Here is the code which is working for +But if you provide gpxe.dsk instead of ./​testing.img it uses gpxe.dsk stack and boots properly.
 <​code>​ <​code>​
-qemu -net nic -net user -boot n -hda ./testing.img -bootp /pxelinux.0 -tftp /​home/​pravin/​Etherboot/​v2/​pxeknife/​pxeknife/​ +qemu -net nic -net user -fda ./gpxe.dsk -bootp /pxelinux.0 -tftp /home/minix-pravin/​Etherboot/​v2/​pxeknife/​pxeknife/ ​
-</​code>​ +
-for following version of qemu version qemu version 0.10.0 +
-<​code>​ +
-$ qemu +
-QEMU PC emulator version 0.10.0, Copyright (c) 2003-2008 Fabrice Bellard+
 </​code>​ </​code>​
  
  
-Now, the content of my //​pxelinux.cfg/​default//​ file is  
-<​code>​ 
-DEFAULT menu.c32 
-    PROMPT 0 
-    TIMEOUT 100 #this is optional - will start the default after 10 seconds 
-    MENU TITLE --== Main Menu ==-- 
  
-    #this allows you to exit the pxe stack and pass booting to the local system +==== Useful links ==== 
-    LABEL bootlocal +  - [[http://​syslinux.zytor.com/​wiki/​index.php/​PXELINUX]] About pxelinux 
-        MENU DEFAULT +  - [[http://​syslinux.zytor.com/​wiki/​index.php/​Development/​Testing]] for using qemu with pxelinux.
-        MENU LABEL Local Boot +
-        localboot 0+
  
  
-    #load pxe knife 
-    LABEL pxeknife 
-        MENU LABEL PXE Knife ---> 
-        kernel menu.c32 
-        append pxeknife.conf 
-</​code>​ 
  
  

QR Code
QR Code wiki:qemupxeknife (generated for current page)