Mount: Difference between revisions
From Leo's Notes
This page was last edited on 18 February 2020, at 18:52.
m force toc |
mounting without root |
||
| Line 1: | Line 1: | ||
[[Todo]] Merge all Mount articles here. | [[Todo]] Merge all Mount articles here. | ||
__FORCETOC__ | |||
== Remounting from Read-Only to Read-Write == | == Remounting from Read-Only to Read-Write == | ||
You can remount something that's mounted read-only by using the {{code|remount}} option. | You can remount something that's mounted read-only by using the {{code|remount}} option. | ||
| Line 7: | Line 7: | ||
# mount -o remount,rw / | # mount -o remount,rw / | ||
}} | }} | ||
== Mounting a disk image without root == | |||
Using {{code|udisksctl}}, you can mount disk images without requiring root or sudoers access. | |||
{{highlight|lang=terminal|code= | |||
$ dd if=/dev/zero of=test.img bs=1M count=100 | |||
$ udisksctl loop-setup -f test.img | |||
Mapped file $PATH_TO_IMAGE as /dev/loop0. | |||
}} | |||
Depending on your system, this may have triggered the loopmount to automount somewhere in {{code|/run/media/username}}. If nothing was mounted, manually mount the loopmount device: | |||
{{highlight|lang=terminal|code= | |||
$ udisksctl mount -b /dev/loop0 | |||
Mounted /dev/loop0 at /media/$USER/$IMAGE_NAME | |||
}} | |||
To unmount the filesystem: | |||
{{highlight|lang=terminal|code= | |||
$ udisksctl unmount -b /dev/loop0 | |||
$ udisksctl loop-delete -b /dev/loop0 | |||
}} | |||
See Also: https://wiki.debian.org/ManipulatingISOs | |||
Revision as of 18:52, 18 February 2020
Todo Merge all Mount articles here.
Remounting from Read-Only to Read-Write
You can remount something that's mounted read-only by using the remount option.
# mount -o remount,rw /
Mounting a disk image without root
Using udisksctl, you can mount disk images without requiring root or sudoers access.
$ dd if=/dev/zero of=test.img bs=1M count=100
$ udisksctl loop-setup -f test.img
Mapped file $PATH_TO_IMAGE as /dev/loop0.
Depending on your system, this may have triggered the loopmount to automount somewhere in /run/media/username. If nothing was mounted, manually mount the loopmount device:
$ udisksctl mount -b /dev/loop0
Mounted /dev/loop0 at /media/$USER/$IMAGE_NAME
To unmount the filesystem:
$ udisksctl unmount -b /dev/loop0
$ udisksctl loop-delete -b /dev/loop0
See Also: https://wiki.debian.org/ManipulatingISOs