Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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.
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?
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
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.
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.
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
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.