LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-02-2014, 10:36 AM   #1
Mahonri
Member
 
Registered: May 2007
Location: Austin, Texas, USA
Distribution: Debian Etch
Posts: 34

Rep: Reputation: 15
How to manipulate raw disk image as non-root user


Hi All,

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?

Thanks
 
Old 08-03-2014, 01:02 AM   #2
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
The following might be useful: http://en.wikibooks.org/wiki/QEMU/Images
 
Old 08-03-2014, 11:01 AM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Have admin create a new user with only those permissions maybe. Use it when you do these tasks and return to standard user when finished.
 
Old 08-06-2014, 09:13 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,670
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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.
 
Old 08-06-2014, 09:23 PM   #5
Mahonri
Member
 
Registered: May 2007
Location: Austin, Texas, USA
Distribution: Debian Etch
Posts: 34

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtualbox - Backups - Raw Disk vs Image File TracyTiger Linux - Virtualization and Cloud 13 07-26-2014 02:29 PM
LXer: Truncate KVM/QEMU Raw Disk Image LXer Syndicated Linux News 0 02-20-2012 01:50 AM
Mounting partitions contained within a raw disk image TJNII Linux - General 2 08-22-2011 10:53 AM
how to create raw socket with non root user successfully??? nagendrar Programming 4 06-30-2011 06:05 PM
Raw sockets root user work around P_Shep Programming 2 11-18-2003 11:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration