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

fixed vfat mkfs using uuid from layout if possible #2546

Merged
merged 1 commit into from Jan 12, 2021
Merged

Conversation

DEvil0000
Copy link
Contributor

@DEvil0000 DEvil0000 commented Dec 17, 2020

  • Type: Bug Fix / Enhancement
  • Impact: Normal
  • How was this pull request tested? manually by me - only the no label but uuid path
  • Issue GPT table creation does not recover old disk and partition GUIDs #2548 related to this PR but it is not the same
  • Brief description of the changes in this pull request:
    mkfs.vfat (used for e.g. uefi partition) did not honor the uuid from the layout so "boot original system" was failing (by id/no label) after a recover. It also adds new boot menu entries and changes boot order on HP machines when a efi partition with new id is detected. The change tries to use -i option to set the uuid on creation and falls back to not using it when it fails (like done in the script for ext and others). This fixes the issues.

@gdha gdha self-assigned this Jan 12, 2021
Copy link
Member

@gdha gdha left a comment

Choose a reason for hiding this comment

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

Line 304:

            if [ -n "$uuid" ]; then
                # The UUID label of vfat is changed by recreating the fs, we must swap it.
                cat >> "$LAYOUT_CODE" <<EOF
new_uuid=\$(blkid_uuid_of_device $device)
if [ "$uuid" != "\$new_uuid" ] ; then
    echo "$uuid \$new_uuid $device" >> "$FS_UUID_MAP"
fi
EOF

This should be enhanced to be executed only when your code did not succeed, right? Could you please fix this.

@gdha gdha added the minor bug An alternative or workaround exists label Jan 12, 2021
@DEvil0000
Copy link
Contributor Author

I thought its more save and readable to do the check in any case. It does not harm to do it. If you insist I will restructure it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants