unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Install Guix System in a logical volume
@ 2021-11-24 21:15 David Lecompte
  2021-11-26  4:37 ` pelzflorian (Florian Pelz)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Lecompte @ 2021-11-24 21:15 UTC (permalink / raw)
  To: help-guix

Hi,

I currently have a disk with a DOS partition table, completely filled
by a first partition for /boot for Trisquel and an extended partition
that contains a logical volume group (single physical volume taking all
space in the extended partition) that includes 3 logical volumes, one
for swap, one for the root file system for Trisquel, one for the root
file system for Debian and a lot of free space.

Can I install Guix System with the whole root file system (including
/boot) in a new logical volume that I create in the same volume group?

Also, I installed Grub on the MBR via Debian. Can I expect Grub
installed by Debian to see Guix and add an entry in the boot menu for
it?

David.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Install Guix System in a logical volume
  2021-11-24 21:15 Install Guix System in a logical volume David Lecompte
@ 2021-11-26  4:37 ` pelzflorian (Florian Pelz)
  2021-11-26  4:41 ` pelzflorian (Florian Pelz)
  2021-11-27 11:24 ` pelzflorian (Florian Pelz)
  2 siblings, 0 replies; 6+ messages in thread
From: pelzflorian (Florian Pelz) @ 2021-11-26  4:37 UTC (permalink / raw)
  To: David Lecompte; +Cc: help-guix

Hello David.

On Wed, Nov 24, 2021 at 09:15:05PM +0000, David Lecompte wrote:
> Also, I installed Grub on the MBR via Debian. Can I expect Grub
> installed by Debian to see Guix and add an entry in the boot menu for
> it?
> 
> David.

No, instead you would chainload from Debian’s GRUB the Guix System’s GRUB.

I have no time to test now (sorry!).

Regards,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Install Guix System in a logical volume
  2021-11-24 21:15 Install Guix System in a logical volume David Lecompte
  2021-11-26  4:37 ` pelzflorian (Florian Pelz)
@ 2021-11-26  4:41 ` pelzflorian (Florian Pelz)
  2021-11-28  0:24   ` Denis 'GNUtoo' Carikli
  2021-11-27 11:24 ` pelzflorian (Florian Pelz)
  2 siblings, 1 reply; 6+ messages in thread
From: pelzflorian (Florian Pelz) @ 2021-11-26  4:41 UTC (permalink / raw)
  To: David Lecompte; +Cc: help-guix

On Wed, Nov 24, 2021 at 09:15:05PM +0000, David Lecompte wrote:
> Can I install Guix System with the whole root file system (including
> /boot) in a new logical volume that I create in the same volume group?

P.S. No, you would need to adapt the Guix configuration so it does not
install the bootloader to MBR.  This needs some Scheme code.

Out of time, sorry.

Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Install Guix System in a logical volume
  2021-11-24 21:15 Install Guix System in a logical volume David Lecompte
  2021-11-26  4:37 ` pelzflorian (Florian Pelz)
  2021-11-26  4:41 ` pelzflorian (Florian Pelz)
@ 2021-11-27 11:24 ` pelzflorian (Florian Pelz)
  2021-11-28  0:37   ` Denis 'GNUtoo' Carikli
  2 siblings, 1 reply; 6+ messages in thread
From: pelzflorian (Florian Pelz) @ 2021-11-27 11:24 UTC (permalink / raw)
  To: David Lecompte; +Cc: help-guix

On Wed, Nov 24, 2021 at 09:15:05PM +0000, David Lecompte wrote:
> Can I install Guix System with the whole root file system (including
> /boot) in a new logical volume that I create in the same volume group?

I shouldn’t answer in a hurry.  As of November 2021, the GNU Guix repo
contains a file gnu/tests/install.scm which contains a line

;; Since LVM support in guix currently doesn't allow root-on-LVM we use /home on LVM

In theory it would be possible though.

It seems the grub package in Guix supports LVM2 (you can see it in the
code when running `guix edit grub`).

