lkml.org 
[lkml]   [2013]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] partitions/efi: treat size mismatch as a warning, not an error
    From
    Karel,

    On Fri, Oct 11, 2013 at 2:51 AM, Karel Zak <kzak@redhat.com> wrote:
    > On Thu, Oct 10, 2013 at 04:28:22PM -0700, Doug Anderson wrote:
    >> + *
    >> + * Consider a bad value here to be a warning to support dd-ing
    >> + * an image from a smaller disk to a bigger disk.
    >> */
    >> if (ret == GPT_MBR_PROTECTIVE) {
    >> sz = le32_to_cpu(mbr->partition_record[part].size_in_lba);
    >> if (sz != (uint32_t) total_sectors - 1 && sz != 0xFFFFFFFF)
    >> - ret = 0;
    >> + pr_warn("%s: mbr size mismatch (%u != %u)\n", __func__,
    >> + sz, (uint32_t)((uint32_t) total_sectors - 1));
    >> }
    >
    > I did the same change to util-linux v2.24 fdisk, so you can use the fdisk
    > to update your protective MBR and boot without warnings.

    Yup, I think we've come up with a number of ways that we can update
    the partition table to avoid the problems. :) ...but the "feature"
    that used to work was being able to dd an image from a smaller disk
    onto a larger disk and have it "just boot" (though perhaps with some
    warning messages). This feature was used in the Chrome OS workflow to
    create bootable USB sticks / SD cards. We certainly could say that
    what the Chrome OS workflow is doing is illegal / bad / unethical, but
    it has been working for years and it would be nice for it to keep
    working if possible. :)

    http://xkcd.com/1172/

    -Doug


    \
     
     \ /
      Last update: 2013-10-11 18:41    [W:5.505 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site