Skip to content

Conversation

@taukakao
Copy link
Member

@taukakao taukakao commented Jan 3, 2026

This prevents running out of space if there are too many changes.
It also improves compatibility with non-CoW filesystems since it doesn't rely on reflink clones anymore.

The downside is that the time window in which the future root is unusable will be longer.
Though since we always have the current root, this should not really be a problem.

@taukakao taukakao requested a review from a team January 3, 2026 00:41
@NN708 NN708 force-pushed the fix-space-issues branch from fc09cf0 to 10c88de Compare January 3, 2026 06:47
Copy link
Member

@NN708 NN708 left a comment

Choose a reason for hiding this comment

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

We still need to improve dry run handling, as OciExportRootFs() now breaks the future root.

@taukakao
Copy link
Member Author

taukakao commented Jan 3, 2026

Yeah, true, I will look through everything.

@taukakao taukakao marked this pull request as draft January 3, 2026 11:34
taukakao and others added 2 commits January 3, 2026 13:05
This prevents running out of space if there are too many changes.
@taukakao
Copy link
Member Author

taukakao commented Jan 3, 2026

I added the clean up again. It might be useful if files are corrupted for some reason or in some edge cases.

I renamed it though, since it would otherwise be a somewhat confusing variable name.

@taukakao taukakao marked this pull request as ready for review January 3, 2026 15:13
@taukakao taukakao requested a review from NN708 January 3, 2026 15:13
@taukakao taukakao requested a review from NN708 January 5, 2026 20:20
Copy link
Member

@NN708 NN708 left a comment

Choose a reason for hiding this comment

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

@taukakao Could you please create a new release in your repository? This would allow us to build a test image before merging.

@taukakao
Copy link
Member Author

taukakao commented Jan 6, 2026

@NN708 I made a release and tested it a bit.
https://github.com/taukakao/ABRoot/releases/tag/fix-space-issues-release-3

Everything seems to be as expected.

@taukakao taukakao requested a review from NN708 January 6, 2026 16:04
@NN708
Copy link
Member

NN708 commented Jan 6, 2026

@NN708 I made a release and tested it a bit. https://github.com/taukakao/ABRoot/releases/tag/fix-space-issues-release-3

Everything seems to be as expected.

Great work! I'll do some testing later as well.

Copy link
Member

@NN708 NN708 left a comment

Choose a reason for hiding this comment

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

The core functionality works, but there's an edge case bug when a dry-run is performed on a system where /part-future is empty.

$ pkexec abroot upgrade -d -f -V
(Verbose) NewABSystem: running...:info:
(Verbose) NewABImageFromRoot:info:running...
(Verbose) NewABImageFromRoot:info:found abimage.abr: sha256:04e948d0dd3b003343b69aecbe09c0d6fd7136f8425aedeb83a16f7970c92e1f
(Verbose) NewABRootManager:info:running...
(Verbose) ABRootManager.GetRootPartitions:info:running...
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUID120c6001-d845-4f27-9fff-70f6490aebc3has labelvos-a
(Verbose) ABRootManager.IdentifyPartition:info:running...
(Verbose) ABRootManager.IdentifyPartition:info:partition is present
(Verbose) ABRootManager.IsCurrent:info:running...
(Verbose) ABRootManager.IsCurrent:info:partition is current
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUID65a05a3a-3bab-41b6-a847-41501ce94d29has labelvos-b
(Verbose) ABRootManager.IdentifyPartition:info:running...
(Verbose) ABRootManager.IdentifyPartition:info:partition is future
(Verbose) ABRootManager.IsCurrent:info:running...
(Verbose) ABRootManager.IsCurrent:info:partition is not current
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUIDc708e82d-2911-4e99-8c4f-ebe6710d149fhas labelvos-var
(Verbose) ABRootManager.GetRootPartitions:info:successfully got root partitions
 INFO  Checking for system updates...
