From owner-freebsd-current@FreeBSD.ORG Thu Aug 5 13:39:48 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D212716A4CE for ; Thu, 5 Aug 2004 13:39:48 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBD8F43D54 for ; Thu, 5 Aug 2004 13:39:47 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i75Ddkb10401 for freebsd-current@freebsd.org; Thu, 5 Aug 2004 16:39:46 +0300 Date: Thu, 5 Aug 2004 16:39:46 +0300 From: Sergey Lyubka To: freebsd-current@freebsd.org Message-ID: <20040805163946.A7823@oasis.uptsoft.com> Mail-Followup-To: freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Subject: bootable image problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 13:39:48 -0000 I am trying to create an bootable image, this is a script that does the job: ==== cut here MD=/dev/md0 dd if=/dev/zero of=img count=8 bs=1m 2>/dev/null mdconfig -a -t vnode -u 0 -f img bsdlabel -Bw $MD bsdlabel $MD | sed -e '/ c:/{p;s/c:/a:/;}' | bsdlabel -R $MD /dev/stdin newfs -m 0 -o space -f 512 -b 4096 ${MD}a > /dev/null mkdir dsk mount ${MD}a `pwd`/dsk trap "umount ${MD}a ; mdconfig -d -u 0; rm -rf dsk; " EXIT cp /boot/kernel/kernel dsk/kernel mkdir dsk/boot cp /boot/loader* dsk/boot/ ===== cut here Booting this image with qemu, I see this: FreeBSD/i386 boot Default: 0:ad(0,a)/boot/loader boot: No /boot/loader Trying to boot /kernel, I see this: boot: error 12 lba 1008 Invalid format Any hints ?