From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id qIkFBVUwLWWxgQEAauVa8A:P1 (envelope-from ) for ; Mon, 16 Oct 2023 14:45:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qIkFBVUwLWWxgQEAauVa8A (envelope-from ) for ; Mon, 16 Oct 2023 14:45:09 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B21213ED8B for ; Mon, 16 Oct 2023 14:45:08 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=kghxRYi3; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697460308; a=rsa-sha256; cv=none; b=eWtIvf4bxGKgEsU/dpBcXNQ9YihB9LmdyaLi/bwtBvLLEFFV5I0OLLOd58tQpomISUfud2 sPTQMGVWnR0IUPrSy3xliMO7LRTWCvRGwmcJACw2j16+4dcVod7Td38Pz+GaRgrPEu32WH 3YaX/bo7Ll7OlM48VOxw+plytIwlOP5wOhXIRZoIdVJiBQuwVdvOwSmd+TCM0ngXQAzokW mdbHHomJEHm2i5mrxIxUUzS01lsU2TYT58mZjju3fDiqWPTbyjdoatcWgOG4OKmUSCXe1u VTrJWTas4wvnN8zHQ3vIMyqgaa8uHJ+A58SZ1uK1t/MNEmOItJwVrfVXY+2Y0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=kghxRYi3; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697460308; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4Q7ZPlDZ9DB4+R5CB99DnGt25pfxguLIjfx1OXvaqWc=; b=HmJxVr0ksZt6f12SOo9+GMSGgZwvKUEOdYpb72DP6TbxbnR2v+O8i+fmymedo071nOZ0o+ f3PKdmv+wJG8R0PoeoT3hcdJwpzIBHB32ayuVNOPmTxDeFioQ0eS/5HSyWGApo64BOAnm8 6KkEv9qtmrgtEKQwrZts6EsAmwy16WgR2KDUmSb2AT5r54THowOAXWJXEHiihwaFzTe9FS d9tI9GVtIMim5Edrx08AWdjbHVZ4Bc/mLpFmBo+JUlEC3jA1VbpCEn6WS1ylNpDjMvLodb oFcFRKyP/z/XavB8G56/YsvX0+PttpXhInLNFoWlzf5PP4B2Sjz8RaUDn0Qm5w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsMxk-0006cf-7t; Mon, 16 Oct 2023 08:44:48 -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 1qsMxZ-0006aN-AF for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:40 -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 1qsMxZ-0007JD-2H for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsMxx-0008MM-Qu for guix-patches@gnu.org; Mon, 16 Oct 2023 08:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66577] [PATCH 1/4] doc: Move =?UTF-8?Q?=E2=80=9CSystem?= Troubleshooting =?UTF-8?Q?Tips=E2=80=9D?= below. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Oct 2023 12:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66577@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 66577-submit@debbugs.gnu.org id=B66577.169746025432029 (code B ref 66577); Mon, 16 Oct 2023 12:45:01 +0000 Received: (at 66577) by debbugs.gnu.org; 16 Oct 2023 12:44:14 +0000 Received: from localhost ([127.0.0.1]:55457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxB-0008KV-Pi for submit@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMx8-0008KA-Su for 66577@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:12 -0400 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 1qsMwc-00077o-S7; Mon, 16 Oct 2023 08:43:39 -0400 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=4Q7ZPlDZ9DB4+R5CB99DnGt25pfxguLIjfx1OXvaqWc=; b=kghxRYi3rIxVdEo9rWVF iXbOrh0PHhCodgbsuzkCWRvEfb+9jrb2eElDnZTr1XrVeUmltwSw/Bg++DJDk6LODc8924znfEonc XPlarmzkUvH+oo8UapQS9UJy3hrDyKIML1riuWMJjY8vUosiqUpb9u5PD29mjB+mj6HLSK7gnilw2 ez1KXJ7bd5yBFbMP8lqFRWne7M3HjtXxIP/PZZq7OIdu5Iqgx8ezH6SRHWvadwFbmIWtRGsOSJmCj 4dG9dZMeT1860+p2VIvzisMn7QAneWQuxvIDxXVVJmOJMKcbeK/q3E7Ej6kQWTeufNZoIgp99m7ze OYj1KTRUL43nAQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 16 Oct 2023 14:43:00 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -2.88 X-Spam-Score: -2.88 X-Migadu-Queue-Id: B21213ED8B X-TUID: w8G4+FhpNCS2 So far this section would appear before “Getting Started”. This moves it right after “System Configuration”. * doc/guix.texi (System Troubleshooting Tips): Move after “System Configuration”. --- doc/guix.texi | 245 +++++++++++++++++++++++++------------------------- 1 file changed, 123 insertions(+), 122 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3517c95251..8ebf50469e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -185,7 +185,6 @@ Top * Introduction:: What is Guix about? * Installation:: Installing Guix. * System Installation:: Installing the whole operating system. -* System Troubleshooting Tips:: When things don't go as planned. * Getting Started:: Your first steps. * Package Management:: Package installation, upgrade, etc. * Channels:: Customizing the package collection. @@ -194,6 +193,7 @@ Top * Utilities:: Package management commands. * Foreign Architectures:: Build for foreign architectures. * System Configuration:: Configuring the operating system. +* System Troubleshooting Tips:: When things don't go as planned. * Home Configuration:: Configuring the home environment. * Documentation:: Browsing software user manuals. * Platforms:: Defining platforms. @@ -251,10 +251,6 @@ Top * Keyboard Layout and Networking and Partitioning:: Initial setup. * Proceeding with the Installation:: Installing. -System Troubleshooting Tips - -* Chrooting into an existing system:: - Package Management * Features:: How Guix will make your life brighter. @@ -427,6 +423,10 @@ Top * Shepherd Services:: A particular type of service. * Complex Configurations:: Defining bindings for complex configurations. +System Troubleshooting Tips + +* Chrooting into an existing system:: + Home Configuration * Declaring the Home Environment:: Customizing your Home. @@ -2978,123 +2978,6 @@ Building the Installation Image @code{A20-OLinuXino-Lime2} is the name of the board. If you specify an invalid board, a list of possible boards will be printed. -@c ********************************************************************* -@cindex troubleshooting, guix system -@cindex guix system troubleshooting -@node System Troubleshooting Tips -@chapter System Troubleshooting Tips - -Guix System allows rebooting into a previous generation should the last -one be malfunctioning, which makes it quite robust against being broken -irreversibly. This feature depends on GRUB being correctly functioning -though, which means that if for whatever reasons your GRUB installation -becomes corrupted during a system reconfiguration, you may not be able -to easily boot into a previous generation. A technique that can be used -in this case is to @i{chroot} into your broken system and reconfigure it -from there. Such technique is explained below. - -@cindex chroot, guix system -@cindex chrooting, guix system -@cindex repairing GRUB, via chroot -@menu -* Chrooting into an existing system:: -@end menu - -@node Chrooting into an existing system -@section Chrooting into an existing system - -This section details how to @i{chroot} to an already installed Guix -System with the aim of reconfiguring it, for example to fix a broken -GRUB installation. The process is similar to how it would be done on -other GNU/Linux systems, but there are some Guix System particularities -such as the daemon and profiles that make it worthy of explaining here. - -@enumerate -@item -Obtain a bootable image of Guix System. It is recommended the latest -development snapshot so the kernel and the tools used are at least as as -new as those of your installed system; it can be retrieved from the -@url{https://ci.guix.gnu.org/search/latest/ISO-9660?query=spec:images+status:success+system:x86_64-linux+image.iso, -https://ci.guix.gnu.org} URL. Follow the @pxref{USB Stick and DVD -Installation} section for copying it to a bootable media. - -@item -Boot the image, and proceed with the graphical text-based installer -until your network is configured. Alternatively, you could configure -the network manually by following the -@ref{manual-installation-networking} section. If you get the error -@samp{RTNETLINK answers: Operation not possible due to RF-kill}, try -@samp{rfkill list} followed by @samp{rfkill unblock 0}, where @samp{0} -is your device identifier (ID). - -@item -Switch to a virtual console (tty) if you haven't already by pressing -simultaneously the @kbd{Control + Alt + F4} keys. Mount your file -system at @file{/mnt}. Assuming your root partition is -@file{/dev/sda2}, you would do: - -@example sh -mount /dev/sda2 /mnt -@end example - -@item -Mount special block devices and Linux-specific directories: - -@example sh -mount --rbind /proc /mnt/proc -mount --rbind /sys /mnt/sys -mount --rbind /dev /mnt/dev -@end example - -If your system is EFI-based, you must also mount the ESP partition. -Assuming it is @file{/dev/sda1}, you can do so with: - -@example sh -mount /dev/sda1 /mnt/boot/efi -@end example - -@item -Enter your system via chroot: - -@example sh -chroot /mnt /bin/sh -@end example - -@item -Source the system profile as well as your @var{user} profile to setup -the environment, where @var{user} is the user name used for the Guix -System you are attempting to repair: - -@example sh -source /var/guix/profiles/system/profile/etc/profile -source /home/@var{user}/.guix-profile/etc/profile -@end example - -To ensure you are working with the Guix revision you normally would as -your normal user, also source your current Guix profile: - -@example sh -source /home/@var{user}/.config/guix/current/etc/profile -@end example - -@item -Start a minimal @command{guix-daemon} in the background: - -@example sh -guix-daemon --build-users-group=guixbuild --disable-chroot & -@end example - -@item -Edit your Guix System configuration if needed, then reconfigure with: - -@example sh -guix system reconfigure your-config.scm -@end example - -@item -Finally, you should be good to reboot the system to test your fix. - -@end enumerate @c ********************************************************************* @node Getting Started @@ -43020,6 +42903,124 @@ Complex Configurations @end example +@c ********************************************************************* +@cindex troubleshooting, Guix System +@cindex guix system troubleshooting +@node System Troubleshooting Tips +@chapter System Troubleshooting Tips + +Guix System allows rebooting into a previous generation should the last +one be malfunctioning, which makes it quite robust against being broken +irreversibly. This feature depends on GRUB being correctly functioning +though, which means that if for whatever reasons your GRUB installation +becomes corrupted during a system reconfiguration, you may not be able +to easily boot into a previous generation. A technique that can be used +in this case is to @i{chroot} into your broken system and reconfigure it +from there. Such technique is explained below. + +@cindex chroot, guix system +@cindex chrooting, guix system +@cindex repairing GRUB, via chroot +@menu +* Chrooting into an existing system:: +@end menu + +@node Chrooting into an existing system +@section Chrooting into an existing system + +This section details how to @i{chroot} to an already installed Guix +System with the aim of reconfiguring it, for example to fix a broken +GRUB installation. The process is similar to how it would be done on +other GNU/Linux systems, but there are some Guix System particularities +such as the daemon and profiles that make it worthy of explaining here. + +@enumerate +@item +Obtain a bootable image of Guix System. It is recommended the latest +development snapshot so the kernel and the tools used are at least as as +new as those of your installed system; it can be retrieved from the +@url{https://ci.guix.gnu.org/search/latest/ISO-9660?query=spec:images+status:success+system:x86_64-linux+image.iso, +https://ci.guix.gnu.org} URL. Follow the @pxref{USB Stick and DVD +Installation} section for copying it to a bootable media. + +@item +Boot the image, and proceed with the graphical text-based installer +until your network is configured. Alternatively, you could configure +the network manually by following the +@ref{manual-installation-networking} section. If you get the error +@samp{RTNETLINK answers: Operation not possible due to RF-kill}, try +@samp{rfkill list} followed by @samp{rfkill unblock 0}, where @samp{0} +is your device identifier (ID). + +@item +Switch to a virtual console (tty) if you haven't already by pressing +simultaneously the @kbd{Control + Alt + F4} keys. Mount your file +system at @file{/mnt}. Assuming your root partition is +@file{/dev/sda2}, you would do: + +@example sh +mount /dev/sda2 /mnt +@end example + +@item +Mount special block devices and Linux-specific directories: + +@example sh +mount --rbind /proc /mnt/proc +mount --rbind /sys /mnt/sys +mount --rbind /dev /mnt/dev +@end example + +If your system is EFI-based, you must also mount the ESP partition. +Assuming it is @file{/dev/sda1}, you can do so with: + +@example sh +mount /dev/sda1 /mnt/boot/efi +@end example + +@item +Enter your system via chroot: + +@example sh +chroot /mnt /bin/sh +@end example + +@item +Source the system profile as well as your @var{user} profile to setup +the environment, where @var{user} is the user name used for the Guix +System you are attempting to repair: + +@example sh +source /var/guix/profiles/system/profile/etc/profile +source /home/@var{user}/.guix-profile/etc/profile +@end example + +To ensure you are working with the Guix revision you normally would as +your normal user, also source your current Guix profile: + +@example sh +source /home/@var{user}/.config/guix/current/etc/profile +@end example + +@item +Start a minimal @command{guix-daemon} in the background: + +@example sh +guix-daemon --build-users-group=guixbuild --disable-chroot & +@end example + +@item +Edit your Guix System configuration if needed, then reconfigure with: + +@example sh +guix system reconfigure your-config.scm +@end example + +@item +Finally, you should be good to reboot the system to test your fix. + +@end enumerate + @node Home Configuration @chapter Home Configuration @cindex home configuration -- 2.41.0