GNU bug report logs -
#78574
gnome-disks cannot format partitions unless udisksd is run as root
Previous Next
To reply to this bug, email your comments to 78574 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org:
bug#78574; Package
guix.
(Sat, 24 May 2025 02:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org.
(Sat, 24 May 2025 02:30:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
When running gnome-disks, even as root, I cannot format partitions with
it: the only "filesystem" that works is "unformated".
Ext4 seems available but when selected it fails to format the partition
and the rest of the filesystems are greyed out.
This is with (service udisks-service-type) in my system configuration.
However if run 'killall udisksd' and manually run udisksd as root,
gnome-disks can format most filesystems.
What happens behind the scenes is that gnome-disks uses some dbus
wrapper functions to ask the information to Udisks2 through the
/org/freedesktop/UDisks2/Manager org.freedesktop.UDisks2.Manager
CanFormat function. It then caches it.
I've confirmed with d-spy that this function returns true with
parameters like like 'exfat' (with the quotes) when udisksd runs as
root and false when it doesn't.
Udisksd then uses the bd_fs_can_mkfs function from blockdev to get the
information. I've not read yet the bd_utils_check_util_version that
does the actual check though.
I've also tried to call bd_fs_can_mkfs in a standalone C program but it
didn't work (it probably needs a bit more setup than copying the
udisksd call to it).
And I also didn't look at the udisks-service-type yet. I'll try to find
more time to dig into bd_utils_check_util_version to understand why it
fails.
PS: I've tried to send a bug report on Codeberg to be able to test it
but I only found 'guix-mirror' and no way to bug report there yet
and I can't see the only bug report either due to Anubis even while
being logged to Codeberg.
Denis.
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org:
bug#78574; Package
guix.
(Sat, 11 Oct 2025 00:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 78574 <at> debbugs.gnu.org (full text, mbox):
Hey Denis,
> When running gnome-disks, even as root, I cannot format partitions with
> it: the only "filesystem" that works is "unformated".
>
> Ext4 seems available but when selected it fails to format the partition
> and the rest of the filesystems are greyed out.
>
> This is with (service udisks-service-type) in my system configuration.
>
> However if run 'killall udisksd' and manually run udisksd as root,
> gnome-disks can format most filesystems.
I also see this issue, and the workaround fixes it for me too.
> What happens behind the scenes is that gnome-disks uses some dbus
> wrapper functions to ask the information to Udisks2 through the
> /org/freedesktop/UDisks2/Manager org.freedesktop.UDisks2.Manager
> CanFormat function. It then caches it.
>
> I've confirmed with d-spy that this function returns true with
> parameters like like 'exfat' (with the quotes) when udisksd runs as
> root and false when it doesn't.
>
> Udisksd then uses the bd_fs_can_mkfs function from blockdev to get the
> information. I've not read yet the bd_utils_check_util_version that
> does the actual check though.
>
> I've also tried to call bd_fs_can_mkfs in a standalone C program but it
> didn't work (it probably needs a bit more setup than copying the
> udisksd call to it).
>
> And I also didn't look at the udisks-service-type yet. I'll try to find
> more time to dig into bd_utils_check_util_version to understand why it
> fails.
My findings are this issue is due to udisksd not inheriting PATH from the
service that executes it, so it can't find mkfs executables from
/run/current-system/profile/{s,}bin.
I've submitted a potential fix: https://codeberg.org/guix/guix/pulls/3466
With regards to the non-root behavior, is udisksd ever supposed to be run as a
user? I think that might not be a problem if it's intended to be run as a D-Bus
system service, right?
Cheers,
Alvin
Reply sent
to
aurtzy <aurtzy <at> gmail.com>:
You have taken responsibility.
(Tue, 14 Oct 2025 22:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
bug acknowledged by developer.
(Tue, 14 Oct 2025 22:38:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 78574-done <at> debbugs.gnu.org (full text, mbox):
This issue should be resolved now. See
<https://codeberg.org/guix/guix/pulls/3466> and
<https://codeberg.org/guix/guix/pulls/3531>.
> Hey Denis,
>
> > When running gnome-disks, even as root, I cannot format partitions with
> > it: the only "filesystem" that works is "unformated".
> >
> > Ext4 seems available but when selected it fails to format the partition
> > and the rest of the filesystems are greyed out.
> >
> > This is with (service udisks-service-type) in my system configuration.
> >
> > However if run 'killall udisksd' and manually run udisksd as root,
> > gnome-disks can format most filesystems.
>
> I also see this issue, and the workaround fixes it for me too.
>
> > What happens behind the scenes is that gnome-disks uses some dbus
> > wrapper functions to ask the information to Udisks2 through the
> > /org/freedesktop/UDisks2/Manager org.freedesktop.UDisks2.Manager
> > CanFormat function. It then caches it.
> >
> > I've confirmed with d-spy that this function returns true with
> > parameters like like 'exfat' (with the quotes) when udisksd runs as
> > root and false when it doesn't.
> >
> > Udisksd then uses the bd_fs_can_mkfs function from blockdev to get the
> > information. I've not read yet the bd_utils_check_util_version that
> > does the actual check though.
> >
> > I've also tried to call bd_fs_can_mkfs in a standalone C program but it
> > didn't work (it probably needs a bit more setup than copying the
> > udisksd call to it).
> >
> > And I also didn't look at the udisks-service-type yet. I'll try to find
> > more time to dig into bd_utils_check_util_version to understand why it
> > fails.
>
> My findings are this issue is due to udisksd not inheriting PATH from the
> service that executes it, so it can't find mkfs executables from
> /run/current-system/profile/{s,}bin.
>
> I've submitted a potential fix: https://codeberg.org/guix/guix/pulls/3466
>
> With regards to the non-root behavior, is udisksd ever supposed to be run as a
> user? I think that might not be a problem if it's intended to be run as a D-Bus
> system service, right?
>
> Cheers,
>
> Alvin
This bug report was last modified 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.