LinuxQuestions.org
Visit Jeremy's Blog.
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 11-28-2005, 11:13 AM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
qemu create disk image


Hi,
i cannot find out how to create a disk image of my Linux System hard disk, in order to use it with qemu! I found something, but it is Bochs specific. For qemu the only useful i found, was how to run an iso with Qemu.
Can somebody point me to a link?
Thanks
 
Old 11-29-2005, 09:13 AM   #2
fatrandy13
Member
 
Registered: Jun 2004
Location: new jersey
Distribution: anything debian based, long live apt-get
Posts: 230

Rep: Reputation: 30
dd if=/dev/hda1 of=disk.img

this will make an exact replica of /dev/hda1 (make sure thats the right partition). then boot up disk.img with qemu. also make sure you ahve anough disk space to same the image file..
 
Old 11-29-2005, 10:23 AM   #3
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Original Poster
Rep: Reputation: 30
Thanks fatrandy13. It works, but i have some questions:
-Is this a "growing" image- ie does it grow by adding data? Or do i have to use a special program, in order to resize it?

-If i do: "dd if=/dev/hda (NOT HDA1) of=disk.img" and at the same time i use a backup partition (/dev/hda7 for example, mounted as /mnt/backup) to store the image, would that cause a problem and make the image grow recursively?

Thanks
 
Old 11-29-2005, 10:49 AM   #4
fatrandy13
Member
 
Registered: Jun 2004
Location: new jersey
Distribution: anything debian based, long live apt-get
Posts: 230

Rep: Reputation: 30
dd if=/dev/hda of=disk.img doesnt really make sense. /dev/hda is you entire harddrive (including /dev/hda7 and all your other partitions) so say it is a 40 gig drive, that would mean you are trying to store a 40 gig image file on a 40 gig drive with all of your other files, so its impossible... stick to:

dd if=/dev/hdaX of=disk.img

where X is the partition number you want.

and by the way, No, it is not a growing disk...sorry
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mounting a qemu created root disk image Valhalla Linux - Software 4 10-26-2005 08:34 PM
not able to create an image.... os2 Linux - Software 2 08-31-2005 05:26 PM
How to create disk image with Linux? zaoka Linux - Software 3 07-14-2005 03:29 PM
qemu: qemu stopped right after command exec bitpicker Linux - Software 1 03-04-2005 11:25 PM
How to create image using PQDI boot disk? (rhel v2.1) namgor Red Hat 1 06-25-2004 08:26 AM

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

All times are GMT -5. The time now is 06:12 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