LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-28-2007, 05:39 AM   #1
secretlydead
Member
 
Registered: Sep 2003
Location: Qingdao, China
Distribution: mandriva, slack, red flag
Posts: 249

Rep: Reputation: 31
mount qemu image


Qemu is a virtual machine program. You can use it to make and mount, for example, a windows image.

If you want to mount your .img, type the following command:

id <username>

It will reply with your uid=* - you'll need that for the next step.

As root, type:

mkdir /mnt/<dir name>

and then
mount -o loop,offset=32256 -o uid=* /path/to/image.img /mnt/<dir name>


That should mount your image and make it writable by you in konqueror.

If you have any questions, let me know.

If anyone knows how to make this command into a desktop clicky, it'd be a nice addition to this thread.

(keywords)
windows.img win.img win2000.img
 
Old 06-23-2009, 11:46 PM   #2
mwadoublestar
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Rep: Reputation: 0
I tried it but i got the error message below

# mount -o loop,offset=32256 -o uid=Administrator /root/Documents/hd.img /mnt/qemu_C/
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

i have tried administrator with single quote dbl quotes, and also changed the case but didnt worked.
 
Old 06-24-2009, 01:05 AM   #3
secretlydead
Member
 
Registered: Sep 2003
Location: Qingdao, China
Distribution: mandriva, slack, red flag
Posts: 249

Original Poster
Rep: Reputation: 31
uid stands for a NUMBER, not your username.

do this command:
id Administrator

and use the number that command returns.

for example, on my system:
$ id root
uid=0(root) gid=0(root) groups=0(root)

so, my mount command would be:
mount -o loop,offset=32256 -o uid=0 /path/to/image.img /mnt/<dir name>
 
Old 07-18-2009, 05:23 PM   #4
poiuiop316
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
okay so, i'm 13 so could you "stupify" that for me?
 
Old 07-18-2009, 05:26 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
LOL
does that work on a partitioned qemu-img too?
or just a qemu-img where the whole device is 1 partition?
 
Old 07-20-2009, 11:31 PM   #6
secretlydead
Member
 
Registered: Sep 2003
Location: Qingdao, China
Distribution: mandriva, slack, red flag
Posts: 249

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by poiuiop316 View Post
okay so, i'm 13 so could you "stupify" that for me?
youth doesn't explain ignorance, nor does age imply knowledge.

Don't let anyone look down on you because you are young...
1 Timothy 4:12 NIV

not exactly sure what your question is, so i'll try to explain as much as possible:

linux has something called uid's and gid's. this stands for UserID and GroupID. each group and user also has a name.

linux has something called a terminal. you can open this and type different commands. the simplest terminal you can bring up on KDE is by hitting alt-F2. then you can type a command into that terminal. if you have KDE, you probably also have konsole. you can open that by hitting 'alt-f2' then typing konsole.

now you have a consol (i guess that's a terminal window, i'm not too sure) where you can type commands.

try this one:
ls -l
that should bring up some file names like this:
-rw-rw-r-- 1 dan dan 23164 2009-06-15 17:33
the first thing is permissions, and the two that say 'dan' 'dan' on my screen are the group and user that owns the files.
then you can try this one:
ls -n
that should bring up some files like this:
-rw-rw-r-- 1 500 500 56757 2008-12-19 17:55
in place of the username and group name, you see gid's and uid's. so, user dan is the same as uid 500 (on my system, at least.)

this is what i meant when i said:
"uid stands for a NUMBER, not your username."

then i said:
do this command:
id Administrator

i just mean type 'id Administrator' in the terminal/console (konsole, maybe). my system has no 'administrator' - so, i might type 'root' or 'dan'
id root
gives me back:
uid=0(root) gid=0(root) groups=0(root)

that tells me the uid, gid, and what groups root belongs to. (i think, but i'm not really sure. when this happens, i can always say 'command --help' or 'man command' - this will tell me everything i need to know about a command. in this case, i would type: 'man id' or 'id --help' to find out more.)


and that's where the rest comes from:

and use the number that command returns.

for example, on my system:
$ id root
uid=0(root) gid=0(root) groups=0(root)

so, my mount command would be:
mount -o loop,offset=32256 -o uid=0 /path/to/image.img /mnt/<dir name>


so, if you're baffled by this explanation... well, just remember that we're not exactly dealing with changeable parts here. if you asked me how to tighten your head bolts on your car, i could say, "turn it to a torque of 215 lbs and then use a serpentine drive belt remover to turn it by another 3/4 turn" - i'd probably be wrong when i told you that, and it'd probably be more helpful for me to tell you how to use a torque wrench and how to find the torque of your engine's head bolts...
 
0 members found this post helpful.
Old 05-14-2010, 06:53 AM   #7
emmytun
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Unhappy

hi
i'm trying to mount a partition named hhdshare.img and i have this error, could some one help me please

debian:/opt/argos/images# mount -o loop,offset=32256 -o uid=1000 hddshare.img /mnt/point
mount: you must specify the filesystem type
debian:/opt/argos/images# mount -t vfat -o loop,offset=32256 -o uid=1000 hddshare.img /mnt/point
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
 
Old 05-14-2010, 06:59 AM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
hey emmytun!
Welcome to LQ!

I now use kpartx to mount partitioned qemu img files
see this how to here
http://panoskrt.wordpress.com/2009/0...in-image-file/

what distro are you using?
 
Old 05-14-2010, 07:22 AM   #9
emmytun
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
thinks linus72 for your help
i'm using Debian lenny if i understand your question

i checked the link that you posted and when i tried to mount the partition i get this error msg :

" No entry for device-mapper found "
 
Old 05-14-2010, 07:31 AM   #10
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
did you install kpartx?

sudo apt-get install kpartx
 
Old 05-14-2010, 08:35 AM   #11
emmytun
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
yes i did

apt-get install kpartx

then

kpartx -a /path/to/image/hddshare.img

and i got this

/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver
device mapper prerequisites not met
 
Old 05-14-2010, 04:12 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Already all over the web.

http://wiki.archlinux.org/index.php/...ard_disk_image

http://how-to.wikia.com/wiki/How_to_...Linux-based_OS
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make complete image file from partition file for qemu lbdgwgt Linux - Newbie 2 11-16-2006 08:04 AM
Canīt mount a qemu image bruno buys Linux - Software 2 03-31-2006 10:00 PM
How to mount a new hard drive in qemu depam Linux - Software 0 03-01-2006 02:21 AM
qemu create disk image kpachopoulos Linux - General 3 11-29-2005 10:49 AM
Mounting a qemu created root disk image Valhalla Linux - Software 4 10-26-2005 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:52 PM.

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