Getting useful diagnostics from geom(8) and friends
Garrett Cooper
yanefbsd at gmail.com
Thu May 27 22:28:00 UTC 2010
On Thu, May 27, 2010 at 3:08 PM, Rick C. Petty
<rick-freebsd2009 at kiwi-computer.com> wrote:
> On Thu, May 27, 2010 at 05:02:41PM -0500, Rick C. Petty wrote:
>>
>> I'm not sure what you're doing wrong. Do the following steps work?
>>
>> % gpart create -s MBR /dev/ad4
>> % gpart bootcode -b /boot/boot0 /dev/ad4
>> % gpart add -b 34 -s 128 -t freebsd /dev/ad4
>> % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0
> ^^^^^^^^
> Oops, I meant /dev/ad4.
>
> In any case, show us the output of "gpart show /dev/ad4" if there are
> any problems.
Here's the entire operation; I realize there's a rounding error in
the size calculation with capacity...
Thanks,
-Garrett
./clear_and_rewrite_partitions ad4
+ atacontrol cap ad4
+ awk /^lba supported/ { print $3 }
+ capacity=268435455
+ dd if=/dev/zero of=/dev/ad4 bs=20m count=1
1+0 records in
1+0 records out
20971520 bytes transferred in 0.610148 secs (34371204 bytes/sec)
+ expr 0 + 268435455 / 1024 - 1
+ dd if=/dev/zero of=/dev/ad4 bs=1m oseek=262142
dd: /dev/ad4: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 0.021521 secs (0 bytes/sec)
+ ls /dev/ad4s*
ls: /dev/ad4s*: No such file or directory
+ gpart create -s MBR ad4
gpart: 22 scheme 'MBR'
+ gpart bootcode -b /boot/mbr -p /boot/boot0 -i 5 ad4
gpart: No such geom: ad4.
+ gpart add -b 34 -s 128 -t freebsd ad4
gpart: 22 geom 'ad4'
+ gpart show ad4
gpart: No such geom: ad4.
+ ls /dev/ad4s*
ls: /dev/ad4s*: No such file or directory
More information about the freebsd-geom
mailing list