usb/142876: sysinstall abort:: usb stick as source media & usb stick as install target

Fbsd1 fbsd1 at a1poweruser.com
Sat Jan 16 13:47:49 UTC 2010


Hans Petter Selasky wrote:
> On Saturday 16 January 2010 10:50:06 Joe Barbish wrote:
>>> Number:         142876
>>> Category:       usb
>>> Synopsis:       sysinstall abort:: usb stick as source media & usb stick
>>> as install target Confidential:   no
>>> Severity:       serious
>>> Priority:       high
>>> Responsible:    freebsd-usb
>>> State:          open
>>> Quarter:
>>> Keywords:
>>> Date-Required:
>>> Class:          sw-bug
>>> Submitter-Id:   current-users
>>> Arrival-Date:   Sat Jan 16 10:00:09 UTC 2010
>>> Closed-Date:
>>> Last-Modified:
>>> Originator:     Joe Barbish
>>> Release:        8.0 release
>>> Organization:
>> none
>>
>>> Environment:
>>> Description:
>> Using 2 USB sticks. da0 2GB as the bootable install media and da1 4GB
>> target device that freebsd is to be installed on.
>>
>> I have put the disc-1 iso onto a usb stick. I can boot this usb stick (da0)
>>  and use the default sysinstall program to install from to any motherboard
>>  cabled hard drive. This works as exspected.
> 
> Hi,
> 
> Did you mean image or iso? Do you have the download link? ISO files should 
> normally not be cat'ed onto memory sticks. And if you do so, you might have to 
> check the options and install medium menu before it works.
> 
> --HPS
> 
> 

Your questions are meaningless as i state I have used it to install to 
motherboard cabled hard drives. I bet using an iso burned to cd will 
generate same abort problem when you have 2 usb sticks plugged in and/or 
2 usb hard drives plugged in and using da1 as install target. I think 
sysinstall usb support as currently released in 8.0 can only handle a 
single usb stick or hard drive as install target. It will only install 
to da0. Check the base 8.0 system for /dev/da1 through da9 statements. 
There should be partition statements like da0 has. That seems to be root 
of problem as abort msg says. Should be simple to test for your self. I 
think this was just overlooked. Lets say your FBSD system has no 
motherboard cabled hard drives. It has 4 usb hard drives. You use disc-1 
to install on da4 and i bet you get same abort msg.

here is the script i use to put the desc-1 iso to img on usb stick

#!/bin/sh
#Purpose = Use to transfer the FreeBSD install cd1 to
#          a bootable 1GB USB flash drive so it can be used to install 
from.
#          First fetch the FreeBSD 7.1-RELEASE-i386-disc1.iso to your
#          hard drive /usr. Then execute this script from the command line
# fbsd2usb /usr/7.1-RELEASE-i386-disc1.iso /usr/7.1-RELEASE-i386-disc1.img
# Change system bios to boot from USB-dd and away you go.

# NOTE: This script has to be run from root and your 1GB USB flash drive
#       has to be plugged in before running this script.

# On the command line enter fbsd2usb iso-path img-path

# You can set some variables here. Edit them to fit your needs.

# 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=0

set -u

if [ $# -lt 2 ]; then
     echo "Usage: $0 source-iso-path output-img-path"
     exit 1
fi

isoimage=$1; shift
imgoutfile=$1; shift

# Temp  directory to be used later
#export tmpdir=$(mktemp -d -t fbsdmount)
export tmpdir=$(mktemp -d /usr/fbsdmount)

export isodev=$(mdconfig -a -t vnode -f ${isoimage})

ISOSIZE=$(du -k ${isoimage} | awk '{print $1}')
SECTS=$((($ISOSIZE + ($ISOSIZE/5))*4))
#SECTS=$((($ISOSIZE + ($ISOSIZE/5))*2))

echo " "
echo "### Initializing image File started ###"
echo "### This will take about 1 minute ###"
date
dd if=/dev/zero of=${imgoutfile} count=${SECTS}
echo "### Initializing image File completed ###"
date

echo " "
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 " "
echo "### Started Copying files to the image now ###"
echo "### This will take about 6 minutes ###"
date

( cd ${tmpdir}/iso && find . -print -depth | cpio -dump ${tmpdir}/img )

echo "### Completed Copying files to the image ###"
date

if [ ${serial} -eq 2 ]; then
         echo "-D" > ${tmpdir}/img/boot.config
         echo 'console="comconsole, vidconsole"' >> 
${tmpdir}/img/boot/loader.conf
elif [ ${serial} -eq 1 ]; then
         echo "-h" > ${tmpdir}/img/boot.config
         echo 'console="comconsole"' >> ${tmpdir}/img/boot/loader.conf
fi

echo " "
echo "### Started writing image to flash drive now ###"
echo "### This will take about 16 minutes ###"
date
dd if=${imgoutfile} of=/dev/da0 bs=1m
echo "### Completed writing image to flash drive at ###"
date

cleanup() {
     umount ${tmpdir}/iso
     mdconfig -d -u ${isodev}
     umount ${tmpdir}/img
     mdconfig -d -u ${imgdev}
     rm -rf ${tmpdir}
}

cleanup

ls -lh ${imgoutfile}

echo "### Script finished ###"




More information about the freebsd-usb mailing list