系統 - Debian - QEMU - 安裝Debian 10(armhf)



參考資料:
https://people.debian.org/~aurel32/qemu/armhf/
https://blog.ihomura.cn/2020/11/12/%E5%9C%A8qemu-system%E4%B8%8A%E8%B7%91arm-Debian/

步驟如下(console only):

$ sudo apt-get install qemu qemu-utils qemu-system-arm -y
$ cd
$ wget https://cdimage.debian.org/cdimage/archive/10.8.0/armhf/iso-cd/debian-10.8.0-armhf-xfce-CD-1.iso
$ sudo mount debian-10.8.0-armhf-xfce-CD-1.iso /mnt
$ cp /mnt/install.ahf/vmlinuz .
$ cp /mnt/install.ahf/initrd.gz .
$ sudo umount /mnt
$ qemu-img create disk.img 10G
$ qemu-system-arm -m 1024 -cpu cortex-a15 -smp 2 -M virt -kernel vmlinuz -initrd initrd.gz -nographic -drive if=none,file=disk.img,id=hd0,format=raw -device virtio-blk-device,drive=hd0 -drive if=none,file=debian-10.8.0-armhf-xfce-CD-1.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom

如果不想手動安裝,可以使用aurel32做好的Image,步驟如下:

$ cd
$ wget https://people.debian.org/~aurel32/qemu/armhf/vmlinuz-3.2.0-4-vexpress
$ wget https://people.debian.org/~aurel32/qemu/armhf/initrd.img-3.2.0-4-vexpress
$ wget https://people.debian.org/~aurel32/qemu/armhf/debian_wheezy_armhf_desktop.qcow2
$ qemu-system-arm -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -drive if=sd,file=debian_wheezy_armhf_desktop.qcow2 -append "root=/dev/mmcblk0p2"

root:root, user:user