[parted-devel] [PATCH 0/2] Stop replacing boot code in MBR when updating msdos table
Brian C. Lane
bcl at redhat.com
Fri Oct 24 16:48:37 BST 2025
On Fri, Oct 24, 2025 at 02:38:31PM +0100, Mike Fleetwood wrote:
> On Fri, 24 Oct 2025 at 05:42, John Gilmore <gnu at toad.com> wrote:
> >
> > Brian C. Lane <bcl at redhat.com> wrote:
> > > In theory I'm fine with this, and I agree that the bootloader should
> > > handle this. Are we sure that nothing depends on this being written?
> >
> > The few bytes of code at the start of a particular drive are a very tiny
> > nail that the whole system's startup depends on. "For want of a
> > nail...your system won't boot."
> >
> > If parted changes to not do this by default, which I agree is likely a
> > reasonable evolution, the capability to write a bootloader should
> > probably *remain* in parted, as a separate command for emergencies. If
> > the capability is still there, then somebody who was depending on this
> > behavior can ask a search engine what to do and it'll tell them the
> > simple recovery command (if they can boot their system somehow and get
> > into parted again, e.g. from an OS installation image). If not, they'll
> > have to find and configure some other boot loader for their situation,
> > or "dd" a boot loader from some other drive without clobbering their
> > partition table -- a much more challenging task.
>
> I disagree. If a user's machines doesn't boot they should re-install
> their boot loader following relevant instructions, not run parted (a
> partitioning tool) to install its MBR boot code.
I agree with Mike here. Nobody should be depending on parted for writing
this, and if it does happen to break they are going to need to boot with
something else, like a live usb drive, which will give them the tools to
write a proper bootloader.
Thanks for the adjustment of the comments, I was going to suggest that
since the original made it seem like it was overwriting an existing
bootloader instead of overwriting an empty one.
Brian
--
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart
More information about the parted-devel
mailing list