Re: Weird issues with fdisk/dd

From:

Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>

Date:

Thu, 7 Jun 2007 20:37:32 -0700 (PDT)

:Hello Collective,
:
:I'm currently in the process of moving from FreeBSD to DragonFlyBSD for
:some operations, as clearly DragonFly is the way forward.
:
:I've got it installed on one of the production machines, but seemingly I
:am unable to use the second disk. There is an existing table on it, and
:it is probably incorrect, however, I am getting the following messages:
What are you running, the 1.8 release or 1.9 development? There are
some very major differences in how storage is handled between the two.
It kinda looks like you are running 1.9.
:kelley# fdisk /dev/ad6
:******* Working on device /dev/ad6 *******
:parameters extracted from device are:
:cylinders=19457 heads=255 sectors/track=63 (16065 blks/cyl)
:
:Figures below won't work with BIOS for partitions not in cyl 1
:parameters to be used for BIOS calculations are:
:cylinders=19457 heads=255 sectors/track=63 (16065 blks/cyl)
:
:fdisk: can't read fdisk partition table
:fdisk: /boot/mbr: length must be a multiple of sector size
:
:kelley# dd if=/dev/zero of=/dev/ad6 bs=1024k count=10
:dd: /dev/ad6: Invalid argument
:1+0 records in
:0+0 records out
:0 bytes transferred in 0.018139 secs (0 bytes/sec)
:
:After these, the kernel has logged the following to dmesg:
:
:dscheck(#ad/0x10032): illegal partition number (2) for WHOLE_DISK_SLICE
:access
:dscheck(#ad/0x10032): illegal partition number (2) for WHOLE_DISK_SLICE
:access
For 1.9 you are going to have to regenerate all your devices in
/dev.
cd /dev
rm ad*
./MAKEDEV ad0
./MAKEDEV ad1
./MAKEDEV ad2
etc...
Same with acd, cd, da, and any other storage devices you use.
:Is there anyway to rewrite/zero the mbr, as running fdisk -B /dev/ad6
:also produces the above errors.
:
:Thanks in advance,
:Joe Holden
Yes, what you did will work, once you fix the devices in /dev.
-Matt
Matthew Dillon
<dillon@backplane.com>