this patch, parted and dmraid will both create duplicate partition devices
named /dev/mapper/foo1 and /dev/mapper/foop1.
+ Add the ability to set the boot flag on the GPT PMBR. This is needed
+ for some BIOS systems that refuse to boot from GPT unless this is set.
+ disk_set and disk_toggle commands can be used to set the pmbr_boot
+ flag on the disk.
+
+ The flag is also displayed in a new line, 'Disk Flags:' like this:
+
+ Model: (file)
+ Disk /home/bcl/disk.img: 4295MB
+ Sector size (logical/physical): 512B/512B
+ Partition Table: gpt
+ Disk Flags: pmbr_boot
+
+ Using -m the flags are added after the model name field:
+
+ /root/disk.img:4295MB:file:512:512:gpt::pmbr_boot;
+
** Build-related
"make dist" no longer builds .tar.gz files.
t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \
t0207-IEC-binary-notation.sh \
t0208-mkpart-end-in-IEC.sh \
+ t0209-gpt-pmbr_boot.sh \
t0210-gpt-resized-partition-entry-array.sh \
t0211-gpt-rewrite-header.sh \
t0212-gpt-many-partitions.sh \
--- /dev/null
+#!/bin/sh
+# Ensure that pmbr_boot flag can be set
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted
+
+N=2M
+dev=loop-file
+# create a file large enough to hold a GPT partition table
+dd if=/dev/null of=$dev bs=1 seek=$N || framework_failure
+
+# create a GPT partition table
+parted -s $dev mklabel gpt > out 2>&1 || fail=1
+# expect no output
+compare out /dev/null || fail=1
+
+# Set the pmbr_boot flag on the PMBR
+parted -s $dev disk_set pmbr_boot on
+
+# Check to see if the flag is set
+parted -m -s $dev u s p > out 2> err || fail=1
+grep "$dev:.*:gpt::pmbr_boot;" out || { cat out; fail=1; }
+
+Exit $fail