So first you would need to adapt the grub.cfg of Guix System to insmod
lvm like Debian does and copy the search line from Debian’s grub.cfg.
That you would either do manually every time you run `guix system
reconfigure` to upgrade the system, or you would need to adapt the
grub bootloader script in Scheme.

Now you want to keep your old bootloader on your /boot partition and
chainload from it the Guix LVM root partition.  Is that possible?  I
don’t know.  This is getting too finicky.  Don’t do it.

Regards,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Install Guix System in a logical volume
  2021-11-26  4:41 ` pelzflorian (Florian Pelz)
@ 2021-11-28  0:24   ` Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 6+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2021-11-28  0:24 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: help-guix

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

On Fri, 26 Nov 2021 05:41:43 +0100
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> wrote:

> On Wed, Nov 24, 2021 at 09:15:05PM +0000, David Lecompte wrote:
> > Can I install Guix System with the whole root file system (including
> > /boot) in a new logical volume that I create in the same volume
> > group?  
> 
> P.S. No, you would need to adapt the Guix configuration so it does not
> install the bootloader to MBR.  This needs some Scheme code.

Libreboot users also typically don't install the bootloader but still
generate a grub configuration file. There is a guide on the Internet
for that but I don't remember the address.

Here's a configuration that has been derived from it:
>  (bootloader (bootloader-configuration (bootloader (bootloader
>                                                     (inherit
> grub-bootloader) (installer #~(const #t))))
>                                        (keyboard-layout
> keyboard-layout)))

Denis.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Install Guix System in a logical volume
  2021-11-27 11:24 ` pelzflorian (Florian Pelz)
@ 2021-11-28  0:37   ` Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 6+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2021-11-28  0:37 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: help-guix

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

On Sat, 27 Nov 2021 12:24:15 +0100
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> wrote:

> On Wed, Nov 24, 2021 at 09:15:05PM +0000, David Lecompte wrote:
> > Can I install Guix System with the whole root file system (including
> > /boot) in a new logical volume that I create in the same volume
> > group?  
> 
> I shouldn’t answer in a hurry.  As of November 2021, the GNU Guix repo
> contains a file gnu/tests/install.scm which contains a line
> 
> ;; Since LVM support in guix currently doesn't allow root-on-LVM we
> use /home on LVM
> 
> In theory it would be possible though.
I'm writing this mail from a Guix system running from a roottfs in an
ext4 partition that is in an lvm partition. The LVM physical volumes
(PV) are encrypted with LUKS.

If I recall well the limitation with LVM2 comes from the fact that
there is no (standard) way to make the grub image generated by Guix
support LVM2 and LUKS.

In my case GRUB isn't handled by Guix and the grub image I use was
built with LVM2 and LUKS support, and that works fine for me.

Here's part of my system.scm for the machine that boots on an LVM
rootfs:
> (define %lvm-vg
>   (list
>    (mapped-device
>     (source (uuid "abcdef12-abcd-1234-abcd-1234abcd1234"))
>     (target "internal-cleartext")
>     (type luks-device-mapping))
>    (mapped-device
>     (source "my_vg_name")
>     (targets (list "my_vg_name-guix32"))
>     (type lvm-device-mapping))))
[...]
> (define %guix32-rootfs
>   (file-system
>    (device "/dev/mapper/my_vg_name-guix32")
>    (mount-point "/")
>    (type "ext4")
>    (dependencies %lvm-vg)))
[...]
>  (mapped-devices %lvm-vg)
[...]
>  (file-systems (append (list
>                         %guix32-rootfs
                          [...]

Denis.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-28  0:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-24 21:15 Install Guix System in a logical volume David Lecompte
2021-11-26  4:37 ` pelzflorian (Florian Pelz)
2021-11-26  4:41 ` pelzflorian (Florian Pelz)
2021-11-28  0:24   ` Denis 'GNUtoo' Carikli
2021-11-27 11:24 ` pelzflorian (Florian Pelz)
2021-11-28  0:37   ` Denis 'GNUtoo' Carikli

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).