containers / containers/toolbox
Unable to interact with /dev/ devices
- Dominant language
- Go
- Stars
- 3.5k
- Forks
- 262
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
I am unable to interact with /dev/ devices, e.g. `umount`, `dd`, e.t.c.
**Steps how to reproduce the behaviour**
1. `toolbox enter`
2. Attempt to interact with /dev/ devices
3. Unable to do so
**Expected behaviour**
- `umount` to run without any errors.
- `arm-image-installer --image=/var/home/user/Downloads/Fedora-IoT-37-20221118.0.aarch64.raw.xz --target=rpi4 --media=/dev/sdf --resizefs` to run without any errors.
**Actual behaviour**
```
⬢[root@toolbox ~]$ umount /dev/sdf*
umount: /dev/sdf: not mounted.
umount: /run/media/user/2C1D-D57D: block devices are not permitted on filesystem.
umount: /run/media/user/fcf6151d-3b76-42c9-84fe-3ed16ff7e627: block devices are not permitted on filesystem.
umount: /dev/sdf3: not mounted.
```
```
⬢[root@toolbox Downloads]# arm-image-installer --image=/var/home/user/Downloads/Fedora-IoT-37-20221118.0.aarch64.raw.xz --target=rpi4 --media=/dev/sdf --resizefs
=====================================================
= Selected Image:
= /var/home/user/Downloads/Fedora-IoT-37-20221118.0.aarch64.raw.xz
= Selected Media : /dev/sdf
= U-Boot Target : rpi4
= Root partition will be resized
=====================================================
*****************************************************
*****************************************************
******** WARNING! ALL DATA WILL BE DESTROYED ********
*****************************************************
*****************************************************
Type 'YES' to proceed, anything else to exit now
= Proceed? YES
fdisk: cannot open /dev/sdf: Permission denied
= Writing:
= /var/home/user/Downloads/Fedora-IoT-37-20221118.0.aarch64.raw.xz
= To: /dev/sdf ....
dd: failed to open '/dev/sdf': Permission denied
= Writing image complete!
Error: Error opening /dev/sdf: Permission denied
= Resizing /dev/sdf ....
fdisk: cannot open /dev/sdf: Permission denied
sfdisk: cannot open /dev/sdf: Permission denied
sfdisk: cannot open /dev/sdf: Permission denied
Error: Error opening /dev/sdf: Permission denied
Error: mount /dev/sdf2 /tmp/boot failed
```
**Output of `toolbox --version` (v0.0.90+)**
toolbox version 0.0.99.4
**Toolbox package info (`rpm -q toolbox`)**
toolbox-0.0.99.4-1.fc37.x86_64
**Output of `podman version`**
```
Client: Podman Engine
Version: 4.4.2
API Version: 4.4.2
Go Version: go1.19.6
Built: Wed Mar 1 11:22:59 2023
OS/Arch: linux/amd64
```
**Podman package info (`rpm -q podman`)**
podman-4.4.2-2.fc37.x86_64
**Info about your OS**
Fedora Silverblue 37
Contributor guide
Research direction
The issue names no source files or tests. Start by reproducing the failure with toolbox enter on Fedora Silverblue 37 using the reported Toolbox and Podman versions, then investigate device access during the toolbox session; done means umount and arm-image-installer can access the specified /dev/sdf device without permission errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100