我想加載一個簡單的內核使用qemu模擬器,但是,qemu卡在「從硬盤啓動」。在目錄obj/kern/kernel.img
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-828-operating-system-engineering-fall-2012/,在實驗室1分配: Qemu卡在從硬盤啓動
爲內核的源代碼可以在下面的鏈接中找到。 Pdf of lab1,tar.gz of lab1,pointers1.c。現在的任務是:
The first part concentrates on getting familiarized with x86 assembly language, the QEMU x86 emulator, and the PC's power-on bootstrap procedure. The second part examines the boot loader for our 6.828 kernel, which resides in the boot directory of the lab tree ...
% cd lab % make ... + mk obj/kern/kernel.img
.. Now you're ready to run QEMU, supplying the file obj/kern/kernel.img, created above, as the contents of the emulated PC's "virtual hard disk." This hard disk image contains both our boot loader (obj/boot/boot) and our kernel (obj/kernel).
% make qemu
添加更多關於啓動參數的信息。這張照片無助於找出你面臨的問題嗎? – LethalProgrammer
@LethalProgrammer感謝您的迴應!我正在使用以下命令:sudo qemu-system-x86_64 -drive format = raw,file = obj/kern/kernel.img – eng140
什麼是'obj/kern/kernel.img',它是否可啓動?什麼說'file -k obj/kern/kernel.img'? – osgx