From owner-freebsd-questions@FreeBSD.ORG Mon Sep 8 01:57:22 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 199FF106564A for ; Mon, 8 Sep 2008 01:57:22 +0000 (UTC) (envelope-from fbsd1@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id 044948FC1B for ; Mon, 8 Sep 2008 01:57:21 +0000 (UTC) (envelope-from fbsd1@a1poweruser.com) Received: from laptop ([202.69.173.26]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 7 Sep 2008 18:56:48 -0700 From: "FBSD1" To: Date: Mon, 8 Sep 2008 09:57:23 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <4b2381fb0809062307x4b7ef550lfba5d74e9057dccf@mail.gmail.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-OriginalArrivalTime: 08 Sep 2008 01:56:48.0576 (UTC) FILETIME=[2795D400:01C91156] Subject: RE: switching discs during install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fbsd1@a1poweruser.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 01:57:22 -0000 All this talk about changing the order of the ports on the install cd's is just so much hot air because cd's install media belong to the legacy world. They are fast becoming obsolete just like floppy drives are. Can't even buy a computer these days with a floppy drive and still FreeBSD distributes floppy install images. How absurd is that? FreeBSD needs to come of age in the 21st century and be changed to install using USB memory flash stick technology. Just a little tweaking of the sysinstall program to add USB stick as an option for source of install source would do it. Here is a little script to populate a USB flash stick with the cd1.iso that you may find interesting. This way you can combine the cd1 & cd2 install cd's to a 4GB USB stick and install the system and all the ports you want without switching any install media. You could even use a USB flash stick as the target to install FreeBSD on giving you an mobile FreeBSD system you can plug into any computer and boot from. #!/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 6.2-RELEASE-i386-disc1.iso to your # hard drive /usr. Then execute this script from the command line # fbsd2usb /usr/6.2-RELEASE-i386-disc1.iso /usr/6.2-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 4 minutes ###" 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 10 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 20 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 ###"