LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-22-2008, 02:19 PM   #1
mike34341
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Rep: Reputation: 15
Setting up PXE network boot for diagnostic tools


I have something I am attempting to do, and honestly have no idea if it's even possible.

After seeing how distros like LinuxMCE can do a PXE boot for diskless clients, I thought that was really cool and thought how nice it would be to be able to do the same for some of the diagnostic tools I use for repairing computers. Currently, I have a DVD that is an all-in-one type disc that I have created that combines Windows XP and a bunch of diagnostic tools that run via ISOLINUX and MEMDISK. The diagnostic tools are IMG floppy image files.

What I'd like to do is at least be able to setup those floppy disc images to boot with memdisk via PXE rather than off of a CD. What I have done so far is installed syslinux, proftpd and tftp-server on my ClarkConnect 3.2 gateway. dnsmasq is already setup and serving up IP's for the network. I have not configured it for dchp-boot (which is one thing that I need help with)

From here is where I need to know if what I want to do is even possible, and if so, how can I go about setting this up? I mainly would like to get the diagnostic tools images on there for now. But if I could get a BartPE disc, the Windows XP setup files and a Live Linux CD on there, that would be awesome.

Can anyone provide some help to get me in the right direction?

Thanks,
Mike
 
Old 07-22-2008, 02:54 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You need

* DHCP server
* TFTP server
* NFS server

