Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Mar 2000 23:31:01 -0800 (PST)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Marc Frajola <marc@enginet.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: How to fdisk/disklabel whole disk for FreeBSD from command line?
Message-ID:  <Pine.BSF.4.21.0003032320080.10089-100000@resnet.uoregon.edu>
In-Reply-To: <200003010905.BAA16360@enginet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003032320080.10089-100000>