From owner-freebsd-fs@FreeBSD.ORG Tue Jul 25 18:34:11 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0A5416A4DA for ; Tue, 25 Jul 2006 18:34:11 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 26B2A43D66 for ; Tue, 25 Jul 2006 18:34:10 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 32158 invoked by uid 2001); 25 Jul 2006 18:34:10 -0000 Date: Tue, 25 Jul 2006 13:34:10 -0500 From: "Rick C. Petty" To: Shane Adams Message-ID: <20060725183410.GA32063@megan.kiwi-computer.com> References: <44C6430D.1050506@centtech.com> <20060725175331.78302.qmail@web31806.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060725175331.78302.qmail@web31806.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org Subject: Re: Advice for hacking on ufs/ffs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2006 18:34:12 -0000 On Tue, Jul 25, 2006 at 10:53:31AM -0700, Shane Adams wrote: > > I used dd to create 1G file. A faster way is: touch filename truncate -s 1g filename You also may wish to look at qemu-img, which is installed with qemu. > I did mdconfig -a -t vnode -f /bigdrive/bsdfilesystem -u 0 I'm pretty sure "-t vnode" is implied by "-f". > I downloaded the 20M boot only ISO. > > I ran qemu specifying -cdrom as the 20M iso, and -hda to /bigdrive/bsdfilesystem. > > Qemu started fine, and I proceeded to go through the basic install process, at that point it asked me to toss in the correct CD with the packages to complete the installation (Which I didnt' have the CD handy and it was late so I will try again tonight). You didn't use the network install, especially if you only had the boot-only CD? If your media type was set to network, it should have attempted to grab the packages from there. Not that you need any packages installed to play with UFS. > Anyway - you said you do a make DESTDIR to your mdconfig'd file. Did you mount the file you mdconfiged? You have to mount it because DESTDIR points to a directory, not a device or image. I'd suggest: mount /dev/md0s1a /mnt [mount your other filesystems, if applicable, under /mnt/] cd /usr/src; make DESTDIR=/mnt installworld installkernel cd /usr/src/etc; make DESTDIR=/mnt distribution > If so, does a make installworld install a boot loader as well? No. > I'm not clear on how you used qemu to boot agains that device. Perhaps you did a normal BSD install on it then later mounted it to get your stuff on there? That would be easier, but you might wish to put an MBR and a label on your image: fdisk -BI /dev/md0 bsdlabel -Bw /dev/md0 You may wish to partition the label for separate file systems, although that's not necessary. Don't forget to newfs each of your filesystems, e.g. newfs /dev/md0s1a Using this method won't require you to run the installer inside qemu. The nice thing about using qemu to test your hacking is that you can use the -snapshot mode to preserve the disk image(s), that way if the qemu "box" panics, you don't need to fsck or any of that. -- Rick C. Petty