Merge casper:lp.1899308 into casper:main

Proposed by Steve Langasek
Status: Merged
Merged at revision: 1c92c7a3b6b14a3833bab2a02afcf54eb4b07dfd
Proposed branch: casper:lp.1899308
Merge into: casper:main
Diff against target: 52 lines (+22/-0)
3 files modified
debian/changelog (+13/-0)
debian/control (+1/-0)
scripts/casper-helpers (+8/-0)
Reviewer Review Type Date Requested Status
Dimitri John Ledkov ship it Approve
Review via email: mp+392318@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve (ship it)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 1bdd120..7aff181 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,16 @@
6+casper (1.453) UNRELEASED; urgency=medium
7+
8+ * If creating a persistent partition, manually restore a 'bootable' flag
9+ on any protective MBR, if present, to ensure compatibility with BIOS
10+ implementations which require this. This is slightly different from
11+ the xorriso implementation, because we mark the iso9660 partition as
12+ bootable instead of creating a separate empty partition, but anything
13+ looking at the MBR should be fine and anything that's GPT-aware should
14+ not care. LP: #1899308
15+ * Document the VCS for this package.
16+
17+ -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 15 Oct 2020 09:06:25 -0700
18+
19 casper (1.452) groovy; urgency=medium
20
21 * casper: ask user for netmask, because we lack CIDR notation support
22diff --git a/debian/control b/debian/control
23index 03d15c9..3620980 100644
24--- a/debian/control
25+++ b/debian/control
26@@ -4,6 +4,7 @@ Priority: optional
27 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28 Build-Depends: debhelper (>= 7.0.50~), lsb-release, libplymouth-dev (>= 0.8.0~-13), pkg-config, dh-systemd
29 Standards-Version: 3.9.3
30+Vcs-Git: lp:casper
31
32 Package: casper
33 Architecture: any
34diff --git a/scripts/casper-helpers b/scripts/casper-helpers
35index 7479d98..bb019d5 100644
36--- a/scripts/casper-helpers
37+++ b/scripts/casper-helpers
38@@ -298,6 +298,14 @@ find_or_create_persistent_partition () {
39 return
40 fi
41 echo "start=$start" | sfdisk --no-reread -q $DEVICE -a || return
42+ # If our partition table is GPT, we *may* have a protective MBR; ensure
43+ # that after adding a new partition, if there is a protective MBR, we
44+ # mark *a* partition bootable for compatibility (GRUB doesn't actually
45+ # care which partition is marked bootable, but some BIOSes care that
46+ # it exists).
47+ if sfdisk -d $DEVICE | grep -q 'label: gpt'; then
48+ sfdisk --no-reread -q $DEVICE -A 1 -X dos || true
49+ fi
50 for d in ${DEVICE}$newpartno ${DEVICE}p$newpartno ${DEVICE}-part$newpartno; do
51 if [ -e $d ]; then
52 mkfs.ext4 -q -L "$(root_persistence_label)" -F $d

Subscribers

People subscribed via source and target branches