(Verbose) ABSystem.RunOperation:info:startingforce-upgrade
(Verbose) [Stage 0] -------- ABSystemRunOperation
(Verbose) ABSystem.LockOperation:info:lock file created
(Verbose) [Stage 1] -------- ABSystemRunOperation
(Verbose) ABSystem.CheckUpdate:info:running...
(Verbose) OCI.HasUpdate:info:Checking for updates ...
(Verbose) OCI.HasUpdate:info:checking image: ghcr.io/vanilla-arm/desktop:test
(Verbose) OCI.HasUpdate:info:no update available
(Verbose) ABSystem.RunOperation:warn(1.200000):No update available but --force is set. Proceeding...
(Verbose) [Stage 2] -------- ABSystemRunOperation
(Verbose) ABRootManager.GetPresent:info:running...
(Verbose) ABRootManager.GetPresent:info:successfully got present partition
(Verbose) ABRootManager.GetFuture:info:running...
(Verbose) ABRootManager.GetFuture:info:successfully got future partition
(Verbose) ABRootManager.GetBoot:info:running...
(Verbose) DiskManager.GetPartitionByLabel:info:retrieving partitions
(Verbose) DiskManager.getPartitions:info:running...
(Verbose) DiskManager.getPartitions:info:successfully got partitions for disk
(Verbose) DiskManager.GetPartitionByLabel:info:Partition with UUIDe981306e-0840-47ba-83f4-b63a792d3261has labelvos-boot
(Verbose) ABRootManager.GetBoot:info:successfully got boot partition
(Verbose) Partition.Unmount:info:running...
(Verbose) Partition.Unmount:err(0.000000):no mount point
(Verbose) Partition.Unmount:info:running...
(Verbose) Partition.Unmount:err(1.000000):device or resource busy
(Verbose) Partition.Mount:info:running...
(Verbose) Partition.Mount:info:successfully mounted/dev/mapper/vos--root-root--bto/part-future
(Verbose) [Stage 3] -------- ABSystemRunOperation
(Verbose) PackageManager.NewPackageManager:info:running...
(Verbose) PackageManager.GetFinalCmd:info:running...
(Verbose) PackageManager.GetAddPackagesString:info:running...
(Verbose) PackageManager.GetAddPackages:info:running...
(Verbose) PackageManager.getPackages:info:running...
(Verbose) PackageManager.getPackages:info:returning packages
(Verbose) PackageManager.GetAddPackagesString:info:done
(Verbose) PackageManager.GetRemovePackagesString:info:running...
(Verbose) PackageManager.GetRemovePackages:info:running...
(Verbose) PackageManager.getPackages:info:running...
(Verbose) PackageManager.getPackages:info:returning packages
(Verbose) PackageManager.GetRemovePackagesString:info:done
(Verbose) PackageManager.processUpgradePackages:info:no packages to install or remove
(Verbose) NewImageRecipe:info:running...
(Verbose) [Stage 4] -------- ABSystemRunOperation
(Verbose) [Stage 5] -------- ABSystemRunOperation
(Verbose) [Stage 6] -------- ABSystemRunOperation
(Verbose) NewChroot:info:running...
(Verbose) Chroot.Execute:info:running...
(Verbose) Chroot.Execute:info:running command:mount --bind / /
chroot: failed to run command ‘/bin/sh’: No such file or directory
(Verbose) Chroot.Execute:err(0.000000):exit status 127
(Verbose) NewChroot:err(1.000000):exit status 127
(Verbose) ABSystem.RunOperation:err(7.020000):exit status 127
(Verbose) Partition.Unmount:info:running...
(Verbose) Partition.Unmount:info:successfully unmounted/part-future
(Verbose) ABSystem.UnlockOperation:info:lock file removed
  ERROR   exit status 127

@taukakao taukakao requested a review from NN708 January 7, 2026 19:39
@taukakao
Copy link
Member Author

taukakao commented Jan 7, 2026

Makes sense, we can't run chroot in dryrun then. I made the change.

@taukakao taukakao merged commit 1e9c441 into Vanilla-OS:main Jan 8, 2026
1 check passed
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