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

cloud-init: support resizing on MBR partition tables #1075

Closed
mudler opened this issue Jan 18, 2022 · 6 comments · Fixed by #1132
Closed

cloud-init: support resizing on MBR partition tables #1075

mudler opened this issue Jan 18, 2022 · 6 comments · Fixed by #1132

Comments

@mudler
Copy link
Contributor

mudler commented Jan 18, 2022

Seems the automatic resizing from the cloud-init examples in the rpi(also odroidc2, probably) images doesn't work. I get a silent exit status 2. However, the generated command seems correct (sgdisk .. ) which correctly identifies the partition number.

Follow up of #1023

Originally posted by @mudler in #1023 (comment)

@mudler mudler added architecture/arm64 kind/bug Something isn't working labels Jan 18, 2022
@mudler
Copy link
Contributor Author

mudler commented Jan 18, 2022

@davidcassany could it be related that with sgdisk is gpt the prefered partition table layout? or should not actually be an issue? I'm just wondering, because most of the resizing scenario tests we perform on EFI, but we don't really test outside of it. Considering that arm is mbr, then might be an issue..

@davidcassany
Copy link
Contributor

Isn't RPi using the MSDOS partition tables? If so, then it won't work. Layout plugin only works for GPT partition tables as it is based on sgdisk.

The real fix for that is using the partitioner package from elemental-cli in yip as it supports MSDOS and GPT. Indeed updating yip layout plugin to relay on elemental-cli partitioner package has been my midterm intention since we started elemental-cli. It should be relatively simple to do so as the API in partitioner module is intentionally copying the layout yip plugin for that exact purpose.

@mudler
Copy link
Contributor Author

mudler commented Jan 18, 2022

ok, treating it as a feature request then as we never actually supported this before in MBR

@mudler mudler added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Jan 18, 2022
@mudler mudler changed the title arm: Automatic resizing of COS_PERSISTENT after first boot cloud-init: support resizing on MBR partition tables Jan 18, 2022
@mudler
Copy link
Contributor Author

mudler commented Jan 18, 2022

Isn't RPi using the MSDOS partition tables? If so, then it won't work. Layout plugin only works for GPT partition tables as it is based on sgdisk.

The real fix for that is using the partitioner package from elemental-cli in yip as it supports MSDOS and GPT. Indeed updating yip layout plugin to relay on elemental-cli partitioner package has been my midterm intention since we started elemental-cli. It should be relatively simple to do so as the API in partitioner module is intentionally copying the layout yip plugin for that exact purpose.

Another way is also to consume directly the partitioner from elemental-cli in the elemental-cli cloud init runner, but I'm not sure if it already works as a drop-in replacement for the layout plugin currently in yip, anyhow both ways sounds fine!

@davidcassany
Copy link
Contributor

Another way is also to consume directly the partitioner from elemental-cli in the elemental-cli cloud init runner, but I'm not sure if it already works as a drop-in replacement for the layout plugin currently in yip

I don't think so, as I believe console interface and probably few other details are not fully aligned. Anyway it is worth finding the best way to express or sort out this dependencies since having elemental-cli requiring yip and yip requiring some elemental-cli package looks like leading to confusions or strange circular dependency issues.

@mudler
Copy link
Contributor Author

mudler commented Jan 19, 2022

Anyway it is worth finding the best way to express or sort out this dependencies since having elemental-cli requiring yip and yip requiring some elemental-cli package looks like leading to confusions or strange circular dependency issues.

Yes indeed, better or yip takes the 'extended' layout plugin code, or either elemental-cli just replaces with its own, leaving the yip layout plugin as it is currently. I'd suggest elemental-cli to use their own in place of the yip one to avoid code dups (unless we split the layout code in a standalone lib..) as it is more straightforward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants