0

When i download a file in /dev/sda1, and qemu -device file=/dev/sda1,format=raw to boot with it, gzip -d return unexpected end of file gzip.

However, in my host machine, tar -xf it works fine.

So how could this happen??? Is the problem in the way i mount it in qemu.

Thanks for your time, hope you can help me out:-)

  • sorry if I misunderstood you, but are you mounting /dev/sda1 in both the guest and the host? are you running qemu as root? you'll badly break your host system sooner or later, I hope it's not handling any valuable data ;-) – Uncle Billy Jul 14 '19 at 15:48
  • @UncleBilly yes... now i'm mounting that disk both host and guest AND i run it as sudo since it can't open /dev/sda.U are right, the disk always had some data problem, i had to use e2fsck again and again @-@. The reason i do this is i don't know how to make qemu boot from the kernel in that disk when it is not mounted in my host. I googled and learn maybe NFS can used for this situation but it's a hard way(I have never used it). So do you have some advice?I hope this can be handled by qemu drive interface, Thanks :-) – Obsessive Jul 15 '19 at 2:37
  • I think i'm a little confused about the img in qemu. IF i want to qemu directly boot the /dev/sda1, should i also config grub on it and use sda1 like a img? In this case, i don't need to know where kernel and initramfs is, but grub on sda1 will handle that, and i will have a completely independence experiment environment? – Obsessive Jul 15 '19 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.