Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to be able to create, partition, format, mount, and populate a disk image file as a non-root user. I am able to create the raw image file with dd and partition it with parted as a non-root user. However, I have not found a way to format, mount, and populate it as a non-root user. There are some great tools like losetup and kpartx which are perfect for the job except they must be run as root.
Surely there must be a way to do this as non-root. Does anyone know of a way using fuse, qemu, or a similar tool?
A disk-image file is, of course, "just a file," even though it has an internal structure that corresponds to ... perhaps in a compressed sort of way ... the block-structure of a hard drive. (It also has various data integrity check features.) Utilities to manage these files are "an easy Google search away," and they do not require root privileges.
My particular challenge is that I need to be able to create and populate one ext partition and one vfat partition within the same image. I have found the genext2fs utility which can create an image with an ext partition as non-root. There are also the mtools which can copy files into a fat partition image as non-root. However, I don't currently have a way to combine the two into one image.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.