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

rouge: create partition from specific rootfs folder #39

Open
al1img opened this issue May 8, 2022 · 6 comments
Open

rouge: create partition from specific rootfs folder #39

al1img opened this issue May 8, 2022 · 6 comments

Comments

@al1img
Copy link

al1img commented May 8, 2022

We need the functionality which yocto wic plugin does: it can pack the specific folder into a separate partition. It is required in the following use cases: RO rootfs + RW /var or/and RW /home. We should have a possibility to add /var /home files into separate partition.

@rshym
Copy link
Contributor

rshym commented Oct 13, 2022

The solution is on review #60

@rshym
Copy link
Contributor

rshym commented Mar 21, 2023

Required functionality was merged as #60.
You need to use items instead of files.
Using items you may specify folders to be used as content for partition. Symlinks are preserved inside directories for ext4 partitions.

@rshym
Copy link
Contributor

rshym commented Mar 21, 2023

Please see example of yaml:

images:
  test:
    type: gpt
    desc: "test image"
    partitions:
      test:
        gpt_type: 21686148-6449-6E6F-744E-656564454649 # BIOS boot partition (kinda...)
        type: ext4
        items:
          "file1": "./file_1"
          "folderA/fileA": "dirA/file_A"
          "folderB": "dirA"
          "/": "dirA/"
          "/folderC/subA": "dirA/"

@lorc
Copy link
Collaborator

lorc commented Nov 8, 2023

@al1img are you satisfied with the solution? Can we close the issue?

@al1img
Copy link
Author

al1img commented Feb 18, 2024

Not fully. I can't set file permissions. I would like to control root_owner and -d root-directory options of mkfs command.

@lorc
Copy link
Collaborator

lorc commented Feb 19, 2024

I see... Do you have an idea how this can be describe at YAML level? E.g. what format should work for you? In the most generic case it should be something like this:

items_ext:
  - source: "/local/path"
    destination: "/path/on/image"
    permissions: "rwxrw-r--" (or maybe just 0642?)
    owner: "root"
    group: "root"
  - source: "/other/local/path"
    destination: "/oher/path/on/image"
    permissions: "rw------"
    owner: "root"
    group: "root"

Problem is that it is quite mouthful. And can grow very fast. And mkfs.ext4 command does not support such features, so we need to find another solution.

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

No branches or pull requests

3 participants