0

While setting up kernel environment using qemu, I can boot into guest, but rootfs is mount as 'read-only filesystem' . Thus simple command like touch ~/a.txt fails inside guest.

I tried below with and without sudo permission without any success.

qemu-system-x86_64 -kernel arch/x86/boot/bzImage -drive file=~/fs.img,index=0,media=disk,format=raw -append "root=/dev/sda" --enable-kvm

Even after changing ~/fs.img permission from 644 to 666

$ ls -l ~/btrfs.img
-rw-rw-rw- 1 laks laks 1073741824 Dec 22 11:29 ~btrfs.img

Any thoughts on what am i missing here? thanks.

2

I found the solution after some more google searching. Append rw to the root device. Use "root=/dev/sda rw" instead of "root=/dev/sda"

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.