nanobsd disk info
Michael W. Lucas
mwlucas at blackhelicopters.org
Thu Mar 17 08:51:09 PST 2005
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.
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
_.md.tmp reports:
+ SECTS=1000945
+ HD=64
+ SC=32
+ DATASIZE=10240
+ PRIROOTSLICE=ad0s1a
+ ALTROOTSLICE=ad0s2a
+ CFGSLICE=ad0s3
+ WD=/usr/obj/usr/src/tools/tools/nanobsd/_.w
+ IMG=/usr/obj/usr/src/tools/tools/nanobsd/_.i
+ CFGMASTER=
+ mktemp -t nanobsd
+ TMPFILE0=/tmp/nanobsd.Xh06zIAU
+ mktemp -t nanobsd
+ TMPFILE1=/tmp/nanobsd.PaEr1DcL
+ mktemp -d -t nanobsd
+ TMPMNT=/tmp/nanobsd.j5J1mq2A
+ get_label ad0s1a
+ echo
+ PRIROOTLABEL=
+ get_label ad0s2a
+ echo
+ ALTROOTLABEL=
+ get_label ad0s3
+ echo
+ CFGLABEL=
+ dd if=/dev/zero of=/tmp/nanobsd.Xh06zIAU count=1000945
1000945+0 records in
1000945+0 records out
512483840 bytes transferred in 28.422601 secs (18030857 bytes/sec)
+ mdconfig -a -t vnode -f /tmp/nanobsd.Xh06zIAU -x 32 -y 64
+ MD=md0
+ rm -f /tmp/nanobsd.Xh06zIAU
+ echo 1000945 32 64 10240
+ 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 *******
Any thoughts?
==ml
--
Michael W. Lucas mwlucas at FreeBSD.org, mwlucas at BlackHelicopters.org
http://www.BlackHelicopters.org/~mwlucas/
Latest book: Cisco Routers for the Desperate
http://www.CiscoRoutersForTheDesperate.com
More information about the freebsd-small
mailing list