Hi,
I have been trying to install freebsd onto D945GCLF2 using an bootable usb stick, ..
- first i downloaded the appropriate iso amd64 7.2 version
- then i converted the iso to an img file using a script
- then i used imagemaker to put it onto an usb stick
- then i have tried booting
boot works up until i get something about geom_label, that it has removed ufsid<id>
Script which converts iso to img
I have been trying to install freebsd onto D945GCLF2 using an bootable usb stick, ..
- first i downloaded the appropriate iso amd64 7.2 version
- then i converted the iso to an img file using a script
- then i used imagemaker to put it onto an usb stick
- then i have tried booting
boot works up until i get something about geom_label, that it has removed ufsid<id>
Script which converts iso to img
Code:
#!/bin/sh
# beerware license, written by Dario Freni (saturnero@freesbie.org)
# Set serial variable to 0 if you don't want serial console at all,
# 1 if you want comconsole and 2 if you want comconsole and vidconsole
serial=2
set -u
if [ $# -lt 2 ]; then
echo "Usage: $0 source-iso-path output-img-path"
exit 1
fi
isoimage=$1; shift
imgoutfile=$1; shift
export tmpdir=$(mktemp -d -t fbsdmount)
export isodev=$(mdconfig -a -t vnode -f ${isoimage})
echo "#### Building bootable UFS image ####"
ISOSIZE=$(du -k ${isoimage} | awk '{print $1}')
SECTS=$((($ISOSIZE + ($ISOSIZE/4))*4))
# Root partition size
echo "Initializing image..."
dd if=/dev/zero of=${imgoutfile} count=${SECTS}
ls -l ${imgoutfile}
export imgdev=$(mdconfig -a -t vnode -f ${imgoutfile})
bsdlabel -w -B ${imgdev}
newfs -O1 /dev/${imgdev}a
mkdir -p ${tmpdir}/iso ${tmpdir}/img
mount -t cd9660 /dev/${isodev} ${tmpdir}/iso
mount /dev/${imgdev}a ${tmpdir}/img
echo "Copying files to the image..."
( cd ${tmpdir}/iso && pax -rw . ${tmpdir}/img )
#echo "/dev/ufs/${UFS_LABEL} / ufs ro 1 1" > ${tmpdir}/img/etc/fstab
if [ ${serial} -eq 2 ]; then
echo "-D" > ${tmpdir}/img/boot.config
echo 'boot_multicons="YES"' >> ${tmpdir}/img/boot/loader.conf
echo 'boot_serial="YES"' >> ${tmpdir}/img/boot/loader.conf
# echo 'comconsole_speed="115200"' >> ${tmpdir}/img/boot/loader.conf
echo 'console="comconsole, vidconsole"' >> ${tmpdir}/img/boot/loader.conf
elif [ ${serial} -eq 1 ]; then
echo "-h" > ${tmpdir}/img/boot.config
echo 'boot_multicons="YES"' >> ${tmpdir}/img/boot/loader.conf
echo 'boot_serial="YES"' >> ${tmpdir}/img/boot/loader.conf
# echo 'comconsole_speed="115200"' >> ${tmpdir}/img/boot/loader.conf
echo 'console="comconsole"' >> ${tmpdir}/img/boot/loader.conf
fi
cleanup() {
umount ${tmpdir}/iso
mdconfig -d -u ${isodev}
umount ${tmpdir}/img
mdconfig -d -u ${imgdev}
}
cleanup
ls -lh ${imgoutfile}