help-guix
[Top][All Lists]
Advanced

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

Re: guix system init with mounted btrfs


From: Matt Huszagh
Subject: Re: guix system init with mounted btrfs
Date: Sun, 23 Jun 2019 10:36:22 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Thanks for the reply/suggestions Tobias!

Tobias Geerinckx-Rice <address@hidden> writes:
>> mount -o subvol=@guixsd,$o_btrfs LABEL=btrfs /mnt
>> mount -o subvol=@gnu,$o_btrfs LABEL=btrfs /mnt/gnu
>
> The two above are especially problematic: Guix's GRUB looks only for 
> /gnu/store/…-linux/, which is
> now two indirections away.
>
> Guix System *probably* supports⁰ ‘in-place’ subvolumes like
>
>  btrfs subvol create /gnu/store
>
> only because it doesn't need to support them: they're just directories.
>
>> mount -o subvol=@grub,$o_btrfs LABEL=btrfs /mnt/boot/grub
>
> Does GRUB support magically finding itself elsewhere like this? Does this 
> work on other
> distributions?  If so, do you know how?

Ok, so I've simplified the subvolume layout somewhat:
mount -t btrfs -o compress=lzo LABEL=btrfs /mnt
btrfs subvolume create /mnt/@guixsd
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@snapshots
umount /mnt
o_btrfs=defaults,X-mount.mkdir,compress=lzo,ssd,noatime

mount -o subvol=@guixsd,$o_btrfs LABEL=btrfs /mnt
mount -o subvol=@home,$o_btrfs LABEL=btrfs /mnt/home
mount -o subvol=@snapshots,$o_btrfs LABEL=btrfs /mnt/.snapshots
mount -o X-mount.mkdir /dev/nvme0n1p1 /mnt/boot/efi

guix system init succeeds with this layout! So it seems like you're
right and guix only currently supports in-place subvolumes.

Additionally, this appears to fix another probable error which I didn't
originally mention. grub.cfg was omitting path components. So the linux
command was something like linux /store/... instead of
linux /gnu/store/...

That's now fixed.

I'm now encountering another error when attempting to boot however. I
have 2 luks-encrypted SSDs and grub only prompts me for one
passphrase. Since I'm using a BTRFS filesystem spanning partitions from
both devices, I'm sent to a grub rescue prompt after decrypting the
first device. I took a look through the GRUB reference manual and it
looks like decryption is performed by the "cryptomount"
command. However, I don't see any reference to "cryptomount" or
"mkconfig" (for grub-mkconfig) in the guix source code. Additionally,
when I look at the generated grub.cfg file I don't see cryptomount
anywhere. Still, it does at least prompt me for one passphrase.

I've listed both devices as mapped-devices:

(define cryptnvme
  (mapped-device
   (source (uuid "ee3b58e3-e3a1-4d83-8306-060fcd102761"))
   (target "cryptnvme")
   (type luks-device-mapping)))

(define cryptsd
  (mapped-device
   (source (uuid "4b61ed37-f628-4d78-b6eb-099be4a25b15"))
   (target "cryptsd")
   (type luks-device-mapping)))

...

 (mapped-devices (list cryptnvme cryptsd))

Any thoughts on what might be causing that?

> You're damn right that this needs to be improved.  Hands welcome :-)

Once I get the simple subvolume layout working I'll take a look at
getting the more complex setup to work and report back!

Thanks
Matt



reply via email to

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