Jump to content











Photo

Bug Reports, Requests, HowTo's about Tiny PXE Server

pxe network boot

  • Please log in to reply
909 replies to this topic

#126 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 10 March 2014 - 04:59 PM

Erwan,

 

Indeed, initrd should be before kernel.

After making this change, the target started to load the image (I can see the percentage going up, until it says ok).

However, there's still something wrong with the script.

It insists that /memdisk operation is not supported:

screenshot_26.png

 

 

BTW, ipxe.pxe was much quicker than ipxe-undionly.kpxe to load the image.



#127 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 10 March 2014 - 05:19 PM

Which disk image are your loading? "mine" or "yours".

Attaching mine again.

 

Also, just to be sure, the kernel line is kernel /memdisk raw not /memdisk raw right?

And memdisk (file from syslinux 3.86) is in the Tiny PXE Server folder right? just next to the pxe boot loader.

 

Regards,

Erwan

 

EDIT : you should get the below screen if you boot "my" disk image.

 

QAqL3S5.png

Attached Files

  • Attached File  disk.zip   981.16KB   5 downloads


#128 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 10 March 2014 - 05:23 PM

I guess once we are done, I should write a clear "how to" as this is not as easy as it looks :)

 

The tutorial could cover how to make a bootable disk image as well. 



#129 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 11 March 2014 - 06:23 AM

Erwan,

 

Finally, success!

 

GRUB_PXE.png  GHOST_PXE_DOS.png

 

 

Tried both ipxe-undionly.kpxe and ipxe.pxe.

As I mentioned earlier, ipxe.pxe loads the image very quickly.

 

My problem was that I somehow moved some files from "files" dir to TPS main dir. Fixed now.



#130 Sfor

Sfor

    Newbie

  • Members
  • 24 posts
  •  
    Poland

Posted 11 March 2014 - 06:37 AM

I also have another important question:

 

Is it somehow possible to have the host PC (the one running the PXE server) to control the target machine using the host's monitor and keyboard?

What I mean is - After I manage to boot the target machine via PXE LAN, I want to see the output of its monitor on my PC's monitor, and control the target machine with my PC's keyboard (like VNC, RDP, etc).

 

This is useful when the target machine is not in the same room, and I need to boot it, control it and monitor it - all from my PC.

 

I heard that some recent Intel chipsets allow this sort of control, but all my target machines are old and don't even have an Intel chipset.

Since you are using Norton Ghost, you are out of luck. There is no solution for DOS except Norton PCAnywhere, I think. That's why I never considered using Norton Ghost or other DOS based disk cloning utility.

 

On the other hand Linux does have built in network functions. So it is relatively easy to create image with LAN, DHCP and SSHD server. My choice was SystemRescue CD.



#131 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 11 March 2014 - 12:52 PM

Erwan,

 

Finally, success!

 

GRUB_PXE.png  GHOST_PXE_DOS.png

 

 

Tried both ipxe-undionly.kpxe and ipxe.pxe.

As I mentioned earlier, ipxe.pxe loads the image very quickly.

 

My problem was that I somehow moved some files from "files" dir to TPS main dir. Fixed now.

 

Hi Erircgl,

 

Happy it worked out for you !

Hope this will make life easier for your colleagues then.

You are correct : ipxe.pxe is much quicker than the undi-only version. Thanks for the tip!

 

Sidenote, I have made a tutorial on how to make a bootdisk disk image here to cover the first part of your scenario.

 

I will soon make a second tutorial to cover the second part (PXE boot).

 

Regards,

Erwan



#132 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 11 March 2014 - 01:17 PM

First part of Ericgl scenario (disk image) explained here.

Second part (PXE boot) explained here.

 

Regards,

Erwan


  • wimb likes this

#133 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 11 March 2014 - 01:31 PM

Erwan,

 

What is HTTPd used for? I don't see an explanation anywhere.

Actually, you should write a brief explanation on what each option on top does, and why it's needed.

 

Thanks.



