help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Librem Mini with pureboot/head don't boot GuixSD


From: Thiago Jung Bauermann
Subject: Re: Librem Mini with pureboot/head don't boot GuixSD
Date: Thu, 19 Aug 2021 19:39:22 -0300

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]