when mounting an .img via fstab, it shows duplicate in caja file manager
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MATE Desktop |
New
|
Unknown
|
|||
caja (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
nemo (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
thunar (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I have done [these procedures][1] to mount my .img file in `/etc/fstab` (for ubuntu mate 20.04 x64)
[Create `.img` file][2]:
```
dd if=/dev/zero of=filename.img bs=1024 count=2M
sudo mkfs.ext4 filename.img
```
Note: also be done with gparted with [this method][3]
**The problem:**
[Mount `/etc/fstab`][4] in `/mount/point`:
```
/home/user/
# or
/home/user/
# or
/home/user/
```
But always show 2 units: vdisk (mount) and loop (not mount) (see image)
[![enter image description here][5]][5]
if i try to click on this other drive showing unmounted i get the following message:
[![enter image description here][6]][6]
Why doesn't it just show the fileimage.img image mounted in the vdisk folder?
if I run any of the following commands:
```
sudo mount -a
# or
sudo mount /home/user/vdisk
```
The same thing that I describe in my post appears.
My fstab (I have altered the UUID for security reasons):
```
# / was on /dev/sda2 during installation
UUID=9f92d1aa-
# /boot/efi was on /dev/sda1 during installation
UUID=F798-ABCD /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
/home/user/
```
List:
```
sudo losetup --list | grep filename.img
/dev/loop8 0 0 1 0 /home/user/
```
But, if I remove the `/etc/fstab` line, delete `/dev/loop8` and mount `.img` image manually (with the followings commands), the described error does not appear
```
sudo mount -o loop /home/user/
# or
sudo mount -t ext4 -o loop /home/user/
```
**Workaround:**
mount `.img` manually to `/dev/loopXX` available:
```
losetup -f
/dev/loop8
sudo losetup -P /dev/loop8 filename.img
sudo losetup -l
/dev/loop8 0 0 0 0 /home/user/
```
edit `/etc/fstab` and put the line:
```
# /path/to/
# example:
/dev/loop8 /home/user/disk ext4 defaults 0 0
```
and:
`sudo mount -a`
But this method is not permanent and i should do what it explain in [this post][7]. But I consider that if all those steps are necessary to make a permanent loop, it is better not to use `fstab` and replace it with bash script that mounts `.img` and program it in the `crontab`.
**Summary:**
- There is no error
- The image is mounted (manually and with fstab)
**About mount:**
When mounting the `.img` in `fstab`, it appears **duplicated** (one is mounted and the other is not). This does not happen when mounting the `.img` manually or `/dev/loopXX` in `fstab`
Only Ubuntu Mate 20.04.3
This appears to be a bug in Ubuntu Mate 20.04.3. In Ubuntu version 20.04.3 this problem is not present
[![enter image description here][8]][8]
Link: https:/
[1]: https:/
[2]: https:/
[3]: https:/
[4]: https:/
[5]: https:/
[6]: https:/
[7]: https:/
[8]: https:/
tags: |
added: fstab removed: fs |
summary: |
- duplicate image when mounting .img format image in fstab + when mounting an .img via fstab, it shows duplicate in caja file manager |
Changed in mate-desktop: | |
status: | Unknown → New |
no longer affects: | ubuntu-mate |
Please report your bug upstream at https:/ /github. com/mate- desktop/ caja/issues and then share link here.