Re: How to correctly setup the partition table for systemd-sysupdate?

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

 



Hi, thank you for the answer.

I use the linux-generic partition to put raw images as the [Source] for systemd-sysupdate. For now, I don't want to spawn a http server for this.

So you mean I need to have this kind of partition table?

+-----+------+------------+------------+----------------------------------+
| esp | root | empty root | empty root | linux-generic for put raw images |
+-----+------+------------+------------+----------------------------------+

On Mon, Jan 8, 2024 at 8:33 PM Adrian Vovk <adrianvovk@xxxxxxxxx> wrote:
You shouldn't be using a linux-generic partition for updates. You need (at least) two of the same kind of partition to switch between whenever there's an update

On Mon, Jan 8, 2024, 06:46 Renjaya Raga Zenta <ragazenta@xxxxxxxxx> wrote:
Hi,

I've been experimenting with systemd-sysupdate, trying to understand how it works.

I created a Fedora 39 image¹ with mkosi from the GitHub repo. It has 3 partitions:
1) esp
2) root
3) linux-generic (to put updates)

The root and third partition will be expanded on firstboot via systemd-growfs². I also configured the third partition to be automounted with udev rules.

I created a configuration file in /usr/lib/sysupdate.d: 10-root.conf
[Transfer]
ProtectVersion=%A

[Source]
Type=regular-file
Path=/run/media/system/UPDATES
MatchPattern=demo_@xxxxxxxxxxxxxxxxx

[Target]
Type=partition
Path=auto
MatchPartitionType=root

Let's say, first, I created version 0.1.0: demo_0.1.0.raw, then I created version 0.1.1 with SplitArtifacts=yes in mkosi.conf. So I had demo_0.1.1.esp.raw and demo_0.1.1.root-x86-64.raw. I put demo_0.1.1.root-x86-x64.raw to /run/media/system/UPDATES.

I ran /usr/lib/systemd/systemd-sysupdate list, it correctly showed the available update candidate. But then I ran /usr/lib/systemd/systemd-sysupdate update, it showed an error about the partition table.

"Partition table has less than two partition slots of the right type 4f68bce3-xxxx-yyyy-truncated (root-x86-64), refusing."

I've tried adding more 2 root partition slots, but still got the same error. I've also tried adding PaddingMinBytes/PaddingMaxBytes in /usr/lib/repart.d/.

Maybe I missed something here. How to correctly setup the partition table for systemd-sysupdate?

Thanks.

[1] I'm working on Debian stable based image, but unfortunately systemd-sysupdate is not available (not compiled). So I tried Fedora instead.
[2] Before systemd 255, the GrowFileSystem flag did not work as expected, but there is a workaround. Hopefully the patches will be backported.

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux