unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Wojtek Kosior via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org>
To: Giovanni Biscuolo <g@xelera.eu>
Cc: guix-devel@gnu.org
Subject: Re: cannot boot after installation on VPS (via rescue system)
Date: Thu, 22 Feb 2024 01:30:43 +0100	[thread overview]
Message-ID: <20240222013043.3b8945a0.koszko@koszko.org> (raw)
In-Reply-To: <87zfvu5eif.fsf@xelera.eu>

[-- Attachment #1: Type: text/plain, Size: 5303 bytes --]

> --8<---------------cut here---------------start------------->8---
> 
> Scanning for Btrfs filesystems
> ice-9/boot9.scm:1685:16: In procedure raise-exception:
> In procedure mount: No such file or directory
> GRUB loading...
> Entering a new prompt.  Type ',bt' for a backtrace or ',q' to continue.
> [...]
> scheme@(guile-user)> ,bt
> In gnu/build/linux-boot.scm:
>     637:8  3 (_)
>     435:8  2 (mount-root-filesystem "/dev/sda3" "btrfs" # _ #:flags ?)
> In unknown file:
>            1 (mount "/dev/sda3" "/root" "btrfs" 0 "compress=zstd")
> In ice-9/boot9.scm:
>   1685:16: 0 (raise-exception _ #:continuable? _)
> 
> --8<---------------cut here---------------end--------------->8---

Maybe the device file is called different from /dev/sda3?  On one VPS of
mine (which also happens to have Guix installed via rescue mode) the
root is mounted from /dev/vda1.

> In particular, I don't understand why the boot script is trying to mount
> the root filesystem at "/root" and not at "/" as it should: am I missing
> something?

Linux-based systems typically start with initrd filesystem mounted at
/.  They then mount the real root at some subdirectory of / and use
either chroot or pivot-root system call to make the processes see it as
if it were mounted at / in the first place.

I'm not an expert in early boot process so please forgive me any
mistakes I might have made in this explanation :)

Best,
Wojtek


-- (sig_start)
website: https://koszko.org/koszko.html
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
follow me on Fediverse: https://friendica.me/profile/koszko/profile

♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ==
✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8=
-- (sig_end)


On Wed, 21 Feb 2024 10:54:16 +0100 Giovanni Biscuolo <g@xelera.eu> wrote:

> From: Giovanni Biscuolo <g@xelera.eu>
> To: guix-devel@gnu.org
> Subject: cannot boot after installation on VPS (via rescue system)
> Date: Wed, 21 Feb 2024 10:54:16 +0100
> Sender: guix-devel-bounces+koszko=koszko.org@gnu.org
> Organization: Xelera.eu
> 
> Hello,
> 
> following the good guidelines from (info "(guix-cookbook) Running Guix
> on a Kimsufi Server") and (info "(guix-cookbook) Running Guix on a
> Linode Server") I'm developing a shell script to automate the "manual"
> installation of Guix on bare metal and VPS, you can find it attached to
> this email as bootstrap-guix.sh or at this git repo URL:
> https://gitlab.com/softwareworkers/swws/-/blob/master/infrastructure/hosts/cornouiller/bootstrap-guix.sh?ref_type=heads
> 
> 
> [bootstrap-guix.sh  text/x-sh (11954 bytes)] 
> 
> 
> The main purpose of the script is to allow me to install Guix on
> machines (bare metal or virtual) hosted by vendors who do not offer Guix
> in their OS installation options, since almost all vendors provides a
> rescue system that can be used to "manually" set up the environment,
> partition the target disk and lastly "guix system init..."
> 
> I've extensively tested the script locally (on bare metal and QEMU VMs),
> both booting the machines via grml [1] and Guix install image and it
> works as expected; I've also used it to install Guix on some bare metal.
> 
> Now I'm trying to use it on two VPS from two different vendors, booted
> in rescue mode, but after the installation (via bootstrap-guix.sh) when
> I reboot the VPS I get the usual grub menu but the boot process suddenly
> fails with this error (manually copied from web console, sorry for
> possible typos):
> 
> --8<---------------cut here---------------start------------->8---
> 
> Scanning for Btrfs filesystems
> ice-9/boot9.scm:1685:16: In procedure raise-exception:
> In procedure mount: No such file or directory
> GRUB loading...
> Entering a new prompt.  Type ',bt' for a backtrace or ',q' to continue.
> [...]
> scheme@(guile-user)> ,bt
> In gnu/build/linux-boot.scm:
>     637:8  3 (_)
>     435:8  2 (mount-root-filesystem "/dev/sda3" "btrfs" # _ #:flags ?)
> In unknown file:
>            1 (mount "/dev/sda3" "/root" "btrfs" 0 "compress=zstd")
> In ice-9/boot9.scm:
>   1685:16: 0 (raise-exception _ #:continuable? _)
> 
> --8<---------------cut here---------------end--------------->8---
> 
> In particular, I don't understand why the boot script is trying to mount
> the root filesystem at "/root" and not at "/" as it should: am I missing
> something?
> 
> I suspect that the issue depends on how the rescue system root is
> mounted (overlay filesystem) but I'm not sure; I cannot find a solution.
> 
> I'm also attaching:
> 
> - bootstrap-config.scm: automatically generated by the script and used
> by "guix system init..."
> 
> 
> [bootstrap-config.scm  text/x-script.guile (2097 bytes)] 
> 
> 
> - bootstrap-mount-points.txt: automatically collected during installation
> 
> 
> [bootstrap-mount-points.txt  text/plain (2833 bytes)] 
> 
> 
> You can find all the files also here:
> https://gitlab.com/softwareworkers/swws/-/tree/master/infrastructure/hosts/cornouiller?ref_type=heads
> 
> Any idea please? :-O
> 
> Happy hacking! Gio'
> 
> 
> 
> [1] https://grml.org/, a rescue system based on Debian
> 
> 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2024-02-22  0:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  9:54 cannot boot after installation on VPS (via rescue system) Giovanni Biscuolo
2024-02-21 17:58 ` jbranso
2024-02-22  7:16   ` Giovanni Biscuolo
2024-02-22  8:07     ` Saku Laesvuori
2024-02-22  8:55       ` Giovanni Biscuolo
2024-02-22  0:30 ` Wojtek Kosior via Development of GNU Guix and the GNU System distribution. [this message]
2024-02-22  7:25   ` Giovanni Biscuolo
2024-02-22  9:37     ` Wojtek Kosior via Development of GNU Guix and the GNU System distribution.

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240222013043.3b8945a0.koszko@koszko.org \
    --to=guix-devel@gnu.org \
    --cc=g@xelera.eu \
    --cc=koszko@koszko.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).