nanobsd disk info
Paul Schenkeveld
fb-small at psconsult.nl
Tue Mar 22 15:53:19 PST 2005
Hi,
On Thu, Mar 17, 2005 at 11:51:07AM -0500, Michael W. Lucas wrote:
> Hi,
>
> I'm obviously missing something here.
>
> I'm trying to get nanobsd on a 512Mb flash card. The only changes
> I've made are to set kernconf = net4801 in make.conf and to set the
> Makefile disk geometry variables. "make" chokes on the disk geometry,
> so I'm assuming I've set it wrong.
>
> My diskinfo shows as:
>
> mwl-crash2~;sudo diskinfo -v da0
> da0
> 512 # sectorsize
> 512483840 # mediasize in bytes (489M)
> 1000945 # mediasize in sectors
> 488 # Cylinders according to firmware.
> 64 # Heads according to firmware.
> 32 # Sectors according to firmware.
Somehow these numbers are not consistent:
488 cyls * 64 heads * 32 secs = 999424 secs
What does dmesg show about da0?
> I tried to put this into the nanobsd/Makefile as:
>
> from Makefile:
>
> # Physical disk paramters. Use diskinfo(8) on the target platform
> # to find the correct numbers. We assume 512 bytes sectors.
> HD?=64
> SC?=32
> SECTS?=1000945
>...
> + awk
> {
> cs = $2 * $3
> cyl = $1 / cs
> print "g c" cyl " h" $3 " s" $2
> dsl = int (($4 + cs - 1) / cs)
> csl = int ((cyl - dsl) / 2)
> dsl = cyl - csl * 2
> print "p 1 165 " $2, csl * cs - $2
> print "p 2 165 " $2 + csl * cs, csl * cs - $2
> print "p 3 165 " 2 * csl * cs, dsl * cs
> }
>
> + cat /tmp/nanobsd.PaEr1DcL
> g c488.743 h64 s32
> p 1 165 32 493536
> p 2 165 493600 493536
> p 3 165 987136 13809
> + fdisk -i -f /tmp/nanobsd.PaEr1DcL md0
> fdisk: invalid fdisk partition table found
> fdisk: ERROR line 1: incorrect number of geometry args
> ******* Working on device /dev/md0 *******
Sure, the cylinder count as computed above must be an integer, that's
why fdisk complains.
> Any thoughts?
>
> ==ml
Regards,
Paul Schenkeveld, Consultant
PSconsult ICT Services BV
More information about the freebsd-small
mailing list