NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54882: Stange default disklabels generated for non-512 byte disks



>Number:         54882
>Category:       kern
>Synopsis:       Stange default disklabels generated for non-512 byte disks
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 21 19:50:00 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.40
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD seven-days-to-the-wolves.aprisoft.de 9.99.40 NetBSD 9.99.40 (GENERIC) #342: Tue Jan 21 08:31:04 CET 2020 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

Creating a vnd with 2048 byte sectors cause pretty strange fictious disklabels.

This confuses the heuristic in sysinst that is trying to tell a pure fictious
(empty) disklabel from something that either has a real disklabel on disk
or is generated via automatic conversion magic in the kernel from a foreign
partitioning scheme. It also looks bad and causes lots of overlapping
partition warnings.

>How-To-Repeat:

Create a file of zeros and configure a vnd on it, like:

-rw-r--r--  1 root  wheel  524288000 Jan 18 20:01 disk_small.img
 # vnconfig -c vnd0 disk_small.img 2048/32/16/256

and then check the disklabel:

# /dev/rvnd0:
type: vnd
disk: vnd
label: default label
flags:
bytes/sector: 2048
sectors/track: 32
tracks/cylinder: 16
sectors/cylinder: 512
cylinders: 256
total sectors: 256000
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 b:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 c:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 d:    256000         0     unused      0     0        # (Cyl.      0 -    499)
 e:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 f:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 g:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 h:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 i:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 j:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 k:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 l:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 m:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 n:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 o:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 p:    256000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)


>Fix:
n/a



Home | Main Index | Thread Index | Old Index