unshare: failed to execute /bin/true: Permission denied

Bug #2122351 reported by hectorsales
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
coreutils-from (Ubuntu)
Won't Fix
Undecided
Unassigned
rust-coreutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

Steps:

1- I modify the grub file in the /etc/defaul/grub, the line:

#GRUB_DISABLE_OS_PROBER=true
GRUB_DISABLE_OS_PROBER=false

2- Run : sudo update-grub2 and return:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.17.0-3-generic
Found initrd image: /boot/initrd.img-6.17.0-3-generic
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Found memtest86+ 32bit EFI image: /boot/memtest86+ia32.efi
Found memtest86+ 64bit image: /boot/memtest86+x64.bin
Found memtest86+ 32bit image: /boot/memtest86+ia32.bin
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
unshare: failed to execute /bin/true: Permission denied
/usr/bin/os-prober: 25: mktemp: Permission denied
/usr/bin/os-prober: 17: cannot create /dmraid-map: Permission denied
/usr/bin/os-prober: 18: rm: Permission denied
Adding boot menu entry for UEFI Firmware Settings ...
done

3- Check /bin/true with: ls -l /bin/true and return:

lrwxrwxrwx 1 root root 31 Sep 4 12:07 /bin/true -> ../lib/cargo/bin/coreutils/true

4- Consequence: It does not detect Windows system.

ProblemType: Bug
DistroRelease: Ubuntu 25.10
Package: coreutils 9.5-1ubuntu2+0.0.0~ubuntu22
ProcVersionSignature: Ubuntu 6.17.0-3.3-generic 6.17.0-rc3
Uname: Linux 6.17.0-3-generic x86_64
ApportVersion: 2.33.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Sep 8 18:59:32 2025
InstallationDate: Installed on 2025-09-01 (7 days ago)
InstallationMedia: Ubuntu 25.10 "Questing Quokka" - Daily amd64 (20250728)
PackageArchitecture: all
ProcEnviron:
 LANG=es_ES.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: coreutils-from
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
hectorsales (hectorvicente30) wrote :
Revision history for this message
Walt Holman (waltholman) wrote :

This is due to a missing file section in the /etc/apparmor.d/os-prober file. If you edit that file and find the line that looks like:
  file /usr/bin/** ix,

and add a new line and enter the following:
  file /usr/lib/cargo/bin/coreutils/** ix,

and restart the apparmor service it should fix it. It's due to the change to the rust version of the coreutils and the ability to swap between rust or gnuutils. Basically the real files are located in a subdirectory and the /usr/bin directory just contains symllinks.

Revision history for this message
hectorsales (hectorvicente30) wrote :

Thanks, add a new line in the /etc/apparmor.d/os-prober:

"file /usr/lib/cargo/bin/coreutils/** ix."

Works greats for me!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in coreutils-from (Ubuntu):
status: New → Confirmed
Changed in coreutils-from (Ubuntu):
milestone: none → ubuntu-25.10-beta
Revision history for this message
Jeremie Tamburini (jeremie2) wrote :

Hi,
almost the same situation but with a mutiboot Ubuntu 25.10, Ubuntu 24.04, Debian... and I still had problems.

I've modified /etc/apparmor.d/os-prober and /etc/default/grub and this helped to avoid the "Permission denied" message running the update-grub. Problem was that I still couldn't see the other operating systems on grub menu.

Here's a summary of what I did.
1. Modified /etc/apparmor.d/os-prober adding the string:
    file /usr/lib/cargo/bin/coreutils/** ix,
2. Make sure that /etc/default/grub is configured to detect other os and show them in the boot menu:
    GRUB_TIMEOUT_STYLE=menu
    GRUB_TIMEOUT=10
    GRUB_DISABLE_OS_PROBER=false
3. Restart apparmor:
    sudo /etc/init.d/apparmor restart
4. Save this setup running:
    sudo update-grub
...and I could see that the other os were detected, but when I rebooted the system grub menu only showed the 25.10.
Did I forget something?

Another problem was that the EFI menu showed only the Ubuntu 25.10 entry.
I recovered grub performing a chroot in a live session so that now the "main" system is Ubuntu 24.04.

Please let me know if there is anything I can do to help.

tags: added: rls-qq-incoming
Revision history for this message
Francis De Brabandere (francisdb) wrote :

Thanks.
What disabled os-prober in the first place?

Changed in coreutils-from (Ubuntu):
milestone: ubuntu-25.10-beta → ubuntu-25.10
Changed in coreutils-from (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.