From owner-freebsd-hackers Fri May 4 8:48:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bsdhome.dyndns.org (unknown [24.25.2.193]) by hub.freebsd.org (Postfix) with ESMTP id 076C737B422 for ; Fri, 4 May 2001 08:48:53 -0700 (PDT) (envelope-from bsd@bsdhome.com) Received: from vger.bsdhome.com (vger [192.168.220.2]) by bsdhome.dyndns.org (8.11.3/8.11.3) with ESMTP id f44FmoJ89541; Fri, 4 May 2001 11:48:51 -0400 (EDT) (envelope-from bsd@bsdhome.com) Received: (from bsd@localhost) by vger.bsdhome.com (8.11.3/8.11.1) id f44Fmor18661; Fri, 4 May 2001 11:48:50 -0400 (EDT) (envelope-from bsd) Date: Fri, 4 May 2001 11:48:50 -0400 From: Brian Dean To: Rick Duvall Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Set up loader to boot cd Message-ID: <20010504114850.A18459@vger.bsdhome.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from maillist@coastsight.com on Mon, Apr 30, 2001 at 11:31:22AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Apr 30, 2001 at 11:31:22AM -0700, Rick Duvall wrote: > I am trying to make a custom boot CD for FreeBSD. I got it to the point > to where the CD will boot, load the kernel, but that's as far as it > get's. It does when it get's to the part where it wants to mount the root > devicd. It tried to access the floppy drive. > > So, do I need to vnconfig the boot.flp and put my own custom loader in it > or what? I don't want to be puting -C in every time I boot. Also, when I > put in -C, the kernel will load, but then can't find the CD device.... > > Any ideas would be appreciated. Maybe step by step instructions on making > a custom bootable live cd would be nice. I've had good success with the following which is a /bin/sh shell function. Use it as follows: % dofdboot /scratch/cdroot where /scratch/cdroot could be produced by: % make installkernel installworld DESTDIR=/scratch/cdroot After all that, specify boot/boot.fd as your ISO eltorito boot image file. Enjoy! -Brian -- Brian Dean bsd@FreeBSD.org bsd@bsdhome.com dofdboot () { DESTDIR="$1" echo "DOFDBOOT: DESTDIR=$DESTDIR" echo "Generating 2.88 MB boot floppy image" KERNELIMG=${DESTDIR}/kernel umount /mnt > /dev/null 2>&1 vnconfig -u /dev/vn0 > /dev/null 2>&1 echo "Initialize boot floppy image" dd if=/dev/zero of=${DESTDIR}/boot/boot.fd bs=1024 count=2880 vnconfig -s labels -c /dev/vn0 ${DESTDIR}/boot/boot.fd disklabel -Brw /dev/vn0c minimum2 newfs -o space -T minimum2 /dev/vn0c mount /dev/vn0c /mnt echo "Copy kernel from ${KERNELIMG} to the boot floppy" cp -p ${KERNELIMG} /mnt mkdir /mnt/boot echo "Copy boot1, boot2, and loader to boot floppy" (cd ${DESTDIR}/boot && cp -p boot1 boot2 loader /mnt/boot) echo "Create boot.config" echo "-P" > /mnt/boot.config echo "Create loader.rc" cat < /mnt/boot/loader.rc echo "BSD CDROM ROOT IMAGE" echo "LOADING KERNEL" load /kernel boot -C EOF umount /mnt } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message