#134 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 11 March 2014 - 01:41 PM

Hi Ericgl, Good point.

 

By default, a PXE server simply uses TFTP as file transfer protocol.

But TFTP is rather slow.

That's why I have added a HTTP daemon as an option in TinyPXE Server.

 

Whenever you want to achieve higher speed, you can there enable HTTPd.

You then need to adapt your ipxe script like below

#!ipxe
set boot-url http://${next-server}
initrd ${boot-url}/images/test.vhd
kernel ${boot-url}/memdisk raw
boot

/Erwan



#135 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 11 March 2014 - 01:51 PM

Erwan,

 

I think that the line initrd is not correct.

You should add a parameter that indicates where PXE Server is running from, not only the IP of the server.

For example, I have PXE Server running from drive H:

We need something like:

initrd ${boot-url}/${PATH_TO_TPS_DIR}/images/test.vhd


#136 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 11 March 2014 - 02:16 PM

 

Erwan,

 

I think that the line initrd is not correct.

You should add a parameter that indicates where PXE Server is running from, not only the IP of the server.

For example, I have PXE Server running from drive H:

We need something like:

initrd ${boot-url}/${PATH_TO_TPS_DIR}/images/test.vhd

 

Uhm, I have to disaggree there : TPS HTTP server is actually serving / exposing the folder (and files below) containing your boot filename.

 

Lets say TPS runs in C:\TPS but you picked up ipxe.pxe which is in H:\PXE, then ${boot-url} will actually point to H:\PXE.

The folder where TPS runs is actually not relevant.

The folder where your bootfilename is located is relevant.

 

This folder (lets call it root) is determined when you select the boot filename and go online.

When you click online, TPS will actually tell you where your root folder is (=http/tftp root).

 

You can also automatize it thru the config.ini.

 

Therefore if your images are (should be) in H:\PXE\IMAGES, the correct initrd will be initrd ${boot-url}/images/whatever.img.

 

My best advice thus is that you run it all in one unique folder.



#137 Sfor

Sfor

    Newbie

  • Members
  • 24 posts
  •  
    Poland

Posted 11 March 2014 - 03:21 PM

Erwan,

 

What is HTTPd used for? I don't see an explanation anywhere.

Actually, you should write a brief explanation on what each option on top does, and why it's needed.

 

Thanks.

 

It's quite simple, in fact. When you need a certain service for a certain software you are turning the ones you are needing on.

 

For an instance, SystemRescue CD does use HTTPd as the default way to download filesystem image. It is possible to use TFTP but HTTP is many times faster. Still TFTP is used to download the kernel.

 

The strongest point of the Tiny PXE Server is large amount of different services available in just one user interface. When one needs to boot something over the network, some services are necesary to do so. DHCP and TFTP are a must, but different solutions require different additional services. Tiny PXE Server does have the most popular ones included, and this makes it a valuable asset for anyone, who tried to boot something over the network.


Edited by Sfor, 11 March 2014 - 03:22 PM.

  • wimb likes this

#138 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 11 March 2014 - 04:03 PM

Thank you very much Sfor :)

I would not have described it better !



#139 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 12 March 2014 - 07:24 PM

In a previous post, Sfor was mentionning SystemRescueCD.

 

I decided to give a look at it.

 

I made a tutorial here : TinyPXE Server : PXE boot SystemRescueCD over HTTP.

On the same site, you will find similar articles on gParted, CloneZilla, Partition Wizard and Redo Backup Recovery.

 

/Erwan



#140 Sfor

Sfor

    Newbie

  • Members
  • 24 posts
  •  
    Poland

Posted 12 March 2014 - 08:00 PM

Well. It is possible to boot the SystemRescueCD that way, but there will be no SystemRescueCD boot menu and all the tolls launched from it will be unaccessible.

 

