Subject: solved: disklabel: can't read master boot record
To: None <netbsd-users@netbsd.org>
From: Zafer Aydogan <zafer@gmx.org>
List: netbsd-users
Date: 11/30/2004 19:07:37
Solved ! 

after adding a new disk, the remaining disk wd2 moved to wd3, though
the device file were already created and not working for the new disk.
Deleting /dev/wd2* and recreating it via MAKEDEV solved the Problem.

Thanks!


> 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 ?
> 
> system is i386/1.6.1
> $ mount
> /dev/wd0a on / type ffs (soft dependencies, local)
> /dev/wd0e on /usr type ffs (soft dependencies, local)
> /dev/wd1a on /usr/ekssich type ffs (soft dependencies, local)
> /dev/wd3a on /usr/ftp/pub/NetBSD type ffs (soft dependencies, local)
> 
> Regards, Zafer.
> 
> 
>