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

Partition saving doesn't notice MBR partitions #816

Closed
bgilbert opened this issue Apr 6, 2022 · 1 comment · Fixed by #934
Closed

Partition saving doesn't notice MBR partitions #816

bgilbert opened this issue Apr 6, 2022 · 1 comment · Fixed by #934
Assignees

Comments

@bgilbert
Copy link
Contributor

bgilbert commented Apr 6, 2022

Bug

Host Operating System Version

Any

Target Operating System Version

Any

coreos-installer Version

All releases through 0.13.1

Expected Behavior

coreos-installer install --save-partindex correctly saves partitions on disks that have an MBR partition table and no GPT.

Actual Behavior

coreos-installer install --save-partindex clobbers such partitions.

Reproduction Steps

  1. Use fdisk to create a partition on a blank target disk
  2. Install to the disk, passing --save-partindex to save the partition

Other Information

--save-partlabel isn't affected because MBR doesn't support partition labels.

We could support this via mbrman. We'd need to detect and ignore protective MBRs, and to fail if the MBR otherwise doesn't match a valid GPT.

@prestist
Copy link
Contributor

prestist commented Jul 29, 2022

In speaking with @bgilbert we are going to be taking this issue with a 2 pronged approach

  1. Mitigation reduce risk of data loss when there is an MBR with partitions we should save.
  2. Migrate MBR saved partitions to GPT format so the installer can effectively save them.

Keeping in mind, that a disagreeing MBR/GPT shouldn't happen; however, its possible, and the feature is intended for preserving data from pre-existing disks with an unknown history.

That being said, this issue will become the stage 1.
Stage two will be linked here and no longer considered a part of this issue.

prestist added a commit to prestist/coreos-installer that referenced this issue Sep 13, 2022
Fixes coreos#816, when running the `install` cmd with the arg `--save-partindex` an
additonal check is done on the disk to ensure that MBR is not present. If MBR is
present the proccess will bail.
prestist added a commit to prestist/coreos-installer that referenced this issue Sep 13, 2022
If running `install` with the `----save-partindex` argument on a MBR drive
the listed partitions would be lost durring the install. To prevent the loss
of data the install proccess now checks to see if the drive is MBR, and if it
is it will bail fixes coreos#816
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