0
votes

I built the stable linux kernel image and now I'm trying to run it with qemu.

I build the rootfs.img using busybox by following the instructions here (took out ARM stuff)

Now, when I run I get the following error:

$ qemu-system-x86_64 -m 512M -kernel bzImage -initrd rootfs.img -append “root=/dev/ram rdinit=/sbin/init”
qemu-system-x86_64: -append “root=/dev/ram: could not open disk image rdinit=/sbin/init”: Could not open 'rdinit=/sbin/init”': No such file or directory

There seems to be a problem with "root=/dev/ram"? /sbin/init is inside the image.

Not sure what to do from here. Would someone be able to provide the steps they use to compile the kernel and run on qemu?

1

1 Answers

4
votes

WordPress typography features strike again! You're using the wrong kind of quotation marks:

-append “root=/dev/ram rdinit=/sbin/init”
        ^                               ^

The indicated characters are, respectively, U+201C LEFT DOUBLE QUOTATION MARK and U+201D RIGHT DOUBLE QUOTATION MARK (i.e, "curly quotes"), not normal quotation marks.

Retype the command line by hand (or, at least, those two characters) and it'll work correctly.