Subject: Re: disklabel: can't read master boot record
To: Zafer Aydogan <zafer@gmx.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-users
Date: 11/30/2004 23:35:45
On Tue, Nov 30, 2004 at 04:37:28PM +0100, Zafer Aydogan wrote:
> Hej Mailing-List,
> 
> I added two new disks to my system.
> 
> wd2 and sd0
> 
> disklabel produces this error:
> 
> # disklabel -i /dev/wd2
> disklabel: can't read master boot record: Undefined error: 0
> disklabel: ioctl DIOCGDINFO: Inappropriate ioctl for device
> 
> the other disk:
> # fdisk  /dev/sd0
> Disk: /dev/sd0d
> NetBSD disklabel disk geometry:
> cylinders: 8188 heads: 3 sectors/track: 172 (516 sectors/cylinder)
> 
> BIOS disk geometry:
> cylinders: 263 heads: 255 sectors/track: 63 (16065 sectors/cylinder)
> 
> Partition table:
> 0: sysid 165 (FreeBSD or 386BSD or old NetBSD)
>     start 63, size 4225032 (2063 MB), flag 0x80
>         beg: cylinder    0, head   1, sector  1
>         end: cylinder  262, head 254, sector 63
> 1: <UNUSED>
> 2: <UNUSED>
> 3: <UNUSED>
> 
> # disklabel -i /dev/sd0
> disklabel: old BSD partition ID!
> partition>P
> 16 partitions:
> #        size    offset     fstype  [fsize bsize cpg/sgs]
>  a:   4226725         0     4.2BSD   2048 16384 28552   # (Cyl.    0 - 263*)
>  d:   4226725         0     unused      0     0         # (Cyl.    0 - 263*)
> partition>Q
> # newfs /dev/sd0a
> With 16065 sectors per cylinder, minimum cylinders per group is 64
> This requires the block size to be changed from 16384 to 32768
>         and the fragment size to be changed from 2048 to 4096
> 
> # newfs -b 32768 -f 4096 /dev/sd0a
> Warning: insufficient space in super block for
>  rotational layout tables with nsect 63 and ntrak 255.
> File system performance may be impaired.
> Warning: 14440 sector(s) in last cylinder unallocated
> /dev/sd0a:      4226720 sectors in 264 cylinders of 255 tracks, 63 sectors
>         2063.8MB in 5 cyl groups (64 c/g, 502.03MB/g, 26368 i/g)
> super-block backups (for fsck -b #) at:
>       64, 1028288, 2056512, 3084736, 4112960,
> wtfs: write error for sector 16: Read-only file system
> #
> Huh ?
> Any Ideas ?
> How do I write a new Masterbootrecord on my Disk wd2 ?

fdisk -i wd2
and then
fdisk -u wd2

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--