From: Giovanni Biscuolo <g@xelera.eu>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: cannot boot with BTRFS in degraded mode
Date: Thu, 05 Sep 2019 16:17:24 +0200 [thread overview]
Message-ID: <87a7bi25fv.fsf@roquette.mug.biscuolo.net> (raw)
In-Reply-To: <CAE4v=pigS23fM9Y380i3zGQT-_+nNsWzueBpbXn7Pn6PoKdDrA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2730 bytes --]
Hi Gábor,
Gábor Boskovits <boskovits@gmail.com> writes:
[...]
>> Christopher suggested I might be able to at least mount the filesystem
>> with the degraded option in the guix rescue environment, which might be
>> something like:
>>
>> --8<---------------cut here---------------start------------->8---
>> (mkdir "/mnt/broken-root")
>> (mount "/dev/sda3" "/mnt/broken-root" "btrfs" 0 "degraded")
>> --8<---------------cut here---------------end--------------->8---
>>
>> but we do not know how to proceed from there.
>
> I don't know what would work from here, but here are a few ideas:
> 1. somehow hack the degraded root option into the bootloader config, like
> here:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1229456
Oh great! I was not able to find what it seems a solution to boot: add
"degraded" to the "rootflags=" kernel parameters (ah my ignorance!)
I also find (just now :-S) this message very helpful:
https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg31265.html
> 2. try to switch_root, using /bin/sh as init, and try to fix the bootloader
> config from there.
This is not strictly needed, all I need to boot is entering the grub
editing mode, boot degraded and solve the problem with "btrfs
replace..." and "btrfs balance..."
I was thinking to permanently add "rootflags=[...],degraded" as kernel
parameter but reading the message I mentioned above:
--8<---------------cut here---------------start------------->8---
Altho if it is indeed true that btrfs will now refuse to mount writable
if it's degraded like that, that's not such a huge issue either, as the
read-only mount can serve as the same warning. Still, I certainly prefer
the refusal to mount entirely without the degraded option, if indeed the
filesystem is lacking a component device. There's nothing quite like
forcing me to actually type in "rootflags=degraded" to rub my face in the
reality and gravity of the situation I'm in! =:^)
--8<---------------cut here---------------end--------------->8---
I changed my mind: booting in degraded mode should be done "manually"
just to solve the issue :-)
> 3. see what the original script is doing, either by having a look at how it
> is composed:
> see for example: gnu/system.scm:
> operating-system-default-essential-services,
> gnu/services.scm: %boot-service and most prominently:
> gnu/services/shepherd.scm: shepherd-boot-gexp
>
> Wdyt?
I'm certailny going to study how Guix instruments the booting of a
machine, but I need time... and I'm late :-S
Thank you very much for the pointers, indeed!
[...]
Ciao, Gio'.
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2019-09-05 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 14:36 cannot boot with BTRFS in degraded mode Giovanni Biscuolo
2019-09-04 20:49 ` Gábor Boskovits
2019-09-04 21:02 ` Gábor Boskovits
2019-09-05 14:17 ` Giovanni Biscuolo [this message]
2019-09-06 1:00 ` Maxim Cournoyer
2019-09-06 6:30 ` Giovanni Biscuolo
2019-09-06 7:20 ` Maxim Cournoyer
2019-09-06 9:47 ` Giovanni Biscuolo
2019-09-07 0:20 ` Maxim Cournoyer
2019-09-06 7:21 ` Christopher Baines
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=87a7bi25fv.fsf@roquette.mug.biscuolo.net \
--to=g@xelera.eu \
--cc=boskovits@gmail.com \
--cc=help-guix@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.
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).