Last active
May 28, 2023 06:07
-
-
Save cpuuntery/b8aff7fb190d3a871e54bcc826f65044 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gnome-disk-image-mounter --writable file.img | |
OR | |
1- sudo fdisk -l disk.img | |
2- value of the offset is (disk start number) * 512 | |
3- sudo mount -v -o offset=VALUE -t ext4 /path/to/image /mount/dir | |
sudo kpartx -a -v file.img | |
It is a decent alternative if gnome-disk-image-mounter does not exist for whatever reason. | |
But the only thing it can do is to write to the disk image. | |
It can not be used to shrink the disk image | |
only gnome-disk-image-mounter can be used to shrink disk images and modify it at the same time. | |
remember to unmount the partition after you finished your changes. If you don't do that, the disk image will be corrupted | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment