Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to run QEMU and use a simple file on the host system as the guest's hard drive. Here's what I attempted so far:

$ dd if=/dev/zero of=/home/felix/vm/archlinux.img bs=1MB count=8192
8192+0 records in
8192+0 records out
8192000000 bytes (8.2 GB) copied, 86.6054 s, 94.6 MB/s
$ qemu -hda /home/felix/vm/archlinux.img -cdrom archlinux-2009.08-netinstall-i686.iso -boot d

Then I try to install Archlinux to that file. It goes pretty well (it's able to format it from what I can tell) until I start installing packages, when I get errors like this:

EXT2 errors

And, of course, everything goes downhill from there (unable to mount the partition, corrupted files, ...). What am I doing wrong?

Note: I'm just doing this for entertainment purposes. I don't intend to actually use this on servers or anything. The only use I can think of for this kind of installation would be to actually get an 8GB USB stick and dd that file to it and wham! You have a bootable stick with a fully fledged and customized OS, and without torturing the stick through the installation.

Update: I've tried using qemu-img to create the file and using ext3. Same errors.

Update 2: Using qcow2 images seems to work. Still can't figure out what went wrong in the first place.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.