[Top][All Lists]

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

Re: btrfs and subvolumes for root

From: Fredrik Salomonsson
Subject: Re: btrfs and subvolumes for root
Date: Tue, 5 Sep 2017 21:13:33 -0700

Adjusting kernel parameters can be done with 'kernel-arguments'.
Thanks, missed that option when looking through the manual.

Been messing around with it for a few days trying to get this to work but so far no luck.

I've made a few changes to my disk layout since my last email. Inspired by this thread

Partion layout for /dev/sda3
under __current/
| subvol      | Mountpoint   | Comment            | Shared   |
| arch-root   | /            | root for Arch      | no       |
| guixsd-root | /            | root for GuixSD    | no       |
| grub        | /boot/grub   | grub config        | yes      |
| guix        | /var/guix    | guix stuff         | yes      |
| gnu         | /gnu         | Store etc          | yes      |
| home        | /home        | home partition     | yes      |

My plan is to share guix between guixsd and arch similar to what Christopher Allan Webber does except instead of using bind-mount I'm using btrfs subvolumes. Then let GuixSD handle the grub generation.

The error I'm getting now is that it cannot find the linux kernel when booting. Which I assume is because the gnu subvolume isn't mounted? I'm a bit of a noob when it comes to the boot process. 

I tried adding (needed-for-boot? #t) to the filesystems I need at boot. For example
  (device "root")
  (title 'label)
  (mount-point "/gnu")
  (type "btrfs")
  (options "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/gnu")
  (needed-for-boot? #t)
  (dependencies mapped-devices))

But when I have that set to true, guix complains about missing mapped-devices for my swap-device and for /home if I comment out (swap-devices ...). 

The error I get is:
guix system: error: service 'swap-/dev/mapper/the-swap-device' requires 'device-mapping-the-swap-device', which is not provided by any service
And if I comment out (swap-devices '("/dev/mapper/the-swap-device")) in my config.scm I get:
guix system: error: service 'file-system-/home' requires 'device-mapping-the-root-device', which is not provided by any service

If I remove the (needed-for-boot? #t) from the file-system entries the error goes away. 

I tested this using the 0.13.0 img with no guix pull before running guix system init. But I'm getting the same error when running guix system init from my Arch linux install.

2017-09-02 4:34 GMT-07:00 Marius Bakke <address@hidden>:
address@hidden writes:

> Am 2017-08-06 05:46, schrieb Fredrik Salomonsson:
>> Hello Guix,
>> I'm testing out setting up a dual boot between GuixSD and Arch. I've
>> no idea how much each one will take on disk. I decided to try out
>> btrfs and subvolumes for the layout.
>> But I'm having some issues booting the thing.
>> My disk layout right now is:
>> sda
>>   sda1      1MB BIOS boot
>>   sda2      4G  swap
>>   sda3 228.9GB  btrfs
>> then subvolumes:
>> sda3/
>>   __current/guixsd-root
>>   __current/arch-root
>>   __current/boot
>>   __current/home
>> section from my config.scm, which is based on my old config (old one
>> is attached).
>> (file-systems (cons* (file-system
>>    (device "root")
>>    (title 'label)
>>    (mount-point "/boot")
>>    (options
>> "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/boot")
>>    (dependecies mapped-devices))
>> ;; repeat for guixsd-root and home but with correct value for subvol
>> )
>> guix system init worked fine but when booting it fails to locate the
>> bzImage. Which I assume is because it doesn't know that the root is in
>> a subvolume.
>> Long story short. How do I add rootflags to GuixSD's grub menu entry?
>> Need to add "rootflags=subvol=__current/guixsd-root" to the
>> linux-arguments. Might be an issue of having boot as a subvolume as
>> well.
>> Thanks
>> --
>> s/Fred[re]+i[ck]+/Fredrik/g
> Hello Fredrik,
> I am having the same problem. Adjusting the kernel parameters for the
> GuixSD kernel seems currently not supported.  Looking at the source code
> though it looks like this could be achieved via manipulating the
> "bootloader-configuration-menu-entries" list. (Still a scheme noob!)


Adjusting kernel parameters can be done with 'kernel-arguments'.


  (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp")))



Attachment: config.scm
Description: Text Data

reply via email to

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