In the dhcpd.conf you need to indicate where the kernel is to be loaded from (kernel image). This kernel image needs to be built for diskless booting (i.e. know that it's root FS in on NSF).

You serve the kernel image via TFTP, so the image needs to be in the directory that TFTPd chroots to.

The root FS has to be exported via NFS.

Those are the basics, there are various HOW-TOs out there that I won't attempt to duplicate.
 
Old 07-23-2008, 08:25 AM   #3
mike34341
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for the reply.

From looking around, I found code found for pxelinux.cfg that looks like it would work in my case:

label dos
kernel memdisk
append initrd=fdboot.img

This code is off of a wbesite that discusses booting freedos via pxe: http://www.terryburton.co.uk/blog/20...-to-flash.html

So, for the diagnostic tools, am I correct in assuming that I do not need NFS and can just setup PXELINUX with TFTP and DCHP and use similar code to boot the floppy images with memdisk? NFS would be neccesary only if I wanted to serve up Windows OS images, correct?

If I am correct so far, is there a way to modify that code in pxelinux.cfg so that it presents you with two options and when you press the appropriate key it launches a certain image?

Thanks again,
Mike
 
Old 07-23-2008, 12:14 PM   #4
boethius
LQ Newbie
 
Registered: Oct 2005
Posts: 18

Rep: Reputation: 1
Quote:
Originally Posted by mike34341 View Post
NFS would be neccesary only if I wanted to serve up Windows OS images, correct?
Actually the only time you need NFS is when you want to live boot a root filesystem over the network. It is not necessarily a requirement for recovery booting. For example, RiPLinux has a PXE-compatible initrd filesystem that does not need NFS at all.

Windows booting from pxelinux has nothing whatsoever to do with NFS.

There are ways to emulate RIS from Linux but it's tricky, cumbersome, and difficult to manage (see http://oss.netfarm.it/guides/pxe.php). I use pxelinux to boot WinPE images over the network and it works reasonably well, though it's not necessarily easy to manage either (easier than emulating RIS for sure, though).

Quote:
If I am correct so far, is there a way to modify that code in pxelinux.cfg so that it presents you with two options and when you press the appropriate key it launches a certain image?
You probably want to use the simple menu system that comes with syslinux; for example, in pxelinux.cfg/default:

timeout 150
prompt 0
default menu

label menu
menu label Boot Menu
kernel menus/menu.c32
append menus/menu.conf

example menu.conf:
----------------
MENU TITLE Tools Menu
label load
MENU LABEL Generic UNDI MS Network Boot Client
kernel unattended/memdisk
append initrd=unattended/undiload.imz keeppxe
LABEL Boot Rescue system
MENU LABEL Boot Rescue system
KERNEL installer/i386/wininst/kernel
APPEND vga=normal initrd=installer/i386/wininst/rootfd.cgz root=/dev/ram0 rw
LABEL Boot Linux rescue system (skip keymap prompt)
KERNEL installer/i386/RIP/kernel
APPEND vga=normal nokeymap initrd

----------
FYI the menu.c32 binary is inside the syslinux tarball. As you can see the simple menu system is almost syntactically identical to the conventional syslinux default menu. You can of course do sub-menus too; e.g.,

MENU TITLE My Company's Service Menu
TIMEOUT 150
label centos
menu label CentOS Generic Installer Menu
kernel menus/menu.c32
append menus/centos.conf
label fedora
menu label Fedora Generic Installer Menu
kernel menus/menu.c32
append menus/fedora.conf
LABEL Tools Menu
kernel menus/menu.c32
append menus/tools.conf
label Boot off local hard disk (default)
MENU DEFAULT
localboot 0
 
Old 07-25-2009, 10:43 AM   #5
mike34341
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I know this thread is very old, but I though I should post an update here because I ended up getting it working exactly as I wanted. As a result, I wrote a tutorial on my website on how to do this, in case anyone else is looking to do a similar thing.

What my setup can do:
-Network boot any floppy image (I used it to boot Memtest, Hitachi's Drive Fitness Test, DBAN, and a Ghost floppy image)
-Directly boot a BartPE/WinPE ISO by loading the ISO into RAM on the client and running the image from there (makes it run very fast, much faster than from a CD)
-Only needs a Linux server with the tftpd-hpa and a DHCP router that supports PXE booting. NFS is not needed as mentioned before in this post.

If anyone is interested in how to do this, here's the link: http://electronet.dyndns.org/computers/?p=85

Hopefully this helps anyone looking to do this same thing or something similar.
 
Old 03-22-2013, 03:13 PM   #6
kulvinder_10
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
Hi

Hello Mike

I know you have created and updated that link years back. but is it possible that you can forward me the link again


Regards
Kulvinder
 
Old 03-22-2013, 06:45 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The OP may easily miss your post. I'd recommend clicking on mike34341's username link and posting a visitor's message. The OP is still active on this site.
 
Old 03-23-2013, 12:06 AM   #8
kulvinder_10
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
Hello Mike

I know you have created and updated that link years back. but is it possible that you can forward me the link again


Regards
Kulvinder



Quote:
Originally Posted by mike34341 View Post
I know this thread is very old, but I though I should post an update here because I ended up getting it working exactly as I wanted. As a result, I wrote a tutorial on my website on how to do this, in case anyone else is looking to do a similar thing.

What my setup can do:
-Network boot any floppy image (I used it to boot Memtest, Hitachi's Drive Fitness Test, DBAN, and a Ghost floppy image)
-Directly boot a BartPE/WinPE ISO by loading the ISO into RAM on the client and running the image from there (makes it run very fast, much faster than from a CD)
-Only needs a Linux server with the tftpd-hpa and a DHCP router that supports PXE booting. NFS is not needed as mentioned before in this post.

If anyone is interested in how to do this, here's the link: http://electronet.dyndns.org/computers/?p=85

Hopefully this helps anyone looking to do this same thing or something similar.
 
Old 03-25-2013, 02:20 PM   #9
boethius
LQ Newbie
 
Registered: Oct 2005
Posts: 18

Rep: Reputation: 1
Quote:
Originally Posted by kulvinder_10 View Post
Hello Mike
I know you have created and updated that link years back. but is it possible that you can forward me the link again
Most recent versions of Syslinux (i.e., pxelinux) support booting of *both* ISO and floppy images - actually, they've supported floppy images for years so doing what Mike was doing is not all that hard. See here for more detailed information: http://www.syslinux.org/wiki/index.p...ISK#ISO_images

For a more practical application, you could try something like the following in the pxelinux menu system (menu.c32; noted in my example above), approximately emulating what Mike was able to accomplish:

MENU TITLE Tools Menu
label memtest
MENU LABEL MemTest86+
root (hd0,0)
kernel memtest86+
MENU LABEL Hitachi Drive Fitness Test
kernel memdisk
append initrd=dft32_v416_b00_install.IMG
MENU LABEL DBAN Boot and Nuke
KERNEL dban.bzi
APPEND nuke="dwipe" silent floppy=0,16,cmos
TEXT HELP
Warning - This will erase your hard drive
ENDTEXT
MENU LABEL BartPE
kernel memdisk
append iso initrd=/yourbartpe.iso

Locations for downloading these tools:

Hitachi Drive Fitness Tool: http://www.hgst.com/hdd/support/down...00_install.IMG
MemTest86+: http://www.memtest.org/download/4.20...6+-4.20.bin.gz
DBAN: http://downloads.sourceforge.net/pro...se_mirror=iweb Note that the bzipped bootable binary image must be extracted from the ISO image first (e.g., mount -o loop dban-2.2.7_i586.iso /mnt; cp /mnt/dban.bzi /tftpboot; umount /mnt).
BartPE: http://www.nu2.nu/pebuilder/ for guidance on building BartPE ISO images - yes you will need a Windows OS' source files like Win7 or WinXP, 32- or 64-bit but if you know anything about BartPE you already know this.

Note that if you've got Syslinux you've already got the memdisk binary. If you don't have it, download/apt-get/yum install it per your Linux distribution or you can download the source files and build the binaries yourself from: ftp://ftp.kernel.org/pub/linux/utils...x-4.06.tar.bz2

Syslinux is actually up to 5.x now but I haven't looked at it so I'm not ready to recommend it. You could of course play around with it yourself if you like and see what you can do with it.

In the example above all the files (memdisk, memtest86+, dft32*.IMG, yourbartpe.iso) would be located wherever your PXE server's TFTP boot folder is.

Best regards and have fun!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for hardware diagnostic tools DPenguin Linux - Hardware 2 07-18-2008 12:58 PM
beginner- need network diagnostic tools or tutorial early Linux - Networking 1 03-21-2007 03:53 PM
Diagnostic Tools ImpactDNI Linux - Hardware 6 08-30-2006 12:20 PM
Windows Diagnostic Tools microsoft/linux General 10 04-17-2006 11:05 PM
diagnostic tools mjolnir General 1 03-10-2004 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration