From c94e1f2548e5f8cc28da413554e524d4cf9543f1 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Wed, 11 Jun 2025 21:53:52 +0800 Subject: feat(www): update hurd qemu running doc. --- www/content/notes/hurd.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'www/content/notes/hurd.md') diff --git a/www/content/notes/hurd.md b/www/content/notes/hurd.md index 67b8df9..8b86bcd 100644 --- a/www/content/notes/hurd.md +++ b/www/content/notes/hurd.md @@ -95,14 +95,34 @@ upstream: ## cheatsheet -Start qemu +### Use QEMU Virtual Machine -```sh -qemu-system-x86_64 -enable-kvm -m 4G \ - -net nic -net user,hostfwd=tcp::3222-:22 \ - -vga vmware -drive cache=writeback,file=[...] +For i386, use + +```bash-session +# qemu-system-x86_64 -enable-kvm -m 4G \ +> -net nic -net user,hostfwd=tcp::3222-:22 \ +> -vga vmware -drive cache=writeback,file=[...] +``` + +For x86_64, use + +```bash-session +# qemu-system-x86_64 -enable-kvm -m 8G -machine q35 \ +> -net nic -net user,hostfwd=tcp::3223-:22 \ +> -vga vmware -drive cache=writeback,file=[...] ``` +GRUB in the image seems to use hard-coded path of `/dev/*` block file as the +root partition in the kernel command line rather than GUID, so if the hard disk +bus is changed in QEMU and the path is changed accordingly, the system can't +boot on. + +QEMU cli arguments `-machine q35` enables AHCI and SATA, and is **required for +official x86_64 image to boot**. As for i386, I haven't checked now. + +### Inside Hurd + Configure/Setup network ```sh -- cgit v1.2.3