As a matter of fact, the SystemRescueCD does have ability to act as a PXE server. The idea is to run the SystemRescueCD on one computer, configure the PXE server, then boot the system rescue CD over the network. But, it is a drag to do so. It is much simpler to let the SystemRescueCD prepare the PXE file set, copy it to a Windows based computer, then to use it along with Tiny PXE Server. It's much faster and simpler, at least in my opinion.

 

Since the SystemRescueCD does have it's own PXE boot menu and code, it is enough to set the pxelinux.0 as the boot file filename from the PXE ready set of files, enable HTTPd and all the SystemRescueCD functions along with all it's tools' images are available, just like they would be booted from a CD.


Edited by Sfor, 12 March 2014 - 08:05 PM.


#141 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 12 March 2014 - 08:10 PM

Hi Sfor,

 

Thanks for the feedback.

 

Can you tell me more about missing tools when booted this way?

When I look at the iso/cd, I dont see much difference with the PXE Boot : initrd/kernel loading sysrescue.dat (a squashfs I guess like other similar distros).

 

I have tested the web browser, the file manager, gparted, etc and so far so good.

 

My main drive was to get another alternative to PartedMagic which unfortunately is no longer free.

 

Regards,

Erwan



#142 Sfor

Sfor

    Newbie

  • Members
  • 24 posts
  •  
    Poland

Posted 12 March 2014 - 08:35 PM

The ones I can not live without are Memtest and MHDD. But there are a few other images booted separately from the main Linux distribution. Depending on the version there are FreeDOS, Ranish Partition Manager, Grub disk, GAG, Aida, Hardware Detect Tool and others.



#143 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 12 March 2014 - 08:45 PM

Ah ok; I see what you mean now.

 

In the bootdisk folder indeed I can see (called from the isolinux cd boot menu) : aida, dban, freedos, gag, grubdisk, hdt, memtestp, mhdd.

 

I guess we could boot these from iPXE as well.

 

Thanks for the tip.



#144 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 18 March 2014 - 07:20 PM

1.0.0.17 out, minor version, mainly bugfixes based on users feedback

 

  • fixed : should detect if a socket is already in use
  • fixed : messages sent from threads would not always reach the memo box
  • added : will execute an executable/batch if cmd parameter is present in config.ini (cmd=c:\path\binary.exe)
  • fixed : httpd will handle both non keep-alive (default) and keep-alive http requests (needed for sanboot)
  • fixed : would create crashes (under certain conditions) if the root path was incorrect


#145 ljycslg

ljycslg

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 19 March 2014 - 04:55 AM

my english is bad

can do like hanewin this?

Automatically determine the UEFI PXE and BIOS PXE

if PXEClient:Arch:00000: DHCPserver send bios boot file

if PXEClient:Arch:00007: DHCPserver send uefi boot file

asd.jpg



#146 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 19 March 2014 - 11:36 AM

Hi ljycslg,

 

Have you checked ipxe variables list : http://ipxe.org/cfg ?

 

I am pretty sure you should find what you are looking for there.

Then it is "only" a matter of writing the ipxe script.

Tons of examples here for example.

 

Regards,

Erwan



#147 ljycslg

ljycslg

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 19 March 2014 - 01:11 PM

hi,Erwan

i can't see my post ,why?

 

i read the ipxe script

I think it is impossible to achieve,can show me example 


Edited by ljycslg, 19 March 2014 - 01:18 PM.


#148 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 19 March 2014 - 05:35 PM

i can't see my post ,why?

 

Your post has been "unapproved".

I looked into your profile and saw no flags like "spammer" or "banned" etc.

And the content is also not "forbidden".

So for me there is no reason to hide your posts.

 

I approved it (made visible for non-admin users)

 

Peter



#149 ljycslg

ljycslg

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 21 March 2014 - 03:51 AM

some suggest

add FTP Transfer Protocl

start program auto online option



#150 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 21 March 2014 - 07:26 AM

some suggest

add FTP Transfer Protocl

start program auto online option

 

put start=1 in config.ini in [dhcp] section.

 

i'll add ftp daemon shortly.







Also tagged with one or more of these keywords: pxe, network boot

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users