From owner-freebsd-hackers Fri Mar 3 23:31: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id 1114037B51C for ; Fri, 3 Mar 2000 23:31:04 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id XAA86193; Fri, 3 Mar 2000 23:31:02 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 3 Mar 2000 23:31:01 -0800 (PST) From: Doug White To: Marc Frajola Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to fdisk/disklabel whole disk for FreeBSD from command line? In-Reply-To: <200003010905.BAA16360@enginet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 1 Mar 2000, Marc Frajola wrote: > > What are you using for your command lines? You have to target the > > disklabel specifically at slice 1 on the disk otherwise disklabel will > > think you're trying to overwrite the slice table and get mad. > > Here's what I did: > > fdisk -e /dev/rda1 > disklabel -r -w da1 auto Yeah, this is wrong. You need to specify a slice. I generally don't depend on the 'auto' magic -- it breaks for IDE disks, and I'm not sure it works for slices either. > OK, may I ask what the ".. magic .." part is?? Take a look at src/release/picobsd/install/floppy.tree/etc/prepdisk in the source tree. This is an awk script that generates a root partition and 255MB of swap on the target disk by doing the higher math on the number of sectors on the disk. You may have to change the disk type in the script but otherwise it's the same for IDE and SCSI. I'm looking at the script and notice that it doesn't select slice 1... somehow disklabel DTRT. It works here :-) Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org PS: http://www.freebsd.org/cgi/cvsweb.cgi is really handy for browsing the source tree. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message