linux - Qemu 卡在从硬盘启动

标签 linux qemu

我正在尝试使用 qemu 模拟器加载一个简单的内核,但是 qemu 卡在了“从硬盘启动”。 A screenshot of the problem

内核的源代码可以在以下链接中找到:https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-828-operating-system-engineering-fall-2012/ ,在目录 obj/kern/kernel.img 中的实验 1 作业中。 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 

最佳答案

eng140,你可以使用 32 位 Linux。我有同样的问题。在使用了32位的Linux之后,这个问题就解决了。在以下网址https://pdos.csail.mit.edu/6.828/2017/tools.html 在“使用虚拟机”一节中,他们建议我们应该使用 32 位 Linux。

关于linux - Qemu 卡在从硬盘启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44269968/

相关文章:

linux - 我可以运行使用 2 个不同命令行的脚本吗?

php - bash脚本从ftp服务器获取文件并在下载后重命名文件

virtual-machine - 在 Centos 7.0 上向 qemu-kvm 启动的 VM 传递参数或共享目录/文件的方法

arm - 使用 QEMU 仿真 Big Endian ARM 系统

qemu - qemu 中不支持 ioctl 调用

linux - QEMU 无法初始化 NVMe 设备

linux - 计算第 1 列中每个不同变量的多列平均值

c++ - 无法使用 twitcurl 编译程序

python - 如何让我的 Python 模块在 Linux 系统范围内可用?

c - QEMU 是否对从 DATA 部分执行命令有限制?