pantz.org banner
Making PXE boot disks
Posted on 06-05-2008 20:44:46 UTC | Updated on 06-05-2008 21:49:12 UTC
Section: /software/pxe/ | Permanent Link

In my last entry I showed how to make the Linux distro SystemRescueCD PXE bootable. In this entry I'm going to give you 2 examples of making boot images that you can boot over the network with PXE. The first image we are going to make is a bootable version of the Seatools diagnostic software to test hard drives from Seagate. The second image we are going to make is a generic dos bootable PXE image.

The images we make will be loaded by the syslinux bootloader. The installation and setup of syslinux was covered in the entry "Making SystemRescueCD PXE bootable".

The first image we are going to make one for Seatools. Seatools is diagnostic software given out by Seagate to test/fix their hard drives. To make a this image you will need access to a windows machine. Either boot into a windows virtual machine or just use a actual windows machine. First, go to the Seagate website and go to the support section. In there you will see the downloads section. Look for the software "Seatools for DOS". Follow the links to the download section. When offered the choice of text or graphical choose either one they both work. Now choose the "Floppy Diskette Creator" and download that to the windows machine. It will be a windows executable. This is what we will need to make the floppy disk for us.

The next thing we need to download is the software that will emulate a floppy disk drive for us. Download the free software called Virtual Floppy Drive for Windows. Unzip it and run the vfdwin.exe executable. Click the driver tab and click the Start button to load the virtual floppy driver. Then click the Drive0 tab. Click the Change button and select a drive letter to be the virtual floppy drive. Then click the Open/Create button and click the browse button. Type the name of an image file you want to make. Make sure you give the filename the extention .img. Then click the Open button to finish the selection. Media type should be 3.5 1.44MB. Disk type should be set to FILE. Then click the create button. Now, Run the Seatools software you downloaded and if it asks point it to the floppy drive. It might not ask. Just click the "Create Floppy" button. After its done writing click the close button under the Drive0 tab to finish the floppy image. Now take the .img file you just made and put it on the tftp server with the other PXE boot images you have. Edit your PXE boot menu and put in an entry for this image. Below is the entry for my syslinux PXE boot menu.

label seatools
  kernel memdisk
  append initrd=seatools.img floppy

On next boot you should be able to type "seatools" at the PXE boot prompt and seatools should load

Now lets look at creating a generic dos boot image. With this dos boot image you can do things like flash a bios of a machine that does not have a cdrom or floppy disk. You can run lots of dos programs you need right from the PXE boot prompt. First, we need to download a dos floppy disk image from somewhere. This is just generic dos boot disk made by using dd on linux to copy it to a file. Like "dd if=/dev/fd0 of=/tmp/floppy.img bs=10240". If you have a favorite dos floppy you can make an boot image of it with that last command. Then copy the image over to the tftp directory where the other images are and put in a boot menu item for it. It just might boot.

I choose to take an already made dos boot image and put my own software on it. I downloaded a clean version of a 2.88MB FreeDOS boot disk. It was made by a Sourceforge project called FreeDOS Odin. So go there and download one yourself. Save a copy of the downloaded image file somewhere so you can keep reusing it. Now we are going to add our own software to the dos boot disk image we just downloaded. I made a copy of my downloaded image and called it dosboot.img. We are going to mount that file and copy the files we need to the disk image. The example below will copy the file dosbin.exe as an example.

mkdir /tmp/dos
sudo mount -o loop dosboot.img /tmp/dos/
sudo cp dosbin.exe /tmp/dos
sudo umount /tmp/dos

Now copy the dosboot.img file back up to the tftp boot dir. Edit the PXE menu file and put in a new line for the DOS floppy image. Look at the example above for a reference. Save the file and boot your new PXE image.

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

spotify

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib