[parted-devel] [PATCH 0/2] Stop replacing boot code in MBR when updating msdos table

Mike Fleetwood mike.fleetwood at googlemail.com
Wed Oct 22 21:43:36 BST 2025


Hi,

A user requested that GParted not replace MBR boot code when updating
the msdos partition table.  Since neither fdisk nor libparted GPT code
overwrite boot code when they update the MBR then libparted msdos code
shouldn't either.  Writing boot code is the responsibility of boot
loader installation, not a partitioning tool.

Following is a patch for this and an associated unit test.

Thanks,
Mike


Mike Fleetwood (2):
  libparted: Stop replacing boot code in MBR when updating msdos table
  tests: t2420: New test confirming updating msdos doesn't add boot code

 NEWS                              |  7 ++-
 libparted/labels/dos.c            | 22 --------
 libparted/mbr.s                   | 85 -------------------------------
 tests/Makefile.am                 |  1 +
 tests/t-lib-helpers.sh            |  5 ++
 tests/t2420-msdos-no-boot-code.sh | 85 +++++++++++++++++++++++++++++++
 6 files changed, 97 insertions(+), 108 deletions(-)
 delete mode 100644 libparted/mbr.s
 create mode 100755 tests/t2420-msdos-no-boot-code.sh

-- 
2.43.7




More information about the parted-devel mailing list