From: Thiago Jung Bauermann <bauermann@kolabnow.com>
To: Roland Everaert <r.everaert@protonmail.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: Librem Mini with pureboot/head don't boot GuixSD
Date: Thu, 19 Aug 2021 19:39:22 -0300 [thread overview]
Message-ID: <1661974.YvECvzcvlD@popigai> (raw)
In-Reply-To: <gcX0nzEmzyC-CM2ROz1HgjwgMsg9AcNXiCY0Clx8HoJ5P_c545Yo68wAxGDOFmf4gPkPbFAC5v-PbRN2BEjwOgbM6-njltKB4_9F3SXAI4Y=@protonmail.com>
Hello Roland,
Em quinta-feira, 19 de agosto de 2021, às 11:57:45 -03, Roland Everaert
escreveu:
> I manage to successfuly copy the needed files to /boot using the `for
> each` loop from ‘%copy-kernel-and-initrd’, Thank You.
That’s great!
> However, I need to resize (i.e. reduce) the root filesystem so /boot can
> live in its own one. Currently, copying the kernel files too /boot is
> useless, as HEAD will scan and sign all the files in /, anyway.
>
> Did you have any article discussing such process?
>
> I find plenty of articles about increasing the root partition, but, none
> to reduce it.
>
> As the root partition cannot be unmounted online, I need to know if there
> is a simple way to "switch to an offline mode of sort". For example, I
> could map a minimal root FS in memory and chroot to it. An other
> possibility is to copy a guix system to a USB drive and boot from it.
>
> The USB option seems the easiest, but the one with the RAMFS seems neat.
>
> What are the recommandations of the fine folks on this ML, for such
> operation?
I don’t have any resource about how to shrink a partition and its
filesystem. I would boot into some distro’s live image and do it from
there.
Shrinking a partition is dangerous and error-prone because there are two
steps:
1. Shrink the filesystem
2. Shrink the partition
If you get the size calculation wrong in step 2 you’ll end up cutting off
the end of your filesystem and thus corrupt it.
So I believe the recommended practice is to always shrink the partition to
be slightly bigger than the filesystem to make sure you don’t take that
risk. You can then optionally grow back the filesystem to fill the slack
space (filesystem resizing tools can automatically calculate the correct
size to fill the partition).
Since this is a risky operation, you have to make sure you have backups of
everything. And since you need to do that, to be honest what I would
*really* do is wipe everything out, repartition the disk to the new layout
and then restore from backups...
--
Thanks,
Thiago
next prev parent reply other threads:[~2021-08-19 22:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 10:59 Librem Mini with pureboot/head don't boot GuixSD Roland Everaert via
2021-08-12 17:05 ` Tobias Geerinckx-Rice
2021-08-14 11:23 ` Re : " Roland Everaert via
2021-08-14 19:30 ` Thiago Jung Bauermann
2021-08-19 14:57 ` Re : " Roland Everaert
2021-08-19 22:39 ` Thiago Jung Bauermann [this message]
2021-09-01 11:04 ` Roland Everaert
2021-09-01 16:21 ` Tobias Geerinckx-Rice
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=1661974.YvECvzcvlD@popigai \
--to=bauermann@kolabnow.com \
--cc=help-guix@gnu.org \
--cc=r.everaert@protonmail.com \
/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).