Hi,
> I don't have access to the real device I was reproducing this on at the
> moment, but I get the same behaviour from taking the .raw disk file,
> converting to .vmdk, using VMware to expand the disk to 30GB, then
> booting -- it does not detect the disk size change and does not resize
> anything. The same thing occurs when using Rufus to directly burn the
> .raw file to a larger USB drive (not an NVME drive, but still GPT).
> $ sudo sgdisk --verify /dev/nvme0n1
> No problems found. 43087838 free sectors (20.5 GiB) available in 2
> segments, the largest of which is 43085824 (20.5 GiB) in size.
Yeah the tools used in this procedure corrects the "mistake" :)
> $ sudo sfdisk -d /dev/nvme0n1
> GPT PMBR size mismatch (19828735 != 62914559) will be corrected by
Yes same, here
> > rd.kiwi.oem.force_resize
>
> I noticed that setting, but the docs say that this will make it resize
> (and change partition UUIDs) on every boot, and I'd prefer these were
> more stable.
This is correct, we try to resize with every boot, the tools called
in this procedure find out in a row that there is nothing to do if
the geometry hasn't changed and completes very fast without performing
a change. I consider it safe but I also wanted to have a safe and simple
check that allows us to know that we don't have to even call them.
So I also aim for a stable solution but so far I'm running out of ideas.
Before I coded that "trick" with checking on the location of the backup
GPT, we had code that checks if there is a gap between the address of
the last partition in the table and the end of disk. But this check
can be misleading too because I remember users who wanted a gap there
and complained that the resize code "fixes" it.
However, I believe it's better to improve the check for unallocated_space
and maybe add another option to skip parts of it when needed.
I'm very happy to discuss other ideas
Thoughts ?
> One other thing that I noticed and am not sure if it's intended: if I
> run sudo dracut -f in the installed OS, it does not include any of the
> kiwi modules by default, so on subsequent reboots they're completely
> ignored.
Yes this is an intentional behavior. in general the kiwi intrd code
is setup to do the job when needed and then can be dropped.
When producing a host-only initrd via either "dracut -f" or by a
package that calls it, usally no extra kiwi code is required anymore.
The resize code forms an exception in a way that it can also be
useful during the lifetime of the image but you need to express
that this is wanted. You can stick with the module by adding an
overlay file in your image description like this:
root/etc/dracut.conf.d/kiwi-resize.conf
with the content:
add_dracutmodules+=" kiwi-repart "
There are so many different tools and ways to resize the system,
kiwi is just one opportunity and we wanted that users who requests
it need to do it explicitly, such that debugging shows it as a
setup for dracut. We also don't wanted the kiwi initrd code to be
in conflict with others. Hope this makes sense to you too