From patchwork Tue Nov 19 06:55:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70553 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2600C27BBEC; Tue, 19 Nov 2024 07:01:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BC60927BBE2 for ; Tue, 19 Nov 2024 07:01:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDIDo-00017i-R4; Tue, 19 Nov 2024 02:00:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDIDb-0000pe-2v for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:11 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDIDa-0004lo-LF for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=9JPDnrOqlmB6em+KLsZAHXaG8wxrH5HaNjiSGZjLXG4=; b=r2gcHP9RAGfvZYm8VW94fjoxMaBcE219hfeBwP4GTwvb75EGA5GLkEw3oi4eZSJl1J/0K634QsDVg+uRazAUu+dw50r/9OBjJSRqzkXOz4+VQPIHBVtnA+K9Mc8HVjQ/CPyvTQf/3MQDSEhiBesfOjHz/+4C5aawtKRWyZTZB0Nk6l4D7+uVJltpQ1fzpYq5zBKPKkPG+JyLRj4RSSL/SvRujHWEwgN3QOXBIha2LBrvt706+gUZlslfAvz65YgWOIHFfEt+gNDEAYGLL3ddJEN/xJ6brxV5Y7+a1GMdk2rxTOMBVj3juR6foL07sOqHOEwkEMZbpmK6MpLEyYtIkg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDIDa-0005Pw-GM for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH v3 49/51] system: examples: Add bare-hurd64.tmpl. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2024 07:00:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74290 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74290@debbugs.gnu.org Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173199959620646 (code B ref 74290); Tue, 19 Nov 2024 07:00:10 +0000 Received: (at 74290) by debbugs.gnu.org; 19 Nov 2024 06:59:56 +0000 Received: from localhost ([127.0.0.1]:40675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDIDL-0005Mo-Hy for submit@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDICU-0005Cn-DG for 74290@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDIAI-00047Y-32; Tue, 19 Nov 2024 01:56:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=9JPDnrOqlmB6em+KLsZAHXaG8wxrH5HaNjiSGZjLXG4=; b=oNAmV9GAPRGU31zfGj/G bh2HdkJnuAq5ZglJLwPTbMBMd4G6moqpdt5wjJBZ7G5WIe52dPK7OX2p6oUFOY5xnEBWMhvoRLZe0 2ibQUkApTNkZqD4iK5ugVg85xsiGuXdzUD8gz6Z6DOsAIxwTSjJViDO9PaEULCTgsFK3e1PLN4vEY ddbGFdEAdisGcuHBcmykfXKKyTBreRh+4VJUDUuWGBbD6rLDDZdmmqn3oxrdMIsyIAYm64Nq9+FfO x9ImRwrVO1OhL5P3dBTYTg3ssec4F47k9Ed1cp6Q2F2ZNIb0qeTIq+89AlenF/ABbhIr75GDak6GG 8136QYFJbHogaw==; From: Janneke Nieuwenhuizen Date: Tue, 19 Nov 2024 07:55:19 +0100 Message-ID: <4d02e4ec4161b1a85150e942f2d8ee260b3961da.1731999203.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system/examples/bare-hurd.tmpl: Update comments. * gnu/system/examples/bare-hurd64.tmpl: New file. Change-Id: I8d26afd19afaa8fb3558948b50b0efdc0f83f29c --- gnu/system/examples/bare-hurd.tmpl | 21 +++++---- gnu/system/examples/bare-hurd64.tmpl | 70 ++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 gnu/system/examples/bare-hurd64.tmpl diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl index 68c6d3c166..9bfa776769 100644 --- a/gnu/system/examples/bare-hurd.tmpl +++ b/gnu/system/examples/bare-hurd.tmpl @@ -3,23 +3,26 @@ ;; This is an operating system configuration template ;; for a "bare bones" QEMU setup, with no X11 display server. -;; To build a disk image for a virtual machine, do +;; To build a disk image for a virtual machine, do: ;; -;; ./pre-inst-env guix system image --image-type=hurd-raw \ +;; ./pre-inst-env guix system image --image-type=hurd-qcow2 \ ;; gnu/system/examples/bare-hurd.tmpl ;; -;; You may run it like so +;; You may run it like so: ;; -;; guix shell qemu -- qemu-system-i386 -enable-kvm -m 2048 \ -;; -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \ -;; -snapshot -hda +;; guix shell qemu -- qemu-system-i386 -m 2048 \ +;; --enable-kvm \ +;; --device e1000,netdev=net0 \ +;; --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \ +;; --snapshot +;; --hda /gnu/store/...-disk-image ;; -;; and use it like +;; and use it like: ;; ;; ssh -p 10022 root@localhost ;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)' ;; -;; or even (if you use --image-size=3G) +;; or even, if you build the image with at least --image-size=3G: ;; ;; guix build hello @@ -34,7 +37,7 @@ (bootloader grub-minimal-bootloader) (targets '("/dev/sdX")))) (file-systems (cons (file-system - (device (file-system-label "my-root")) + (device (file-system-label "hurd")) (mount-point "/") (type "ext2")) %base-file-systems)) diff --git a/gnu/system/examples/bare-hurd64.tmpl b/gnu/system/examples/bare-hurd64.tmpl new file mode 100644 index 0000000000..89811e458a --- /dev/null +++ b/gnu/system/examples/bare-hurd64.tmpl @@ -0,0 +1,70 @@ +;; -*-scheme-*- + +;; This is an operating system configuration template +;; for a "bare bones" QEMU setup, with no X11 display server. + +;; To build a disk image for a virtual machine, do: +;; +;; ./pre-inst-env guix system image --image-type=hurd64-qcow2 \ +;; gnu/system/examples/bare-hurd64.tmpl +;; +;; You may run it like so: +;; +;; guix shell qemu@7 -- qemu-system-x86_64 -m 2048 \ +;; --machine q35 \ +;; --enable-kvm \ +;; --device e1000,netdev=net0 \ +;; --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \ +;; --snapshot +;; --hda /gnu/store/...-disk-image +;; +;; and use it like: +;; +;; ssh -p 10022 root@localhost +;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)' +;; +;; or even, if you build the image with at least --image-size=3G: +;; +;; guix build hello + +(use-modules (gnu) (gnu system hurd) (guix utils)) +(use-service-modules ssh) +(use-package-modules ssh) + +(define %hurd64-os + (operating-system + (inherit %hurd64-default-operating-system) + (bootloader (bootloader-configuration + (bootloader grub-minimal-bootloader) + (targets '("/dev/sdX")))) + (kernel-arguments '("noide")) ;use rumpdisk + (file-systems (cons (file-system + (device (file-system-label "hurd")) + (mount-point "/") + (type "ext2")) + %base-file-systems)) + (host-name "guixygnu64") + (timezone "Europe/Amsterdam") + (users (cons (user-account + (name "guix") + (comment "Anonymous Hurd Hacker") + (group "users") + (supplementary-groups '("wheel"))) + %base-user-accounts)) + (packages (cons openssh-sans-x %base-packages/hurd)) + (services (cons (service openssh-service-type + (openssh-configuration + (openssh openssh-sans-x) + (port-number 2222) + (permit-root-login #t) + (allow-empty-passwords? #t) + (password-authentication? #t))) + ;; For installing on a real (non-QEMU) machine, use: + ;; (static-networking-service-type + ;; (list %loopback-static-networking + ;; (static-networking + ;; ...))) + ;; %base-services/hurd + %base-services+qemu-networking/hurd)))) + +%hurd64-os