5.4 PXE network install and CDs

Paul Civati paul at xciv.org
Sun Jun 5 12:28:35 GMT 2005


I have a working PXE boot of 5.4, so I thought I'd document it for 
anyone else interested.

I *am* stuck on one minor point, I've coped CD1 and CD2 on to my
ftp server but sysinstall keeps prompting to change disks during
the package install.  I've created a cdrom.inf (the handbook says
this is how sysinstall knows what CD is loaded) like the ftp mirrors,
but I'm still prompted to change CDs.  What am I missing?

(Aside, the new disk layout is a bit of a pain, as previously I 
have been able to auto-mount the ISO images on my ftp server, 
but this won't work with the new packages directory split).

Notes for the PXE boot as follows..

I'm using pxelinux (part of syslinux) for the PXE booting since it 
handles booting multiple o/s with ease.  Until now I have been booting
FreeBSD using memdisk and the standard floppy images, this has been
fine for 4.x and up to 5.3 but now that the install has grown to
multiple floppies this won't work.

Having read up I saw that pxelinux/memdisk can handle booting 
hard disk images as well as floppy images so I thought this would
be a good solution, and here it is..

[ create initial 25MB image data file ]

dd if=/dev/zero of=fbsd54.img bs=1k count=25k

[ mount the file as a memory disk ]

mdconfig -a -t vnode -f fbsd54.img -u0

[ create a disk label/partition table, and make it bootable ]

bsdlabel -w -B md0 auto

[ edit the disk label - make a note of the label details - see below ]

bsdlabel -Ae md0

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    51184       16    4.2BSD     1024  8192  6400 
  c:    51200        0    unused        0     0         # "raw" part, don't edit

[ create a UFS file system on the image file ]

newfs -b 8192 -f 1024 md0a

[ mount the image file system ]

mount /dev/md0a /mnt

[ copy boot files from -bootonly.iso to new image - either burn the
  ISO to a CD or mdconfig it and mount -t cd9660 the md1 device ]

cp -pr /cdrom/* /mnt

[ unmount image file ]

umount /mnt
mdconfig -d -u0

[ create pxelinux boot entry - not sure if the c/h/s are really required
  but the memdisk documentation seems to imply so ]

LABEL freebsd54
 KERNEL memdisk
 APPEND initrd=fbsd54.img c=812 h=255 s=63

[ aforementioned notes from bsdlabel ]

sectors/track: 63
tracks/cylinder: 1
sectors/cylinder: 63
cylinders: 812


-Paul-

-- 
Paul Civati <paul(at)racksense.com> 0870 321 2855
Rack Sense Ltd - Managed/Business hosting - www.racksense.com   
RackRed - Value SSL certificates and servers - www.rackred.com



More information about the freebsd-stable mailing list