From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: 36054@debbugs.gnu.org
Subject: bug#36054: [wishlist] Simplify chrooting into installed system from install image
Date: Sun, 2 Jun 2019 14:33:33 +0200 [thread overview]
Message-ID: <20190602123333.cjeqmrwz6be7uykd@pelzflorian.localdomain> (raw)
When bootloader installation fails or when the installed bootloader
does not allow selecting old generations (like the U-Boot bootloader),
chrooting may become necessary to repair a broken Guix system.
Guix should offer officially supported instructions in the manual and
perhaps more tooling for chrooting into an installed Guix System from
a Guix install USB/DVD/SD (and perhaps from a foreign distro) to
enable debugging.
Arch has <https://wiki.archlinux.org/index.php/Chroot#Usage>. They
offer an official arch-chroot script to chroot into an Arch system (it
is shipped with their install image) as well as documentation for
chrooting without the script. Their documentation for chrooting
without the arch-chroot script also works on Guix, but some more steps
are required:
* Mounting the (perhaps encrypted) drive with the broken Guix System.
This is not part of Arch’ chroot instructions, but could perhaps be
part of a more interactive guix-chroot script, since Guix’ target
audience is different from Arch’s. Note that the name given to
cryptsetup must be the same as specified in /etc/config.scm if one
wishes to reconfigure from the chroot.
* When following the
<https://wiki.archlinux.org/index.php/Chroot#Using_chroot>
instructions from the Arch wiki (without rebinding /run), I can
chroot into /run/current-system/profile/bin/bash. What if the user
wants a different shell and not bash? This perhaps could be
selectable in an (interactive?) guix-chroot script.
* Afterwards a Guix daemon must be started in the chroot to use Guix
from within such a chroot.
* The /run/current-system/profile/etc/profile,
~/.guix-profile/etc/profile and ~/.config/guix/current/etc/profile
need to be sourced to use the installed system’s Guix profile.
* Networking automatically works for me in the chroot without needing
to follow any Arch wiki instructions to get it working, but I do not
know if that is always the case.
Note that for me reconfiguring did not work when chrooting from a
Debian live image into Guix because GRUB claimed to have no crypto
support. I needed to chroot from the Guix install image for
reconfiguring. Perhaps the environment visible to GRUB is not pure.
What do you think? Is a guix-chroot script a good idea? I do not
know how to write one. Do you think only chroot instructions in the
manual are a better solution? They should explain all the above steps
though, I believe.
Regards,
Florian
reply other threads:[~2019-06-02 12:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190602123333.cjeqmrwz6be7uykd@pelzflorian.localdomain \
--to=pelzflorian@pelzflorian.de \
--cc=36054@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.