Quantcast
Channel: Active questions tagged automount - Ask Ubuntu
Viewing all articles
Browse latest Browse all 223

Stop automount of new loop device on Ubuntu 22.04

$
0
0

When creating a new loop device with udisksctl (command below), I want Ubuntu to only create the device without mounting it automatically. How do I do this on Ubuntu 22.04, and why did this work on Ubuntu 20.04?

With 22.04, Ubuntu automatically also mounts the device (containing an ext4 partition) to somewhere in /media on creation. This might happen because there is some configuration to allow automount for devices with ext4 partitions. If so, what file controls this config?

Curiously, with 20.04, the behavior was different. I had to separately call udisksctl (command below) to mount the new device.

Note, I really require separate mounting and device creation commands, since I am creating a script and I need to know the path to the newly mounted device, which is not shown when automount happens.

Commands

Loop device creation:

udisksctl loop-setup -f <diskimage.img> --offset=<partition offset>

Device mounting command

udisksctl mount -b <loopdev path>


Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>