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.
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
Distribution: anything debian based, long live apt-get
Posts: 230
Rep:
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..
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?
Distribution: anything debian based, long live apt-get
Posts: 230
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.