NetBSD-Bugs archive

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

install/57988: sysinst partition editor has off-by-one errors



>Number:         57988
>Category:       install
>Synopsis:       sysinst partition editor has off-by-one errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 03 03:15:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD Partition
>Environment:
>Description:
16 GB disk (17 179 869 184 bytes) ld4.

# sysinst
>a: Installation messages in English
>a: Install NetBSD to hard disk
>b: Yes
>a: ld4 (16G)
>a: Guid Partition Table (GPT)
>b: Use default partition sizes

This shows the following partition table:

     Start (sec)    End (sec)   Size (sec)  FS type Flag Filesystem
    ------------ ------------ ------------ -------- ---- ----------------
 a:           64        65599        65536    MSDOS N    /boot
 b:        65600     31506431     31440832  FFSv2ea IN   /
 c:     31506432     33554416      2047985     swap

It's weird that end is odd, not even, because that means it has to be an _inclusive_ upper bound, i.e., end = start + size - 1, rather than end = start + size as I would expect -- or, weirder, it must mean that size is one _larger_ than the size of the partition.

I select this to change the /boot partition size:

>a:           64        65599        65536    MSDOS N    /boot
>c:             size : 65536 sec

This leads to:

Size (max 65535 sec) [65535]: 

Why is the maximum size 65535 and not 65536?

Here are two possibilities:

1. The maximum size is actually 65536 and the UI is wrong.
2. The maximum size is actually 65535 and the defaults are wrong leading to overlapping partitions and possibly data corruption or loss.
>How-To-Repeat:

>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index