From unknown Fri Jun 20 07:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43366: "error: rmdir: Device or resource busy" when using btrfs Resent-From: Fredrik Salomonsson Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 13 Sep 2020 04:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43366 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43366@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159996955025608 (code B ref -1); Sun, 13 Sep 2020 04:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Sep 2020 03:59:10 +0000 Received: from localhost ([127.0.0.1]:49296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHJAT-0006ex-Ec for submit@debbugs.gnu.org; Sat, 12 Sep 2020 23:59:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:33470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHIpm-0006C4-PW for submit@debbugs.gnu.org; Sat, 12 Sep 2020 23:37:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHIpm-0005LQ-Ii for bug-guix@gnu.org; Sat, 12 Sep 2020 23:37:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]:57889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHIpj-000625-RN for bug-guix@gnu.org; Sat, 12 Sep 2020 23:37:46 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A97CA2400FB for ; Sun, 13 Sep 2020 05:37:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1599968258; bh=sBwdnbFyWZ99wteSshlj0EDGO6h9WFIF5XnrTRWga2s=; h=From:To:Subject:Date:From; b=FNepZW0kGzIp//P9e42oqKL6fXeIwS0mKBGxCJeSAlQYqWM6/FMqq3L+1gsFR5obx uWOalswy9dckflw5fROoZoiLdvkYosLWu9LDxJXJx97xIZgDf5oKjGQAzLNeRJWMQ4 sjb/dJ5hvM49bH5eUEXTtgF/LeG94ysVVigut5tjuh1OYLQ7ZBsEHgn1OxL64pWmYl YUNxsr/W8RmCdsAM3LJevCuJkQyE4hFUOSuhuHAFaedT/2xryUjE3AYSTIjOWdVXUk T4/H8bPH7JIcHwfvIEl2cd1bRJ8DGA2VRfPTqVUyHSrPJ313N9vusTJuhfCVG8FSAw kuMpZGW/MEPoA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BpwDK36JQz6tmV for ; Sun, 13 Sep 2020 05:37:37 +0200 (CEST) From: Fredrik Salomonsson Date: Sat, 12 Sep 2020 20:37:35 -0700 Message-ID: <87v9gi5ou8.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@posteo.net; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/12 23:37:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Sat, 12 Sep 2020 23:59:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain When you have separate btrfs subvolumes for /gnu and /var/guix, you'll encounter this error running `guix system init /mnt/etc/config.scm /mnt` when it tries to copy things to /mnt. My guess is that guix is trying to remove one of them but fails as they're mounted. I encountered this issue while I tried installing guix system on my main laptop. But I have encountered this before [1]. When I installed guix system on my secondary laptop. I worked around it back then by using guix-0.15.0. For my secondary laptop I have this layout | subvol | Mountpoint | Comment | |-----------------------+------------+-----------------| | __current/guixsd-root | / | root for GuixSD | | __current/grub | /boot/grub | grub config | | __current/guix | /var/guix | guix stuff | | __current/gnu | /gnu | Store etc | | __current/home | /home | home partition | For my main laptop I tried: | subvol | Mountpoint | Comment | |--------+------------+----------------| | @ | / | root for Guix | | @grub | /boot/grub | grub config | | @guix | /var/guix | guix stuff | | @gnu | /gnu | Store etc | | @home | /home | home partition | Found another thread that also had this issue [2], and the same workaround worked for me. I.e. simplified the layout: | subvol | Mountpoint | Comment | |-----------+------------+----------------| | @ | / | root for Guix | | @home | /home | home partition | This seems to just be an issue when running guix system init, as I've been using my secondary laptop with separate subvolumes for /gnu and /var/guix without any issues since 0.15. The guix version I used to install my main laptop with was 1.1.0-25.44c6e6f. I generated it with guix system disk-image --file-system-type=iso9660 \ gnu/system/install.scm As described in the manual. Thanks [1] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00055.html [2] https://lists.gnu.org/archive/html/help-guix/2019-06/msg00259.html --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=heimdal-sway.scm Content-Description: Guix system config file ;; This is an operating system configuration template ;; for a "desktop" setup without full-blown desktop ;; environments. (use-modules (gnu) (gnu packages) (gnu system nss) (gnu system locale) (gnu services nfs) (gnu services sddm) (ice-9 rdelim) (ice-9 format) (srfi srfi-1)) (use-service-modules desktop networking ssh base xorg) (use-package-modules wm certs shells xdisorg display-managers) (define plattfot (user-account (name "plattfot") (group "users") ;; Define a G-Expr to find the path of the zsh binary: ;; https://gitlab.com/rain1/guix-wiki/wikis/FAQ#how-do-i-make-my-login-shell-zsh ;;(shell #~(string-append #$zsh "/bin/zsh")) (supplementary-groups '("wheel" "netdev" "audio" "video")) (home-directory "/home/plattfot"))) ;; Specify a mapped device for the encrypted root partition. ;; The UUID is that returned by 'cryptsetup luksUUID'. (define mapped-swap (mapped-device (source (uuid "3f1a433f-e3d5-46f1-8471-b0cfee72a659")) (target "swap") (type luks-device-mapping))) (define mapped-root (mapped-device (source (uuid "0633603e-019c-4be0-b35e-abb055660909")) (target "root") (type luks-device-mapping))) ;; Partion layout for `root` ;; | subvol | Mountpoint | Comment | Shared | ;; |-----------+------------+--------------------+--------| ;; | @ | / | root for Guix | no | ;; | @home | /home | home partition | yes | (define btrfs-common-options '("discard" "compress=lzo" "space_cache" "autodefrag")) (define (btrfs-mount-options subvol) "Return the btrfs mount options I use. Where SUBVOL is the subvolume to mount" (string-join `(,@btrfs-common-options ,(format #f "subvol=~a" subvol)) ",")) (define fs-root (file-system (mount-point "/") (type "btrfs") (device (file-system-label "root")) (options (btrfs-mount-options "@")) (needed-for-boot? #t) (dependencies `(,mapped-root)))) (define fs-home (file-system (mount-point "/home") (type "btrfs") (device (file-system-label "root")) (options (btrfs-mount-options "@home")) (needed-for-boot? #t) (dependencies `(,fs-root)))) (define nfs-valhalla (file-system (device "fafner:/srv/nfs4/Valhalla") (mount-point "/media/Valhalla") (type "nfs4") (mount? #f) (check? #f))) (operating-system (host-name "heimdal") (timezone "Canada/Pacific") (locale "en_US.utf8") (locale-definitions (list (locale-definition (name "en_US.utf8") (source "en_US") (charset "UTF-8")) (locale-definition (name "sv_SE.utf8") (source "sv_SE") (charset "UTF-8")))) ;; Assuming /dev/sda is the target hard disk, and "root" ;; is the label of the target root file system. (bootloader (grub-configuration (target "/dev/sda"))) ;; Kernel arguments (kernel-arguments '("rootflags=compress=lzo,subvol=@")) (mapped-devices (list mapped-root mapped-swap)) (file-systems (cons* fs-root fs-home nfs-valhalla %base-file-systems)) (swap-devices '("/dev/mapper/swap")) (users (cons plattfot %base-user-accounts)) (keyboard-layout (keyboard-layout "us" #:options '("ctrl:swapcaps"))) (packages (cons* sway waybar rofi guix-simplyblack-sddm-theme ;;zsh nss-certs ;for HTTPS access %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with Wicd, and more. (services ;;%desktop-services (cons* (service openssh-service-type (openssh-configuration (port-number 6060) (password-authentication? #f))) (extra-special-file "/bin/env" (file-append coreutils "/bin/env")) (service sddm-service-type (sddm-configuration (display-server "wayland") (theme "guix-simplyblack-sddm"))) (remove (lambda (service) (member (service-kind service) (list gdm-service-type ))) %desktop-services))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) --=-=-= Content-Type: text/plain -- s/Fred[re]+i[ck]+/Fredrik/g --=-=-=-- From unknown Fri Jun 20 07:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43366: [PATCH core-updates] utils: Do not raise exceptions in delete-file-recursively. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 04:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43366 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43366@debbugs.gnu.org Cc: Fredrik Salomonsson , Maxim Cournoyer Received: via spool by 43366-submit@debbugs.gnu.org id=B43366.160014292314107 (code B ref 43366); Tue, 15 Sep 2020 04:09:01 +0000 Received: (at 43366) by debbugs.gnu.org; 15 Sep 2020 04:08:43 +0000 Received: from localhost ([127.0.0.1]:56848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2Go-0003fT-RV for submit@debbugs.gnu.org; Tue, 15 Sep 2020 00:08:43 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:45607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2Gl-0003f8-CC for 43366@debbugs.gnu.org; Tue, 15 Sep 2020 00:08:41 -0400 Received: by mail-qt1-f173.google.com with SMTP id z2so2170112qtv.12 for <43366@debbugs.gnu.org>; Mon, 14 Sep 2020 21:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8JdylyF98Lg7KQ3ylzub6SzwqwHqEbHWfnkultfTlnY=; b=ACLefPaEzeF9P/3Dxdt9+06edLV+kMTLiSM89K+Ibf3kyOHONMFNswtUdp4ZMExReK IhHV1ZCUC6/WGqpuo5UMzVkv9eL2JYZWVQHGHnp63tv/0OxC0lm+ORF/OTJiHyE4wH8z TE6extpSOCMltNPK9V3mbENIOZ+xkKwFSsANXAxC/ivgJQStcGC0sV5oycn/ZrjppwJT NyEAlsie6oXOKyB7QBSHg5Z7NVfxZoVbrtnbLi4S05LsuReRrX3dsLzfFU1tRTd8qcgA nAN6Sc2B36dnfdeDhuWvB4Ju4Ib/SOi0BntlbORMh4sTQvK5FVi3xeYs3OohGqtOIqsR +axQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8JdylyF98Lg7KQ3ylzub6SzwqwHqEbHWfnkultfTlnY=; b=rQa36mYHlKGGDMWIWRwwOzx46rh4GwLO7+ysCLvyRNgcVHaoCfMx+EWS5AQzB3Jak8 1tinF4Fv86DVKbbuI9j+lQJkY+zyDJgTg0jxMan0pV+ejJzXi7Kx3Ume0MtRtTA0VDXF 1bM7lmzYknljXLERP4E6gctAkOE1RT+6OdTbhVfNGr3zdgFm47LvRBRRFpbGVPKyyphf IjMpPdGiMhobvVDZ2wtXqVubsqutA0yliOpG0pe0j8IksPW6wJBhjkZHSbUKssaXuJXH hJrbkNvAqwuW04XlGJNzTtiAk4SEDSyfbmycdK/Py0dOGryDx0zBKRh/jchiTnCHWJJV HoPg== X-Gm-Message-State: AOAM533fM3zEIuIYe5TkxyFnsYukkqupAVplMFUM1eJwyV7zI2fLG0KS vJxM0o8PAOo7oyqQKXgJtuWfxoKS9xCiLw== X-Google-Smtp-Source: ABdhPJxNRxHLAYdmounLy/hy1Ztee1Ify67RJ8Ib6z6qfz4cZZ5BLgFlFMhTP1ebzySD0ZhYPA7RRw== X-Received: by 2002:ac8:2942:: with SMTP id z2mr16822759qtz.376.1600142913430; Mon, 14 Sep 2020 21:08:33 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-124-4.b2b2c.ca. [205.233.124.4]) by smtp.gmail.com with ESMTPSA id 29sm15964073qkr.114.2020.09.14.21.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 21:08:33 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Sep 2020 00:08:37 -0400 Message-Id: <20200915040837.26098-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <87v9gi5ou8.fsf@posteo.net> References: <87v9gi5ou8.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This makes it so that delete-file-recursively honors its docstring, which says it should "report but ignore errors". Fixes . * guix/build/utils.scm (warn-on-error): New syntax. (delete-file-recursively): Use it to catch exceptions and print warning messages. Reported-by: Fredrik Salomonsson --- guix/build/utils.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 0a04032834..fbf4f2d61a 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -366,6 +367,16 @@ verbose output to the LOG port." stat lstat))) +(define-syntax-rule (warn-on-error expr file) + (catch 'system-error + (lambda () + expr) + (lambda args + (format (current-error-port) + "warning: failed to delete ~a: ~a~%" + file (strerror + (system-error-errno args)))))) + (define* (delete-file-recursively dir #:key follow-mounts?) "Delete DIR recursively, like `rm -rf', without following symlinks. Don't @@ -376,10 +387,10 @@ errors." (or follow-mounts? (= dev (stat:dev stat)))) (lambda (file stat result) ; leaf - (delete-file file)) + (warn-on-error (delete-file file) file)) (const #t) ; down (lambda (dir stat result) ; up - (rmdir dir)) + (warn-on-error (rmdir dir) dir)) (const #t) ; skip (lambda (file stat errno result) (format (current-error-port) -- 2.28.0 From unknown Fri Jun 20 07:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43366: "error: rmdir: Device or resource busy" when using btrfs Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 04:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43366 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Fredrik Salomonsson Cc: 43366@debbugs.gnu.org Received: via spool by 43366-submit@debbugs.gnu.org id=B43366.160014330414738 (code B ref 43366); Tue, 15 Sep 2020 04:16:01 +0000 Received: (at 43366) by debbugs.gnu.org; 15 Sep 2020 04:15:04 +0000 Received: from localhost ([127.0.0.1]:56854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2Mx-0003pa-Jq for submit@debbugs.gnu.org; Tue, 15 Sep 2020 00:15:04 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:40790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2Mw-0003oo-23 for 43366@debbugs.gnu.org; Tue, 15 Sep 2020 00:15:02 -0400 Received: by mail-qk1-f182.google.com with SMTP id w16so2954579qkj.7 for <43366@debbugs.gnu.org>; Mon, 14 Sep 2020 21:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=njQPEzUWDPjkRcr6p+XgadxJMw53fpGhfZQoHhbZymU=; b=gnzqXIjcQiNvuP8tRs0ysAs8865wqbJKpXgAAxGXmaCyKnRvwY7DDbgK2ZUXmsQNDJ BtjY09z4v2TSBIo+2Jzk5E9MSQfQ1CCg3bPazvYOmG3BbFCCt7MjL8qkD+9oap5b06jX jDxYzEuZCoT36/dFd+qdQu6dX2iA/2XwY5cGClb/w98Lo2113AKQmi7jBnuKCaNbFcWs G3h2xjWBxT4xYkDUJ5XTNDb93sYz7c5pK0KNhNG8sGRad0S0abEI294Vtff4KO9Jn+/7 ekkz7JRuhh/Y4YxPdO8KQZDIdD0LjixCCbyKhy5PuyxfGSkZw3B1DP1vGs9s/MzyDFKi JbSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=njQPEzUWDPjkRcr6p+XgadxJMw53fpGhfZQoHhbZymU=; b=Bw7hNyhy9UihnRnMdYPtt7KrLxwGb3izf3/+SjI7e10SkvwY46cPxwlQLEIOYVV/qW GE0xjATzXksEVZH4udQQECiMc3oOcfiNIsfylAhJKnFx8JwELxfH3IWinczyc+sgxta+ pqdREVP6pV/E8DXPaxJe77grYENFquW6ASZvxo8g9imNL99tzkVe4//pjd/p+igHjjUK aOrd/ddIJRtWnNR1xl6L2CUFCuqWtmBel2eqB992YTOX7mRi55PmnBlGoLT1k8GSGexq KIKrCElRENyrDJb3K5QnPv7dYS7Jj05Xsz3W9/uaBG3L1Y7Jfo1scK1AZEKzzhoXVKkM UIIQ== X-Gm-Message-State: AOAM531RIIxZnDzjNxq30cfCSq0ACI8i+3ee/gRbJDlQLqUy85kuuztO ajTk+2uvcIyyXNnnNpPlLNY8zLHvmkoqDA== X-Google-Smtp-Source: ABdhPJzz/vZuI9hlYiU2x5JklfUvay/bkgD/utgYp5XOuWVwMi3qK2ivV1OKxXnGiNkny41icDG+FA== X-Received: by 2002:a37:8d7:: with SMTP id 206mr15264551qki.156.1600143296419; Mon, 14 Sep 2020 21:14:56 -0700 (PDT) Received: from hurd (dsl-205-233-124-4.b2b2c.ca. [205.233.124.4]) by smtp.gmail.com with ESMTPSA id i7sm16067705qkb.131.2020.09.14.21.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 21:14:55 -0700 (PDT) From: Maxim Cournoyer References: <87v9gi5ou8.fsf@posteo.net> Date: Tue, 15 Sep 2020 00:15:46 -0400 In-Reply-To: <87v9gi5ou8.fsf@posteo.net> (Fredrik Salomonsson's message of "Sat, 12 Sep 2020 20:37:35 -0700") Message-ID: <87wo0v3cb1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Fredrik, I just sent a patch now, but here's a bit more background on what led to it. Fredrik Salomonsson writes: > When you have separate btrfs subvolumes for /gnu and /var/guix, you'll > encounter this error running `guix system init /mnt/etc/config.scm /mnt` > when it tries to copy things to /mnt. My guess is that guix is trying to > remove one of them but fails as they're mounted. The issue seems to be with: --8<---------------cut here---------------start------------->8--- ;; If a previous installation was attempted, make sure we start anew; in ;; particular, we don't want to keep a store database that might not ;; correspond to what we're actually putting in the store. (let ((state (string-append target "/var/guix"))) (when (file-exists? state) (delete-file-recursively state))) --8<---------------cut here---------------end--------------->8--- Which is part of the install procedure (which gets called when using 'guix system init /some/target'). So your guess was correct :-). To confirm this was the case, I did: sudo btrfs subvolume create /tmp/toto mkdir /tmp/tata sudo mount -o subvol=/tmp/toto /dev/mapper/cryptroot /tmp/tata sudo -E guix repl > ,import (guix build utils) > (delete-file-recursively "/tmp/tata/") ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure rmdir: Device or resource busy Bingo! Reading the docstring of delete-file-recursively, it says it should "report but ignore errors", so that's a bug. Maxim From unknown Fri Jun 20 07:28:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43366: "error: rmdir: Device or resource busy" when using btrfs Resent-From: Fredrik Salomonsson Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 18:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43366 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 43366@debbugs.gnu.org Received: via spool by 43366-submit@debbugs.gnu.org id=B43366.160019422930725 (code B ref 43366); Tue, 15 Sep 2020 18:24:02 +0000 Received: (at 43366) by debbugs.gnu.org; 15 Sep 2020 18:23:49 +0000 Received: from localhost ([127.0.0.1]:60553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIFcK-0007zU-QN for submit@debbugs.gnu.org; Tue, 15 Sep 2020 14:23:49 -0400 Received: from mout01.posteo.de ([185.67.36.65]:60866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIFUc-0007mn-BS for 43366@debbugs.gnu.org; Tue, 15 Sep 2020 14:15:51 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id E060C160062 for <43366@debbugs.gnu.org>; Tue, 15 Sep 2020 20:15:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1600193743; bh=CHOH9N6RAA+WgXPXz+BeuDSXxd6qcVN2xejqqnDfzIg=; h=From:To:Cc:Subject:Date:From; b=kiPxlvmEFCX+mblnYH2Fk+BX0+W9YPX6KgyoTMiAWY+R4GyzgShayX+udth/5p3MT 4sM/+ZhqmrlzbZ3weYOiUBoLiOkb4kFB7kDmQN/gAtnVpcT26UwS4WigBURJAojOL/ zWABAs7ulxQUn8pHz/ethSytL+tt1orI7HHCo6sZpVbsR0R6bvj5lPFaPdDHiTx/+1 0MXU/puHw7rPaoUUtn37jUTJljuxIfbXQoNVlTdRSk77ag6hMfp+BshwTi0YP3BI8C rdBfZ1bIWyza2kJBRyjzcGkCe4fjY47cmpBR2ejBHV8oc888DMGCdMhQZBuX/2/mdw PrJqSo2QVZ9iQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BrWcZ4vh4z6tm8; Tue, 15 Sep 2020 20:15:42 +0200 (CEST) From: Fredrik Salomonsson In-Reply-To: <87wo0v3cb1.fsf@gmail.com> References: <87v9gi5ou8.fsf@posteo.net> <87wo0v3cb1.fsf@gmail.com> Date: Tue, 15 Sep 2020 11:15:40 -0700 Message-ID: <87sgbi9a9f.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Tue, 15 Sep 2020 14:23:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxim, Maxim Cournoyer writes: > I just sent a patch now, but here's a bit more background on what led to > it. Nice find! I'm unable to test out the patch right now on my original use case as I soft bricked my laptop fiddling around with coreboot. And I'm having some issues with my external flasher. > The issue seems to be with: > > --8<---------------cut here---------------start------------->8--- > ;; If a previous installation was attempted, make sure we start anew; in > ;; particular, we don't want to keep a store database that might not > ;; correspond to what we're actually putting in the store. > (let ((state (string-append target "/var/guix"))) > (when (file-exists? state) > (delete-file-recursively state))) > --8<---------------cut here---------------end--------------->8--- > > Which is part of the install procedure (which gets called when using > 'guix system init /some/target'). So your guess was correct :-). Yay! > To confirm this was the case, I did: > > sudo btrfs subvolume create /tmp/toto > mkdir /tmp/tata > sudo mount -o subvol=/tmp/toto /dev/mapper/cryptroot /tmp/tata > > sudo -E guix repl >> ,import (guix build utils) >> (delete-file-recursively "/tmp/tata/") > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > In procedure rmdir: Device or resource busy > > Bingo! > > Reading the docstring of delete-file-recursively, it says it should > "report but ignore errors", so that's a bug. Yeah, that's is the same error I get when running guix init. So this sounds like it will fix my issue! Thanks for the speedy fix. -- s/Fred[re]+i[ck]+/Fredrik/g From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 22:59:33 2020 Received: (at control) by debbugs.gnu.org; 18 Sep 2020 02:59:33 +0000 Received: from localhost ([127.0.0.1]:40243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJ6cX-00050T-M7 for submit@debbugs.gnu.org; Thu, 17 Sep 2020 22:59:33 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:43056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJ6cW-00050H-E2 for control@debbugs.gnu.org; Thu, 17 Sep 2020 22:59:32 -0400 Received: by mail-qt1-f181.google.com with SMTP id g3so3813367qtq.10 for ; Thu, 17 Sep 2020 19:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=GLMBRTmEWO2Wit1KErl9f9sD5MwvRVX61vfG3gjbg6k=; b=XmqgtA7R2n/uct2rJ4f1beVOsiX5soDmQ1TVGjxRtXAplEsA1YlabiNhh6EFLBBL6l GZtPjTuwEJP/iGwRT7YpDe6hjCTWqj1ukqRuN0qF99fcY4FVCP7YLmST2gzSs2WwIejM kybZjGMEU/mN79MCWeBuKisqoWo/aPo7ExFS7mK/wg0GgrGoHMyhjy+xzo32y2biqpp3 ihMLdWZiyG7rWEj7qA0j1y3Pxb3rE3XGzHGq5N6lvAbdbgH9pgw+QV8FK6qwoVAZjzz/ EJMKdHJwu6g0oRSYh8OyBVSWHYP+ie6jibP+n52NNKOX/gO5uwtV5ktfFM3Vb+qBaUlM sObQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=GLMBRTmEWO2Wit1KErl9f9sD5MwvRVX61vfG3gjbg6k=; b=tN2VNki46W3vcW66+JNRRGplECky1qpYMGMqFoZQymOPjyTOxd2BpNQPqdkaERuUpd R7mdT3VikATHoJiR1Xs/k8cGxzlUjx4hO1KdXCIdg05fjaL9orBOWPLGv7DaT2EkLvzk eT1YK/4Zm9Cekpcs4oQJz5lFNI2wZ+KPmvk7r0AJOCza5FYA/A30lngKl4exHlgkVa3b SgGY61wIaz7wI8EeuCWUaLE1W8itffOclPfVTVyOQe7EiAtPaVO8IhlROGIiWiL/9qMc 96qjE8PJ5r1pQ0PiraqusrUg+/t5Eksz38nptQ4WWV/CVfBPmIVgA//AzFKRURtJEPVF wzFw== X-Gm-Message-State: AOAM530WDO1j2YfmdY1wih9XJWt8rP3dpXyAKf3YFWWevMml42fXiY7U f+bjHBIcWTrNR2BKMdNmtzXTTCF9U+I= X-Google-Smtp-Source: ABdhPJwgR6wll3UeMHHE1BmSKcKDiFvTQP7xRL0WX1WpmUWg0SuJT1nkVtuq9L4K2R0NKELA/L++lQ== X-Received: by 2002:aed:25d1:: with SMTP id y17mr19137580qtc.375.1600397966735; Thu, 17 Sep 2020 19:59:26 -0700 (PDT) Received: from hurd (dsl-236-125-61.b2b2c.ca. [207.236.125.61]) by smtp.gmail.com with ESMTPSA id k185sm1153973qkd.94.2020.09.17.19.59.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 19:59:26 -0700 (PDT) Date: Thu, 17 Sep 2020 23:00:24 -0400 Message-Id: <87k0wrzt4n.fsf@gmail.com> To: control@debbugs.gnu.org From: Maxim Cournoyer Subject: control message for bug #43366 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 43366 + patch quit From unknown Fri Jun 20 07:28:26 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Fredrik Salomonsson Subject: bug#43366: closed (Re: bug#43366: "error: rmdir: Device or resource busy" when using btrfs) Message-ID: References: <87sgaou3hx.fsf@gmail.com> <87v9gi5ou8.fsf@posteo.net> X-Gnu-PR-Message: they-closed 43366 X-Gnu-PR-Package: guix X-Gnu-PR-Keywords: patch Reply-To: 43366@debbugs.gnu.org Date: Thu, 08 Oct 2020 15:45:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1602171902-3097-1" This is a multi-part message in MIME format... ------------=_1602171902-3097-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #43366: "error: rmdir: Device or resource busy" when using btrfs which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 43366@debbugs.gnu.org. --=20 43366: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43366 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1602171902-3097-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 43366-done) by debbugs.gnu.org; 8 Oct 2020 15:44:20 +0000 Received: from localhost ([127.0.0.1]:32971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQY5b-0000mz-Se for submit@debbugs.gnu.org; Thu, 08 Oct 2020 11:44:20 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:43592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQY5a-0000ml-0Z for 43366-done@debbugs.gnu.org; Thu, 08 Oct 2020 11:44:18 -0400 Received: by mail-qk1-f178.google.com with SMTP id c2so7446206qkf.10 for <43366-done@debbugs.gnu.org>; Thu, 08 Oct 2020 08:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lFKdXlNwzE6HvYDByUgLwC9rL4fVoUrC5cCDHIcZDaA=; b=U9JWZpSftp9Gjnpmlx4DzY/GWRFHseFFMHvNSKOAPfOg1L0aKbbdZvNB8SKtX5jkJM bD8SZNsnxJPO0rFKTRBspQvLhxmAY2rCNqZVU0q7dofxR06+WnwBmbCVC3HrpyCd9YuH EVLdIGvqrNnIv9vrcfQqC/orVqhXS/XtpM3ihh8gFXuAssRP3J3EvvNIQ27Iy/O0y/Ns ZFdBQl6rlmXl6sJiIEAKbQ/reXKJsb5WHwGGCYS5JIEfjspLyOOItC2mJtqLPF5FLUgn ccOXPWGhehT12PkU3MAT0tFlBH2lT/Fm9AxO/N3G8tni+Qj0+L3Yn/bLL61uvICEitzp a2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lFKdXlNwzE6HvYDByUgLwC9rL4fVoUrC5cCDHIcZDaA=; b=H2zKTzaRaFzp5FXk3XqGgy3a2WV2Qk7boPdvQtYa4yQOrhDT1KXFi2pVTmnQKxFl62 FvfPPvBbofW6WngkL/8+YP1i6IV+ZgtYUF0VuicgXUzDKJOGtUMslWMgjqfDiDyXz85E zrblu8Kwe3p3xHBqhhgAstwRydhllTwACWqNH629WFDt2tcTqurdL2IdkoGNuRXA9y/V mrCWBuwUcrDNPQ8cM/dficzvbanguRWf6OMFLEWd4MRB0002Xz6prTwNFuQjGvcgJJi1 cglo8ZH4GvsyQqFt+M8sDSjkY1fLl9kTtWUAojmTdmf87785K3WmnY4YaDuLHgrVIk1P YDdA== X-Gm-Message-State: AOAM532frm7myiieAaAbbnlE6zN2P7EWgg0elhpI5LcINw+4oZsIbwzv e3GkCVdVxRGoO9cgAmWWyHaYf+RwkO4= X-Google-Smtp-Source: ABdhPJzjU/XyW8wfUNLpD9/R52KWTpim54GeoO6NhbGYamyRbSNWGBQ74wiR4evGDkEmRm6qUGHR1Q== X-Received: by 2002:ae9:ee01:: with SMTP id i1mr1844648qkg.11.1602171852351; Thu, 08 Oct 2020 08:44:12 -0700 (PDT) Received: from hurd (dsl-10-135-56.b2b2c.ca. [72.10.135.56]) by smtp.gmail.com with ESMTPSA id j11sm3942079qko.111.2020.10.08.08.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 08:44:11 -0700 (PDT) From: Maxim Cournoyer To: Fredrik Salomonsson Subject: Re: bug#43366: "error: rmdir: Device or resource busy" when using btrfs References: <87v9gi5ou8.fsf@posteo.net> <87wo0v3cb1.fsf@gmail.com> Date: Thu, 08 Oct 2020 11:44:10 -0400 In-Reply-To: <87wo0v3cb1.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 15 Sep 2020 00:15:46 -0400") Message-ID: <87sgaou3hx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43366-done Cc: 43366-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Pushed to core-updates with commit 7102c18678dc02d5ee6c77a9a70ae344482af841. Closing. Thanks, Maxim ------------=_1602171902-3097-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Sep 2020 03:59:10 +0000 Received: from localhost ([127.0.0.1]:49296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHJAT-0006ex-Ec for submit@debbugs.gnu.org; Sat, 12 Sep 2020 23:59:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:33470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHIpm-0006C4-PW for submit@debbugs.gnu.org; Sat, 12 Sep 2020 23:37:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHIpm-0005LQ-Ii for bug-guix@gnu.org; Sat, 12 Sep 2020 23:37:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]:57889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHIpj-000625-RN for bug-guix@gnu.org; Sat, 12 Sep 2020 23:37:46 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A97CA2400FB for ; Sun, 13 Sep 2020 05:37:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1599968258; bh=sBwdnbFyWZ99wteSshlj0EDGO6h9WFIF5XnrTRWga2s=; h=From:To:Subject:Date:From; b=FNepZW0kGzIp//P9e42oqKL6fXeIwS0mKBGxCJeSAlQYqWM6/FMqq3L+1gsFR5obx uWOalswy9dckflw5fROoZoiLdvkYosLWu9LDxJXJx97xIZgDf5oKjGQAzLNeRJWMQ4 sjb/dJ5hvM49bH5eUEXTtgF/LeG94ysVVigut5tjuh1OYLQ7ZBsEHgn1OxL64pWmYl YUNxsr/W8RmCdsAM3LJevCuJkQyE4hFUOSuhuHAFaedT/2xryUjE3AYSTIjOWdVXUk T4/H8bPH7JIcHwfvIEl2cd1bRJ8DGA2VRfPTqVUyHSrPJ313N9vusTJuhfCVG8FSAw kuMpZGW/MEPoA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BpwDK36JQz6tmV for ; Sun, 13 Sep 2020 05:37:37 +0200 (CEST) From: Fredrik Salomonsson To: bug-guix@gnu.org Subject: "error: rmdir: Device or resource busy" when using btrfs Date: Sat, 12 Sep 2020 20:37:35 -0700 Message-ID: <87v9gi5ou8.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@posteo.net; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/12 23:37:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 12 Sep 2020 23:59:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain When you have separate btrfs subvolumes for /gnu and /var/guix, you'll encounter this error running `guix system init /mnt/etc/config.scm /mnt` when it tries to copy things to /mnt. My guess is that guix is trying to remove one of them but fails as they're mounted. I encountered this issue while I tried installing guix system on my main laptop. But I have encountered this before [1]. When I installed guix system on my secondary laptop. I worked around it back then by using guix-0.15.0. For my secondary laptop I have this layout | subvol | Mountpoint | Comment | |-----------------------+------------+-----------------| | __current/guixsd-root | / | root for GuixSD | | __current/grub | /boot/grub | grub config | | __current/guix | /var/guix | guix stuff | | __current/gnu | /gnu | Store etc | | __current/home | /home | home partition | For my main laptop I tried: | subvol | Mountpoint | Comment | |--------+------------+----------------| | @ | / | root for Guix | | @grub | /boot/grub | grub config | | @guix | /var/guix | guix stuff | | @gnu | /gnu | Store etc | | @home | /home | home partition | Found another thread that also had this issue [2], and the same workaround worked for me. I.e. simplified the layout: | subvol | Mountpoint | Comment | |-----------+------------+----------------| | @ | / | root for Guix | | @home | /home | home partition | This seems to just be an issue when running guix system init, as I've been using my secondary laptop with separate subvolumes for /gnu and /var/guix without any issues since 0.15. The guix version I used to install my main laptop with was 1.1.0-25.44c6e6f. I generated it with guix system disk-image --file-system-type=iso9660 \ gnu/system/install.scm As described in the manual. Thanks [1] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00055.html [2] https://lists.gnu.org/archive/html/help-guix/2019-06/msg00259.html --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=heimdal-sway.scm Content-Description: Guix system config file ;; This is an operating system configuration template ;; for a "desktop" setup without full-blown desktop ;; environments. (use-modules (gnu) (gnu packages) (gnu system nss) (gnu system locale) (gnu services nfs) (gnu services sddm) (ice-9 rdelim) (ice-9 format) (srfi srfi-1)) (use-service-modules desktop networking ssh base xorg) (use-package-modules wm certs shells xdisorg display-managers) (define plattfot (user-account (name "plattfot") (group "users") ;; Define a G-Expr to find the path of the zsh binary: ;; https://gitlab.com/rain1/guix-wiki/wikis/FAQ#how-do-i-make-my-login-shell-zsh ;;(shell #~(string-append #$zsh "/bin/zsh")) (supplementary-groups '("wheel" "netdev" "audio" "video")) (home-directory "/home/plattfot"))) ;; Specify a mapped device for the encrypted root partition. ;; The UUID is that returned by 'cryptsetup luksUUID'. (define mapped-swap (mapped-device (source (uuid "3f1a433f-e3d5-46f1-8471-b0cfee72a659")) (target "swap") (type luks-device-mapping))) (define mapped-root (mapped-device (source (uuid "0633603e-019c-4be0-b35e-abb055660909")) (target "root") (type luks-device-mapping))) ;; Partion layout for `root` ;; | subvol | Mountpoint | Comment | Shared | ;; |-----------+------------+--------------------+--------| ;; | @ | / | root for Guix | no | ;; | @home | /home | home partition | yes | (define btrfs-common-options '("discard" "compress=lzo" "space_cache" "autodefrag")) (define (btrfs-mount-options subvol) "Return the btrfs mount options I use. Where SUBVOL is the subvolume to mount" (string-join `(,@btrfs-common-options ,(format #f "subvol=~a" subvol)) ",")) (define fs-root (file-system (mount-point "/") (type "btrfs") (device (file-system-label "root")) (options (btrfs-mount-options "@")) (needed-for-boot? #t) (dependencies `(,mapped-root)))) (define fs-home (file-system (mount-point "/home") (type "btrfs") (device (file-system-label "root")) (options (btrfs-mount-options "@home")) (needed-for-boot? #t) (dependencies `(,fs-root)))) (define nfs-valhalla (file-system (device "fafner:/srv/nfs4/Valhalla") (mount-point "/media/Valhalla") (type "nfs4") (mount? #f) (check? #f))) (operating-system (host-name "heimdal") (timezone "Canada/Pacific") (locale "en_US.utf8") (locale-definitions (list (locale-definition (name "en_US.utf8") (source "en_US") (charset "UTF-8")) (locale-definition (name "sv_SE.utf8") (source "sv_SE") (charset "UTF-8")))) ;; Assuming /dev/sda is the target hard disk, and "root" ;; is the label of the target root file system. (bootloader (grub-configuration (target "/dev/sda"))) ;; Kernel arguments (kernel-arguments '("rootflags=compress=lzo,subvol=@")) (mapped-devices (list mapped-root mapped-swap)) (file-systems (cons* fs-root fs-home nfs-valhalla %base-file-systems)) (swap-devices '("/dev/mapper/swap")) (users (cons plattfot %base-user-accounts)) (keyboard-layout (keyboard-layout "us" #:options '("ctrl:swapcaps"))) (packages (cons* sway waybar rofi guix-simplyblack-sddm-theme ;;zsh nss-certs ;for HTTPS access %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with Wicd, and more. (services ;;%desktop-services (cons* (service openssh-service-type (openssh-configuration (port-number 6060) (password-authentication? #f))) (extra-special-file "/bin/env" (file-append coreutils "/bin/env")) (service sddm-service-type (sddm-configuration (display-server "wayland") (theme "guix-simplyblack-sddm"))) (remove (lambda (service) (member (service-kind service) (list gdm-service-type ))) %desktop-services))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) --=-=-= Content-Type: text/plain -- s/Fred[re]+i[ck]+/Fredrik/g --=-=-=-- ------------=_1602171902-3097-1--