From patchwork Wed May 14 15:09:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42598 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 3060A27BC4B; Wed, 14 May 2025 16:10:57 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, 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 A79DB27BC49 for ; Wed, 14 May 2025 16:10:56 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFDkN-0003nG-2t; Wed, 14 May 2025 11:10:15 -0400 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 1uFDkH-0003cQ-0k for guix-patches@gnu.org; Wed, 14 May 2025 11:10:09 -0400 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 1uFDkF-0005AO-3E; Wed, 14 May 2025 11:10:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=5turneRiRy/xug8lP8EXc6MTG6N4Ig2xCEHQDHUloHw=; b=FyS4Xg1hYZrnHEOkXaZoH7rj3VFrZfRDcOQKC8L1noeg/U4mSGeJ63jDBebfpq9jjU63Gn+BMdzIJZGAQeA8J49yiZTBC9j57qr7FwRvzVFGIkTl+86xOSEp0h6swPSvrir5jWj6paDYfD4sZVbGLboGlLvfKzjLiaqEt4uzpo91C3S9jzDCeOUAKHSYdD01vwKXlMEsJXxlt++SEtcX9sOTNMUSbewDd25VBVCAdnO/YwLTGWJuCu4hhQkJWrmmEsj2KRVKgenop6ZjBi3+1HlpJoH60oaHqW9WxoUUaBpCJ0QxEBQwqS9xyaE0JHj/pZ3LP3gvy9xsb+jo4B76LQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uFDkA-0006Xk-Py; Wed, 14 May 2025 11:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78426] [PATCH] system: Set "rootfstype" for tmpfs root file system. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Wed, 14 May 2025 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78426 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78426@debbugs.gnu.org Cc: Hilton Chain , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.174723538525105 (code B ref -1); Wed, 14 May 2025 15:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 May 2025 15:09:45 +0000 Received: from localhost ([127.0.0.1]:44283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFDjs-0006Wq-Uo for submit@debbugs.gnu.org; Wed, 14 May 2025 11:09:45 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48746) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFDjn-0006WS-8b for submit@debbugs.gnu.org; Wed, 14 May 2025 11:09:43 -0400 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 1uFDja-0002TR-6K for guix-patches@gnu.org; Wed, 14 May 2025 11:09:26 -0400 Received: from mail.boiledscript.com ([49.12.134.184]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFDjX-0004iN-Nc for guix-patches@gnu.org; Wed, 14 May 2025 11:09:25 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1747235358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5turneRiRy/xug8lP8EXc6MTG6N4Ig2xCEHQDHUloHw=; b=H7q5c2jmqDG8kqPD3lA2io3tk+61EDpn2mKvzJdLeUDmnSbAsZmAqO1efh6zgphEqETVNu vKptDtKyvuTM27txM97Vl9Wf8SNnSGPu+1JreaeL6Lrqvl64MdhAuTuVxNuAKQ+ZZv5n6N /X14OIggAGhEHYITBbefTGALC1eJMNp1CQkGii/tTB/DsiaEBpuU4dixCKQycwurvO3ZWW gV6FctOfEcc0FL53pJ/O/P3+83Wr+cYkq2kvWabrPEMlj3xU0znCfE0Ysl3u7zvBqHs+Wx sft2LNVk3fx9vnOJk5+LMZq31Y7+Rb4vPi9ZNUB78VsLmcEF+KUK3nOUzds9jA== Date: Wed, 14 May 2025 23:09:00 +0800 Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=49.12.134.184; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 This commit adds configuration for tmpfs root file system. Since there's no file system information in boot parameters, not all tmpfs cases are handled. * gnu/system.scm (bootable-kernel-arguments): Check root file system for tmpfs and set "rootfstype". Change-Id: Ib14f6a9e4040535b3412ca9efa7e9b65c1dc8b39 --- gnu/system.scm | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) base-commit: c9d655330d817a0ea30190468cbb6772db1311b5 prerequisite-patch-id: 525b29878f7a0b247b7b3dd0e45fb85dd8f3cf46 prerequisite-patch-id: 2579801cc89f3e3e022074a0425fba3d38bbe1de prerequisite-patch-id: 7174912f7b05011468bc47b2ba8167b0e617a70b prerequisite-patch-id: 08fa38ca1e61c773052671339b78799f19fb7f60 prerequisite-patch-id: b68df6ad7528101d3fbb1fd44f94472a9c8f4f0a prerequisite-patch-id: 58297e005e4ad0988bd5dc73cd0149637d5c7032 prerequisite-patch-id: 2c09773480fbfd323433986ec528fcb8019273f9 prerequisite-patch-id: e2846320c8b391ff3fec09e51c31578ee6057268 prerequisite-patch-id: 538047ea2f029dd135319c02ba569c4aab9af38d prerequisite-patch-id: 4fb73799b5ea902d69ecf15b72e1fecc9903d0bc prerequisite-patch-id: a3a0146e6686bf6f7804192e1a383239c118717b prerequisite-patch-id: 8de6616d86785be0088bc210202d375b6d0cf5eb prerequisite-patch-id: 2f32dcab8b97a4fd210ab5b29b6ebf327861be36 prerequisite-patch-id: 081be41a50854a1397ad6574d995ba444b927a7f prerequisite-patch-id: 26f0f74eb23d56cecf3f93d3dc1d8e5d5a8578cf prerequisite-patch-id: f5f99443a9db01b814a978b1c65c5826586c44eb prerequisite-patch-id: d9fe717dac14cfdfbf9db0a76b1e0696806d296b prerequisite-patch-id: d92034f568f9084b3c61b2944d4070b82ba74e37 prerequisite-patch-id: f3cb877e57cb93ae13156aaa0c4408fff8e0334f prerequisite-patch-id: f5a98ba554d79478659d7e776b48fbe775c0a237 prerequisite-patch-id: 7288c81563bcf2efc5044320eb4c7bd32aa0bc1b -- 2.49.0 diff --git a/gnu/system.scm b/gnu/system.scm index 68478790b1e..3cd5408c09c 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -208,12 +208,21 @@ (define* (bootable-kernel-arguments system root-device version) (let ((root (file-system-device->string root-device #:uuid-type 'dce))) (append - (if (string=? root "none") - '() ; Ignore the case where the root is "none" (typically tmpfs). - ;; Note: Always use the DCE format because that's what - ;; (gnu build linux-boot) expects for the 'root' - ;; kernel command-line option. - (list (string-append (if version>0? "root=" "--root=") root))) + (cond + ((string=? root "tmpfs") + ;; Required when using tmpfs as root file system. + ;; TODO: Include file system information in boot parameters, so that we + ;; can detect tmpfs by file system type instead of device name here. + '("rootfstype=tmpfs")) + ((string=? root "none") + ;; Ignore unhandled cases where the root is "none". This requires the + ;; user to set correct arguments. + '()) + (else + ;; Note: Always use the DCE format because that's what + ;; (gnu build linux-boot) expects for the 'root' + ;; kernel command-line option. + (list (string-append (if version>0? "root=" "--root=") root)))) (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system) #~(string-append (if #$version>0? "gnu.load=" "--load=") #$system "/boot")))))