NetBSD-Bugs archive

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

install/55187: sysinst partition editor fails on x68k/9.0



>Number:         55187
>Category:       install
>Synopsis:       sysinst partition editor fails on x68k/9.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 20 12:55:00 +0000 2020
>Originator:     Tetsuya Isaki
>Release:        NetBSD 9.0
>Organization:
>Environment:
NetBSD 9.0/x68k
>Description:
On 9.0/x68k, sysinst partition editor fails if the target disk
has no Human68k partitions nor BSD disklabels.  Similar PR
(install/54921) which has already been closed is about if the
target disk has Human68k partitions but no BSD disklabels.

>How-To-Repeat:
Initialize harddisk by Human68k genuine FORMAT.X command
(and create no Human68k partitions) beforehand.
That is, there are no Human68k partitions nor BSD disklabels.

Boot from netbsd-9 (or -HEAD) sysinst.

Choose "a: Install NetBSD to hard disk".
Choose "b: Yes".
Choose "a: sd0 (512M)"
Choose "a: Set sizes of NetBSD partitions"
Then it displays the following partition table. (hand-copied)

| You can now change the sizes for the system partitions. ...
|
| Free space will be added to the partition marked with a '+'.
|
|     Size (sec)                            Filesystem
|     ----------------------------------- - --------------
| >a: 622592 (537919487)                  + /
|  b: 0                                     <swap>
|  c: 0                                     /tmp (mfs)
|  d: 0                                     /usr
|  e: 0                                     /var
|     ----------------------------------- - --------------
|  g: Add a user defined partition
|  h: Clone external partition(s)
|  i: Change input units (sectors/cylinders/MB/GB)
|  x: Go on.  Free space 537296895 sec.

As above, the size is strange.
537296895 of free space is 0x20067fff.  I found that this was
calculated by
     0x100000 (from partition[2].size by DIOCGDINFO)
 + 0x1fffffff (from partition[0].size by DIOCGDINFO)
 -    0x98000 (from pset->infos[0].size in bsddisklabel.c).
 
0x100000 is correct total number of sectors for this disk.  This
diskimage which I used was created by "dd count=512 bs=1m".
0x1fffffff is returned by readdisklabel() in
sys/arch/x68k/x68k/disksubr.c.

sd0 part of dmesg shows:
 sd0: fabricating a geometry
 sd0: 512 MB, 512 cyl, 64 head, 32 sec, 512 bytes/sect x 1048576 sectors
 sd0: async, 8-bit transfer

"disklabel -r sd0" shows:
 disklabel: could not read existing label


By the way, FYI, when I choose (forcely) "x: Go on" in this menu,
it displays following.  And it will naturally fail.

| We now have your disklabel partitions for sd0 below. ...
|
| Flags: (I)nstall, (N)ewfs.  Total size: 512M, free: 0B
|
|     Start (sec)    End (sec)   Size (sec)  FS type Flag Filesystem
|    ------------ ------------ ------------ -------- ---- -----------
| a:            0    536870910    536870911   unused N
| b:            0      1048575      1048576 Whole disk
| c:            0      1048575      1048576   4.2BSD
|    ------------ ------------ ------------ -------- ---- -----------
| e: Change input units (sectors/cylinders/MB/GB)
| f: Edit name fo the disk
| g: Clone external partition(s)
| h: Cancel
|>x: Partition sizes ok


On the other hand, sysinst on netbsd-8 (or before) does as following:

Choose "a: Install NetBSD to hard disk".
Choose "b: Yes".
Choose "a: sd0 (512M, ...)".
Choose "a: Set sizes of NetBSD partitions".
Then,

| You can now change the sizes for the system partitions. ...
|
| Free space will be added to the partition marked with a '+'.
|
|      MB         Cylinders   Sectors   Filesystem
| >a:    146   (383)       146    299008 + /
|  b:    128               128    262144   swap
|  c:      0                 0         0   /tmp (mfs)
|  d:      0                 0         0   /usr
|  e:      0                 0         0   /var
|  f:      0                 0         0   /home
|  g: Add a user defined partition
|  h: Change input units (sectors/cylinders/MB)
|  x: Accept partition sizes.  Free space 237 MB, 5 free partitions.

Even in this case, disklabel (and dmesg) is the same as above.
>Fix:
Sorry, I don't have.



Home | Main Index | Thread Index | Old Index