NetBSD-Bugs archive

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

install/55376: sysinst doesn't show 0 byte swap partition on partition editor



>Number:         55376
>Category:       install
>Synopsis:       sysinst doesn't show 0 byte swap partition on partition editor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 12 17:35:00 +0000 2020
>Originator:     Izumi Tsutsui
>Release:        NetBSD 9.0
>Organization:
>Environment:
System: NetBSD 9.0 (RAMDISK) #0: Fri Feb 14 00:06:28 UTC 2020
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/cobalt/compile/RAMDISK
Architecture: maybe all
Machine: all
>Description:
sysinst doesn't show a swap partition on its partition editor
if swap partition size is empty.

In that case, partition c ("NetBSD partition" on ports RAW_PART==3)
is shown at "b:" line and partition d ("Whole disk") is shown
at "c:" line. It is really confusing users.

---

     Start (sec)    End (sec)   Size (sec)  FS type Flag Filesystem
    ------------ ------------ ------------ -------- ---- ----------------
 a:        20546      1049327      1028782   4.2BSD N    /
 b:        10304      1049327      1039024 NetBSD partition
 c:            0      1049327      1049328 Whole disk
 d:        10305        20544        10240 Linux Ex N    /stand
    ------------ ------------ ------------ -------- ---- ----------------

---

Note partition editor doesn't show swap partition,
partition seems written properly: (i.e. 0 byte swap):

---
# disklabel wd0
# /dev/rwd0:
 :

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1028782     20546     4.2BSD      0     0     0  # (Cyl.     20*-   1040)
 c:   1039024     10304     unused      0     0        # (Cyl.     10*-   1040)
 d:   1049328         0     unused      0     0        # (Cyl.      0 -   1040)
 e:     10240     10305 Linux Ext2      0     0        # (Cyl.     10*-     20*)

---

>How-To-Repeat:
GXemul is easier way to test.

% dd if=/dev/zero of=gxemul-cobalt.img bs=1m count=512
% ftp http://cdn.netbsd.org/pub/NetBSD/NetBSD-9.0/cobalt/binary/kernel/netbsd-RAMDISK.gz
% gxemul -X -E cobalt -d gxemul-cobalt.img netbsd-RAMDISK.gz

(see PR install/55375 for detailed procedure before partitioning)

---

 You can now change the sizes for the system partitions.  The default is to
 allocate all the space to the root file system.  However, you may wish to
 have separate /usr (additional system files), /var (log files etc) or /home
 (users' home directories) file systems.

 Free space will be added to the partition marked with a '+'.

       Size (sec)                            Filesystem
       ----------------------------------- - --------------------
    a: 10240                                 /stand
    b: 643072 (1028784)                    + /
    c: 0                                     <swap>
    d: 0                                     /tmp (mfs)
    e: 0                                     /usr
    f: 0                                     /var
       ----------------------------------- - --------------------
    h: Add a user defined partition
    i: Clone external partition(s)
    j: Change input units (sectors/cylinders/MB/GB)
   >x: Go on.  Free space 385712 sec.

---

 We now have your disklabel partitions for wd0 below.  This is your last   
 chance to change them. 
 
 Flags: (N)ewfs.  Total size: 507M, free: 1024B

     Start (sec)    End (sec)   Size (sec)  FS type Flag Filesystem
    ------------ ------------ ------------ -------- ---- ----------------
 a:        20546      1049327      1028782   4.2BSD N    /
 b:        10304      1049327      1039024 NetBSD partition
 c:            0      1049327      1049328 Whole disk
 d:        10305        20544        10240 Linux Ex N    /stand
    ------------ ------------ ------------ -------- ---- ----------------
 f: Add a partition
 g: Change input units (sectors/cylinders/MB/GB)
 h: Edit name of the disk
 i: Clone external partition(s)
 j: Cancel
>x: Partition sizes ok

---

>Fix:
No idea which code skip the empty swap partition for me.

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index