Skip to content

Support usr-merged root filesystems - #2485

Closed
Dominic Ayre (DomAyre) wants to merge 1 commit into
microsoft:mainfrom
DomAyre:domayre/usr-merged-fs
Closed

Support usr-merged root filesystems#2485
Dominic Ayre (DomAyre) wants to merge 1 commit into
microsoft:mainfrom
DomAyre:domayre/usr-merged-fs

Conversation

@DomAyre

@DomAyre Dominic Ayre (DomAyre) commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

Why

Some linux distros, such as AzureLinux, are usr-merged meaning that binaries are not where containerplat will expect them to be. This means we need to create symlinks from the usr directory to /bin.

How

When constructing delta.tar.gz, detect if the input rootfs is usr merged, if it isn't, keep the existing behaviour, otherwise create /usr/bin instead of /bin and then symlink.

Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
Comment thread Makefile
rm -rf rootfs
mkdir -p rootfs/bin/
rm -rf /tmp/base-rootfs && mkdir -p /tmp/base-rootfs
tar -xf $(BASE) -C /tmp/base-rootfs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just extract the directories we need here, and not the entire filesystem?

Suggested change
tar -xf $(BASE) -C /tmp/base-rootfs
tar -xf $(BASE) -C /tmp/base-rootfs --no-anchored --no-recursion bin

@micromaomao

Copy link
Copy Markdown
Member

Hi Dominic Ayre (@DomAyre) , Hamza El-Saawy (@helsaawy)

This PR is still required for azurelinux builds to work. Can we get it merged to main after making the suggested changes?

Tingmao Wang (micromaomao) added a commit to micromaomao/hcsshim that referenced this pull request Jun 18, 2026
Without this UVM built with this Makefile doesn't boot when using Azure Linux
rootfs.

This is a new version of microsoft#2485

Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
Co-authored-by: Tingmao Wang <tingmaowang@microsoft.com>
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
@micromaomao

Copy link
Copy Markdown
Member

Updated in #2781

Tingmao Wang (micromaomao) added a commit to micromaomao/hcsshim that referenced this pull request Jul 2, 2026
Without this UVM built with this Makefile doesn't boot when using Azure Linux
rootfs.

This is a new version of microsoft#2485

Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
Co-authored-by: Tingmao Wang <tingmaowang@microsoft.com>
Assisted-by: GitHub-Copilot
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
Tingmao Wang (micromaomao) added a commit to micromaomao/hcsshim that referenced this pull request Jul 2, 2026
Without this UVM built with this Makefile doesn't boot when using Azure Linux
rootfs.

This is a new version of microsoft#2485

Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
Co-authored-by: Tingmao Wang <tingmaowang@microsoft.com>
Assisted-by: GitHub-Copilot
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
Tingmao Wang (micromaomao) added a commit to micromaomao/hcsshim that referenced this pull request Jul 2, 2026
Without this UVM built with this Makefile doesn't boot when using Azure Linux
rootfs.

This is a new version of microsoft#2485

Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
Co-authored-by: Tingmao Wang <tingmaowang@microsoft.com>
Assisted-by: GitHub-Copilot
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
Maksim An (anmaxvl) pushed a commit that referenced this pull request Jul 2, 2026
Without this UVM built with this Makefile doesn't boot when using Azure Linux
rootfs.

This is a new version of #2485

Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
Co-authored-by: Tingmao Wang <tingmaowang@microsoft.com>
Assisted-by: GitHub-Copilot
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
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.

3 participants