Date: Fri, 4 May 2001 11:48:50 -0400 From: Brian Dean <bsd@bsdhome.com> To: Rick Duvall <maillist@coastsight.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Set up loader to boot cd Message-ID: <20010504114850.A18459@vger.bsdhome.com> In-Reply-To: <Pine.BSF.4.21.0104301128100.70711-100000@ns1.coastsight.com>; from maillist@coastsight.com on Mon, Apr 30, 2001 at 11:31:22AM -0700 References: <Pine.BSF.4.21.0104301128100.70711-100000@ns1.coastsight.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <<EOF > /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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010504114850.A18459>