身边没有 arm 的硬件服务器但是需要体验麒麟的信创 arm 版本的系统。本文指南以此为基础通过 qemu 组件方式模拟验证。
内容 | 描述 |
---|---|
宿主硬件 | CPU:i5-11400F,内存:16G |
宿主操作系统 | debian 12 6.1.0-28-amd64(无GUI界面) |
目标ARM 硬件 | CPU:cortex-a72,内存:2G |
目标操作系统 | Kylin-Server-V10-SP3-2403-Release-20240426-arm64.iso |
1、通过 https://sx.ygwid.cn:4431/ 网站下载所需的麒麟 arm 版系统,例如本文中的 Kylin-Server-V10-SP3-2403-Release-20240426-arm64.iso
2、通过 http://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd 下载所需的 bios 文件 QEMU_EFI.fd
3、安装 qemu 组件
apt install qemu-system apt install qemu-user-static |
新增 kylin 文件夹,将所需的文件都置于该目录中,目标主机的硬盘配置为80G。详细情况如下图所示(无需 Linux-kernel ,这个是后期编译组件使用)。
mkdir /data/kylin cd /data/kylin qemu-img create -f qcow2 kylin.qcow2 80G |
注意:麒麟服务器版本安装默认 GUI 图形界面(支持 VNC),宿主机没有配置 GUI 界面,需要到麒麟系统安装界面中选择"Troubleshooting" 的选项中进入 Text 安装界面完成安装 |
qemu-system-aarch64 -m 2048 \ -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 \ -M virt -bios ./QEMU_EFI.fd -device nec-usb-xhci -device usb-kbd -nographic \ -drive if=none,file=./Kylin-Server-V10-SP3-2403-Release-20240426-arm64.iso,id=cdrom,media=cdrom \ -device virtio-scsi-device -device scsi-cd,drive=cdrom \ -drive file=./kylin.qcow2,if=none,format=qcow2,id=hd0 -device virtio-blk-device,drive=hd0 |
1、选择“Troubleshooting”
2、选择基础的图形安装模式
3、进入安装界面,按界面的提示完成安装即可
这个过程有点慢,耐心等待直到出现下面的提示界面
4、安装完成后登录如下所示
qemu-system-aarch64 \ -m 2048 -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 \ -M virt \ -bios ./QEMU_EFI.fd \ -device nec-usb-xhci \ -device usb-kbd -nographic \ -drive file=./kylin.qcow2,if=none,format=qcow2,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -netdev bridge,id=nic0,br=docker0 \ -device virtio-net,netdev=nic0,mac=da:65:2e:22:da:8c |
GUI 模式要求宿主机本身安装了 X11 的 GUI 图形界面
qemu-system-aarch64 -m 2048 \ -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 \ -M virt -bios ./QEMU_EFI.fd -device nec-usb-xhci -device usb-kbd \ -device VGA -vnc :1 \ -drive if=none,file=./Kylin-Server-V10-SP3-2403-Release-20240426-arm64.iso,id=cdrom,media=cdrom \ -device virtio-scsi-device -device scsi-cd,drive=cdrom \ -drive file=./kylin.qcow2,if=none,format=qcow2,id=hd0 -device virtio-blk-device,drive=hd0 |