Here it is... my attempt to create a UBCD bootable USB stick using FreeBSD, should you ever want to...
You may want to change the variables UBCDDIR - (UBCD work directory), UBCDSRC - (source location for ISO), USB (USB device)
You may want to change the variables UBCDDIR - (UBCD work directory), UBCDSRC - (source location for ISO), USB (USB device)
Code:
export UBCDDIR="/tmp/ubcd.iso"
export UBCDSRC="http://cdn.removed.us/ubcd/ubcd538.iso"
export USB="da0"
if ! [ -d $UBCDDIR ]; then
mkdir $UBCDDIR
fi
cd $UBCDDIR
if ! [ -d $UBCDDIR/boot ]; then
fetch -o - $UBCDSRC | tar xf -.
fi
gpart destroy -F $USB
gpart create -s mbr $USB
gpart add -t fat32 $USB
gpart set -a active -i 1 $USB
newfs_msdos -F32 /dev/${USB}s1
mkdir /mnt/ubcd
mount -t msdosfs /dev/${USB}s1 /mnt/ubcd
cp -R $UBCDDIR/ /mnt/ubcd/
cp $UBCDDIR/ubcd/tools/linux/ubcd2usb/mbr.bin mbr
dd if=/dev/zero of=mbr seek=440 bs=1 count=72
gpart bootcode -b mbr $USB
umount /mnt/ubcd
rmdir /mnt/ubcd
if ! [ -f $UBCDDIR/bin/syslinux ]; then
fetch -o - http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/9.1-RELEASE/packages/All/syslinux-4.05.tbz | tar jxf -
fi
$UBCDDIR/bin/syslinux --install -s -f -d /boot/syslinux /dev/${USB}s1