From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Huszagh Subject: Re: guix system init with mounted btrfs Date: Sun, 23 Jun 2019 10:36:22 -0700 Message-ID: <875zowjjah.fsf@gmail.com> References: <87r27lginz.fsf@gmail.com> <87v9wwscbm.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:41602) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf6Pm-0002fy-QE for help-guix@gnu.org; Sun, 23 Jun 2019 13:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf6Pj-0006kL-R5 for help-guix@gnu.org; Sun, 23 Jun 2019 13:36:29 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:34599) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hf6Pj-0006hZ-Ki for help-guix@gnu.org; Sun, 23 Jun 2019 13:36:27 -0400 Received: by mail-pf1-x431.google.com with SMTP id c85so6162292pfc.1 for ; Sun, 23 Jun 2019 10:36:26 -0700 (PDT) In-Reply-To: <87v9wwscbm.fsf@nckx> (Tobias Geerinckx-Rice's message of "Sun, 23 Jun 2019 14:42:05 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Tobias Geerinckx-Rice Cc: help-guix@gnu.org Thanks for the reply/suggestions Tobias! Tobias Geerinckx-Rice writes: >> mount -o subvol=3D@guixsd,$o_btrfs LABEL=3Dbtrfs /mnt >> mount -o subvol=3D@gnu,$o_btrfs LABEL=3Dbtrfs /mnt/gnu > > The two above are especially problematic: Guix's GRUB looks only for /gnu= /store/=E2=80=A6-linux/, which is > now two indirections away. > > Guix System *probably* supports=E2=81=B0 =E2=80=98in-place=E2=80=99 subvo= lumes like > > btrfs subvol create /gnu/store > > only because it doesn't need to support them: they're just directories. > >> mount -o subvol=3D@grub,$o_btrfs LABEL=3Dbtrfs /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=3Dlzo LABEL=3Dbtrfs /mnt btrfs subvolume create /mnt/@guixsd btrfs subvolume create /mnt/@home btrfs subvolume create /mnt/@snapshots umount /mnt o_btrfs=3Ddefaults,X-mount.mkdir,compress=3Dlzo,ssd,noatime mount -o subvol=3D@guixsd,$o_btrfs LABEL=3Dbtrfs /mnt mount -o subvol=3D@home,$o_btrfs LABEL=3Dbtrfs /mnt/home mount -o subvol=3D@snapshots,$o_btrfs LABEL=3Dbtrfs /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