Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imageBuilder: add btrfs support #356

Merged
merged 2 commits into from
Jun 18, 2021
Merged

imageBuilder: add btrfs support #356

merged 2 commits into from
Jun 18, 2021

Conversation

lheckemann
Copy link
Member

@lheckemann lheckemann commented May 21, 2021

This is just a draft, I'm still waiting for my image build to complete so I can test it, and the btrfs builder looks a little different from the others — mostly because I don't understand the purpose of the scope stuff in the others;

With a local.nix containing

  mobile.generatedFilesystems.rootfs = lib.mkDefault {
    type = lib.mkForce "btrfs";
    id = lib.mkForce "b8ec3817-2e82-4c93-9870-6d502fdcb423";
  };
  fileSystems."/" = {
    fsType = "btrfs";
    device = "/dev/disk/by-uuid/b8ec3817-2e82-4c93-9870-6d502fdcb423";
  };

this built and booted successfully \o/

@lheckemann lheckemann marked this pull request as ready for review May 21, 2021 17:19
@samueldr
Copy link
Member

You won't (or will) believe me, but the main reason I hadn't taken a look at this yet is because I needed to explain the scope thingy, which I really vaguely knew the reason, but didn't want to handwave it as "oh, it's to name the functions".

So, here goes:

This is why I'm doing that weird trick. It makes wrong use somewhat more user-friendly... Though not all wrong uses end up being made more user friendly :/

@samueldr
Copy link
Member

Other than the "scope" stuff, it looks alright.

Can you add he scope stuff, also spacing with an empty line like the following:

If you want me to take care of it, just ask :).

@lheckemann
Copy link
Member Author

Done! Any particular reason to use let scope = { "…" = as opposed to let scope."…" =?

@samueldr
Copy link
Member

samueldr commented Jun 18, 2021

Thanks!

None really, I guess I didn't think about how that would work when I implemented it.

@samueldr samueldr merged commit af8260e into NixOS:master Jun 18, 2021
@lheckemann lheckemann deleted the btrfs branch June 21, 2021 17:10
@kurnevsky
Copy link
Member

It doesn't work anymore, I got errors like:

modprobe: module btrfs not found in modules.dep
W, [2023-03-07T12:58:01.179669//1.6682 #1]  WARN -- : Kernel filesystem module “btrfs” failed to load.
mount: mounting /dev/disk/by-uuid/e3b552a3-be28-4d1d-9016-e1b9a8699464 on /mnt/ failed: No such device

@samueldr
Copy link
Member

samueldr commented Mar 7, 2023

That may not be that the image generated didn't work, but that the device you are attempting to boot on doesn't have the BTRFS driver enabled.

Since you're now booting to a system, I would highly suspect that the image building worked.

Can you open a new issue (since this is unrelated to this PR), explaining what you are attempting to do (I suspect something like building a device image with BTRFS), what you have tried, and what you are observing? Don't forget to include useful information like the device you're building for, and exact commands used.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants