Bug 31396 - diskdrake started from terminal or console does not initially display partitions if only 1 disk
Summary: diskdrake started from terminal or console does not initially display partiti...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: FOR_ERRATA9
: 19171 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-01-12 02:28 CET by Frank Griffin
Modified: 2023-07-07 15:40 CEST (History)
3 users (show)

See Also:
Source RPM: drakxtools-18.52-1.mga9.src.rpm
CVE:
Status comment:


Attachments
diskdrake screenshot (17.53 KB, image/png)
2023-01-12 02:32 CET, Frank Griffin
Details
df screenshot (80.42 KB, image/png)
2023-01-12 02:34 CET, Frank Griffin
Details
diskdrake on Mageia 9 (44.37 KB, image/png)
2023-01-12 03:27 CET, Dave Hodgins
Details

Description Frank Griffin 2023-01-12 02:28:55 CET
On systems installed where /dev/sd** disks are named /dev/nvme0n1p*, diskdrake starts up showing only nvme0n1p1 and none of the others.

I'll attach screenshots of diskdrake and a df showing several other nvme0n1p* disks.
Comment 1 Frank Griffin 2023-01-12 02:32:52 CET
Created attachment 13640 [details]
diskdrake screenshot
Comment 2 Frank Griffin 2023-01-12 02:34:12 CET
Created attachment 13641 [details]
df screenshot
Comment 3 Dave Hodgins 2023-01-12 03:27:14 CET
Created attachment 13642 [details]
diskdrake on Mageia 9

Here's a diskdrake snapshot from my laptop. Fully up-to-date cauldron install
showing it's working on that system.

CC: (none) => davidwhodgins

Comment 4 Frank Griffin 2023-01-12 15:42:59 CET
This is an up-to-date duplicate of bug#19171.  If you start from the diskdrake screenshot I posted, switch to Expert mode, and switch back, the partition tabs are all painted correctly.

Note that the key for this appears to be that diskdrake is started as root from a terminal.

This is also an up-to-date cauldron system, updated several times a day (I have a boring life).

Since this has more information, I'll mark the older one a duplicate.
Frank Griffin 2023-01-12 15:43:44 CET

Summary: diskdrake can't find most nvme0n1p* disks => diskdrake started from root prompt can't find most nvme0n1p* disks

Comment 5 Frank Griffin 2023-01-12 15:46:36 CET
*** Bug 19171 has been marked as a duplicate of this bug. ***
Comment 6 Lewis Smith 2023-01-12 20:24:51 CET
This problem is wider than you (Frank) describe, and not confined to nvme 'discs'; at least not here, I only have (I think) one SSD.

Trying this on my own Cauldron system:
* Launching diskdrake from a root terminal, no partitions are initially shown for the selected device.
* Launching diskdrake from a user terminal, it asks for admin password, the initial display shows no partitions.
* Launching diskdrake from a user terminal via sudo, no partitions shown initially.
The 3 cases above, assume dismissed the backup popup, clicking 'Advanced' immediately displays partitions.

* Going via MCC-Local Discs-Manage Disc Partitions shows them correctly.

Assigning to the Mageia tools people.

Flagging 'for errata' in case it does not get fixed before release; can be undone.

Source RPM: drakx-tools => drakxtools-18.52-1.mga9.src.rpm
Assignee: bugsquad => mageiatools
CC: (none) => lewyssmith
Keywords: (none) => FOR_ERRATA9

Comment 7 Pascal Terjan 2023-01-12 20:31:25 CET
I could reproduce and they key is that it only happens on machines with a single disk.

We already have some code to workaround a bug in that situation  http://gitweb.mageia.org/software/drakx/commit/perl-install/diskdrake/hd_gtk.pm?id=e44a107c6d3465a5f3afc9a5c243be86b341c099 (from bug #18076), but it is not enough to have things displayed properly.

Calling $update_all->(1); instead of $notebook_widget->set_current_page(0); after $notebook_widget->remove_page(0); seems to fix the problem here but I am not sure what is going on and this code is a workaround on top of a workaround so it could benefit with understanding it more rather than refreshing one more time.

Instead commenting "return if $initializing && $not_first;" also fixes it, to allow updating again while $initializing is true.

There has been so many bugs and workarounds here that we should clean it up but that will require testing as standalone and in installer with one or several disks for each.

http://gitweb.mageia.org/software/drakx/commit/perl-install/diskdrake/hd_gtk.pm?id=a6bbd53b018cff4c36b31347d72b8b915ffa8583
http://gitweb.mageia.org/software/drakx/commit/perl-install/diskdrake/hd_gtk.pm?id=cd7ce13e2f90bf25cedfcec1a606948b7b9897df
http://gitweb.mageia.org/software/drakx/commit/perl-install/diskdrake/hd_gtk.pm?id=e44a107c6d3465a5f3afc9a5c243be86b341c099
Comment 8 Lewis Smith 2023-01-12 20:39:24 CET
Thanks for your instant response.
It should not be difficult to test, because from command line, it happens immediately. We have not had any installer complaints that I know of, so something must be different there.

Summary: diskdrake started from root prompt can't find most nvme0n1p* disks => diskdrake started from terminal or console does not initially display partitions if only 1 disc

Comment 9 Dave Hodgins 2023-01-12 23:47:38 CET
comment 7 explains why I don't see it even when I run diskdrake after using
"su -" in konsole, as I have two nvme drives in my laptop.
Comment 10 Dave Hodgins 2023-01-12 23:59:06 CET
Also, please clarify. Are the people seeing this bug using "su" or "su -" to
become root?
Comment 11 Frank Griffin 2023-01-13 01:28:20 CET
"su -l" in my case.
Comment 12 Lewis Smith 2023-01-13 19:49:25 CET
In my comment 6, for the first case root GUI terminal I always do just 'su'; consciously preferring to remain in my home directory rather than switch to root's. Seems less dangerous.

CC: lewyssmith => (none)

Comment 13 Frank Griffin 2023-01-13 19:56:05 CET
(In reply to Lewis Smith from comment #12)
> In my comment 6, for the first case root GUI terminal I always do just 'su';
> consciously preferring to remain in my home directory rather than switch to
> root's. Seems less dangerous.

The usual reason for recommending "su -l" is that just "su" can result in the inadvertent creation of files owned by root in a user directory, e. g. /home/xxxx.
Comment 14 Dave Hodgins 2023-01-13 22:39:23 CET
(In reply to Lewis Smith from comment #12)
> In my comment 6, for the first case root GUI terminal I always do just 'su';
> consciously preferring to remain in my home directory rather than switch to
> root's. Seems less dangerous.

https://wiki.mageia.org/en/Never_use_just_su

Regarding the diskdrake problem, I can recreate it on my rpi4b which only
has one drive, /dev/mmcblk0.
David Walser 2023-01-18 01:05:32 CET

Summary: diskdrake started from terminal or console does not initially display partitions if only 1 disc => diskdrake started from terminal or console does not initially display partitions if only 1 disk

Comment 15 Pascal Terjan 2023-01-18 21:44:37 CET
I have submitted drakxtools-18.55

CC: (none) => pterjan

Comment 16 Morgan Leijström 2023-07-07 15:40:55 CEST
Issue solved?

CC: (none) => fri


Note You need to log in before you can comment on or make changes to this bug.